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
// Create a new memory stream to hold the saved PDF document
67
+
StreamsavedStream=newMemoryStream();
68
+
69
+
// Asynchronously save the current document content into the memory stream
70
+
awaitpdfViewer.SaveDocumentAsync(savedStream);
71
+
72
+
try
73
+
{
74
+
savedStream.Position=0;
75
+
76
+
// Open the file explorer using the file picker, select a location to save the PDF, save the file to the chosen path, and retrieve the saved file location for display.
// Check if the fourth tab's header matches "InputTemplate.xlsx"
55
-
if(tab4.Header.Equals("InputTemplate.xlsx"))
125
+
// Check if the fourth tab's header matches "Template.pptx"
126
+
if(tab4.Header.Equals("Template.pptx"))
56
127
{
57
-
pdfViewer3.DocumentSource=viewModel.ConvertXlsxToPdf(viewModel.PDFDocuments[3]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
128
+
pdfViewer3.DocumentSource=viewModel.ConvertPptToPdf(viewModel.PDFDocuments[3]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
58
129
tab4.Content=pdfViewer3;// Set the content of tab1 to the pdfViewer1.
59
130
}
60
131
61
132
62
-
// Check if the fifth tab's header matches "Input.xps"
63
-
if(tab5.Header.Equals("Input.xps"))
133
+
// Check if the fifth tab's header matches "InputTemplate.xlsx"
134
+
if(tab5.Header.Equals("InputTemplate.xlsx"))
64
135
{
65
-
pdfViewer4.DocumentSource=viewModel.ConvertXpsToPdf(viewModel.PDFDocuments[4]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
136
+
pdfViewer4.DocumentSource=viewModel.ConvertXlsxToPdf(viewModel.PDFDocuments[4]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
66
137
tab5.Content=pdfViewer4;// Set the content of tab1 to the pdfViewer1.
67
138
}
68
139
69
-
// Check if the sixth tab's header matches "Template.pptx"
70
-
if(tab6.Header.Equals("Template.pptx"))
140
+
// Check if the sixth tab's header matches "Input.xps"
141
+
if(tab6.Header.Equals("Input.xps"))
71
142
{
72
-
pdfViewer5.DocumentSource=viewModel.ConvertPptToPdf(viewModel.PDFDocuments[5]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
143
+
pdfViewer5.DocumentSource=viewModel.ConvertXpsToPdf(viewModel.PDFDocuments[5]);// Assign the stream to the "DocumentSource" property of the PdfViewer control
73
144
tab6.Content=pdfViewer5;// Set the content of tab1 to the pdfViewer1.
0 commit comments