You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Ensure the viewModel is not null before proceeding
30
30
if(viewModel?.PDFDocuments!=null)
31
31
{
32
32
// Check if the first tab's header matches "PDF_Succinctly.pdf"
33
33
if(tab1.Header.Equals("PDF_Succinctly.pdf"))
34
34
{
35
-
awaitTask.Delay(80);// Slight delay to ensure UI is ready
36
35
pdfViewer.DocumentSource=viewModel.PDFDocuments[0];// Assign the stream to the "DocumentSource" property of the PdfViewer control
37
36
tab1.Content=pdfViewer;// Set the content of tab1 to the pdfViewer.
38
37
}
39
38
40
39
// Check if the second tab's header matches "Input.docx"
41
40
if(tab2.Header.Equals("Input.docx"))
42
41
{
43
-
awaitTask.Delay(80);// Slight delay to ensure UI is ready
44
42
pdfViewer1.DocumentSource=viewModel.ConvertDocxToPdf(viewModel.PDFDocuments[1]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
45
43
tab2.Content=pdfViewer1;// Set the content of tab1 to the pdfViewer1.
46
44
}
47
45
48
46
// Check if the third tab's header matches "Autumn Leaves.jpg"
49
47
if(tab3.Header.Equals("Autumn Leaves.jpg"))
50
48
{
51
-
awaitTask.Delay(80);// Slight delay to ensure UI is ready
52
49
pdfViewer2.DocumentSource=viewModel.ConvertImageToPdf(viewModel.PDFDocuments[2]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
53
50
tab3.Content=pdfViewer2;// Set the content of tab1 to the pdfViewer1.
// Check if the fourth tab's header matches "InputTemplate.xlsx"
58
55
if(tab4.Header.Equals("InputTemplate.xlsx"))
59
56
{
60
-
awaitTask.Delay(80);// Slight delay to ensure UI is ready
61
57
pdfViewer3.DocumentSource=viewModel.ConvertXlsxToPdf(viewModel.PDFDocuments[3]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
62
58
tab4.Content=pdfViewer3;// Set the content of tab1 to the pdfViewer1.
// Check if the fifth tab's header matches "Input.xps"
67
63
if(tab5.Header.Equals("Input.xps"))
68
64
{
69
-
awaitTask.Delay(80);// Slight delay to ensure UI is ready
70
65
pdfViewer4.DocumentSource=viewModel.ConvertXpsToPdf(viewModel.PDFDocuments[4]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
71
66
tab5.Content=pdfViewer4;// Set the content of tab1 to the pdfViewer1.
72
67
}
73
68
74
69
// Check if the sixth tab's header matches "Template.pptx"
75
70
if(tab6.Header.Equals("Template.pptx"))
76
71
{
77
-
awaitTask.Delay(80);// Slight delay to ensure UI is ready
78
72
pdfViewer5.DocumentSource=viewModel.ConvertPptToPdf(viewModel.PDFDocuments[5]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
79
73
tab6.Content=pdfViewer5;// Set the content of tab1 to the pdfViewer1.
4.[Syncfusion.DocIORenderer.NET](https://www.nuget.org/packages/Syncfusion.DocIORenderer.NET) package to convert Word document to PDF.
9
9
5.[Syncfusion.Pdf.Imaging.NET](https://www.nuget.org/packages/Syncfusion.Pdf.Imaging.NET) package used to draw the image files to PDF.
10
-
6.[Syncfusion.Presentation.NET](https://www.nuget.org/packages/Syncfusion.Presentation.NET) package used to read write and converting the PowerPoint presentation programmatically.
10
+
6.[Syncfusion.Presentation.NET](https://www.nuget.org/packages/Syncfusion.Presentation.NET) package used to read, write and converting the PowerPoint presentation programmatically.
11
11
7.[Syncfusion.PresentationRenderer.NET](https://www.nuget.org/packages/Syncfusion.PresentationRenderer.NET) package to preserve the original appearance of the PowerPoint presentation in the converted PDF document.
12
12
8.[Syncfusion.XlsIORenderer.NET](https://www.nuget.org/packages/Syncfusion.XlsIORenderer.NET) package to convert the Excel document to PDF document.
13
13
9.[Syncfusion.XpsToPdfConverter.NET](https://www.nuget.org/packages/Syncfusion.XpsToPdfConverter.NET) package used to convert.xps format file to PDF document file.
@@ -54,9 +54,5 @@ Assign the saved PDF stream to the [DocumentSource](https://help.syncfusion.com/
54
54
## Run the App
55
55
56
56
1. Build and run the application on all platforms.
57
-
1. Switch to all tabs and check whether all pdf is loading.
58
-
1. Ensure all behaviors of PdfViewer in all PdfViewer tabs.
59
-
60
-
61
-
62
-
57
+
2. Switch to all tabs and check whether all pdf is loading.
58
+
3. Ensure all behaviors of PdfViewer in all PdfViewer tabs.
0 commit comments