File tree Expand file tree Collapse file tree
Apply-substitution-font-name/.NET/Apply-substitution-font-name
Apply-substitution-font-stream/.NET/Apply-substitution-font-stream
Convert-PowerPoint-into-accessible-PDF/.NET/Convert-PowerPoint-into-accessible-PDF
Convert-PowerPoint-presentation-to-PDF
.NET/Convert-PowerPoint-presentation-to-PDF
ASP.NET-Core-Web-API/Client Application/Client Application
Azure/Azure_Functions/Console_App_Flex_Consumption/PPTX-to-PDF
Convert-PowerPoint-to-PDF-with-handouts/.NET-Framework/Convert-PowerPoint-to-PDF-with-handouts
Convert-PowerPoint-to-PDF-with-notes/.NET-Framework/Convert-PowerPoint-to-PDF-with-notes
Create-fillable-PDF-from-PPTX/.NET/Create-fillable-PDF-from-PPTX
Enable-portable-rendering/.NET-Framework/Enable-portable-rendering
Fallback-fonts-based-on-scripttype/.NET/Fallback-fonts-based-on-scripttype
Fallback-fonts-for-Unicode-range/.NET/Fallback-fonts-for-Unicode-range
Fallback-symbols-based-on-scripttype/.NET/Fallback-symbols-based-on-scripttype
Initialize-default-fallback-fonts/.NET/Initialize-default-fallback-fonts
Modify-the-exiting-fallback-fonts/.NET/Modify-the-exiting-fallback-fonts
Optimize-duplicate-images/.NET-Framework/Optimize-duplicate-images
Optimize-image-quality-and-resolution/.NET-Framework/Optimize-image-quality-and-resolution
PowerPoint-to-PDF-with-hidden-slides/.NET-Framework/PowerPoint-to-PDF-with-hidden-slides
PowerPoint-to-PDF-with-nested-metafile/.NET-Framework/PowerPoint-to-PDF-with-nested-metafile
Set-PDF-conformance-level
.NET-Framework/Set-PDF-conformance-level
.NET/Set-PDF-conformance-level
Set-chart-quality/.NET-Framework/Set-chart-quality
Show-warning-for-unsupported-elements/.NET/Show-warning-for-unsupported-elements Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33using Syncfusion . PresentationRenderer ;
44
55//Load the PowerPoint presentation.
6- using ( IPresentation pptxDoc = Presentation . Open ( @"Data/Template.pptx" ) )
6+ using ( IPresentation pptxDoc = Presentation . Open ( Path . GetFullPath ( @"Data/Template.pptx" ) ) )
77{
88 //Initialize the SubstituteFont event to set the replacement font.
99 pptxDoc . FontSettings . SubstituteFont += SubstituteFont ;
1010 //Convert the PowerPoint presentation to PDF document.
1111 using ( PdfDocument pdfDocument = PresentationToPdfConverter . Convert ( pptxDoc ) )
1212 {
1313 //Save the generated PDF to the file system.
14- pdfDocument . Save ( @"Output/PPTXToPDF.pdf" ) ;
14+ pdfDocument . Save ( Path . GetFullPath ( @"Output/PPTXToPDF.pdf" ) ) ;
1515 //Release all resources.
1616 pdfDocument . Close ( true ) ;
1717 }
Original file line number Diff line number Diff line change 44using Syncfusion . PresentationRenderer ;
55
66//Load the PowerPoint presentation.
7- using ( IPresentation pptxDoc = Presentation . Open ( @"Data/Template.pptx" ) )
7+ using ( IPresentation pptxDoc = Presentation . Open ( Path . GetFullPath ( @"Data/Template.pptx" ) ) )
88{
99 //Initialize the SubstituteFont event to set the replacement font.
1010 pptxDoc . FontSettings . SubstituteFont += SubstituteFont ;
1111 //Convert the PowerPoint presentation to PDF document.
1212 using ( PdfDocument pdfDocument = PresentationToPdfConverter . Convert ( pptxDoc ) )
1313 {
1414 //Save the generated PDF to the file system.
15- pdfDocument . Save ( @"Output/PPTXToPDF.pdf" ) ;
15+ pdfDocument . Save ( Path . GetFullPath ( @"Output/PPTXToPDF.pdf" ) ) ;
1616 //Release all resources.
1717 pdfDocument . Close ( true ) ;
1818 }
Original file line number Diff line number Diff line change 33using Syncfusion . PresentationRenderer ;
44
55//Open the existing PowerPoint presentation.
6- using ( IPresentation pptxDoc = Presentation . Open ( @"Data/Template.pptx" ) )
6+ using ( IPresentation pptxDoc = Presentation . Open ( Path . GetFullPath ( @"Data/Template.pptx" ) ) )
77{
88 //Instantiate PresentationToPdfConverterSettings.
99 PresentationToPdfConverterSettings pdfConverterSettings = new PresentationToPdfConverterSettings ( ) ;
1313 using ( PdfDocument pdfDocument = PresentationToPdfConverter . Convert ( pptxDoc , pdfConverterSettings ) )
1414 {
1515 //Save the PDF document to the file system.
16- pdfDocument . Save ( @"Output/PPTXToPDF.pdf" ) ;
16+ pdfDocument . Save ( Path . GetFullPath ( @"Output/PPTXToPDF.pdf" ) ) ;
1717 }
1818}
Original file line number Diff line number Diff line change 33using Syncfusion . PresentationRenderer ;
44
55//Open the existing PowerPoint presentation.
6- using ( IPresentation pptxDoc = Presentation . Open ( Path . GetFullPath ( "Data/Template.pptx" ) ) )
6+ using ( IPresentation pptxDoc = Presentation . Open ( Path . GetFullPath ( @ "Data/Template.pptx") ) )
77{
88 //Convert the PowerPoint presentation to PDF document.
99 using ( PdfDocument pdfDocument = PresentationToPdfConverter . Convert ( pptxDoc ) )
1010 {
1111 //Save the PDF document to the file system.
12- pdfDocument . Save ( @"Output\ PPTXToPDF.pdf" ) ;
12+ pdfDocument . Save ( Path . GetFullPath ( @"Output/ PPTXToPDF.pdf" ) ) ;
1313 }
1414}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ static async Task Main(string[] args)
1515 {
1616 // Read the content as a string
1717 Stream responseBody = await response . Content . ReadAsStreamAsync ( ) ;
18- FileStream fileStream = File . Create ( "../../../Output/Output.pdf" ) ;
18+ FileStream fileStream = File . Create ( @ "../../../Output/Output.pdf") ;
1919 responseBody . CopyTo ( fileStream ) ;
2020 fileStream . Close ( ) ;
2121 }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ static async Task Main()
1515 // Create a new HttpClient instance for sending requests
1616 using var http = new HttpClient ( ) ;
1717 // Read all bytes from the input PowerPoint Presentation file
18- var bytes = await File . ReadAllBytesAsync ( @"Data/Input.pptx" ) ;
18+ var bytes = await File . ReadAllBytesAsync ( Path . GetFullPath ( @"Data/Input.pptx" ) ) ;
1919 // Create HTTP content from the document bytes
2020 using var content = new ByteArrayContent ( bytes ) ;
2121 // Set the content type header to application/octet-stream (binary data)
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ static void Main()
2626 using ( PdfDocument pdfDoc = PresentationToPdfConverter . Convert ( pptxDoc , pdfConverterSettings ) )
2727 {
2828 //Save the converted PDF document.
29- pdfDoc . Save ( "../../PPTXToPDF.pdf" ) ;
29+ pdfDoc . Save ( @ "../../PPTXToPDF.pdf") ;
3030 }
3131 }
3232 }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ static void Main()
2727 using ( PdfDocument pdfDoc = PresentationToPdfConverter . Convert ( pptxDoc , pdfConverterSettings ) )
2828 {
2929 //Save the converted PDF document.
30- pdfDoc . Save ( "../../PPTXToPDF.pdf" ) ;
30+ pdfDoc . Save ( @ "../../PPTXToPDF.pdf") ;
3131 }
3232 }
3333 }
Original file line number Diff line number Diff line change 33using Syncfusion . PresentationRenderer ;
44
55//Open the existing PowerPoint presentation.
6- using ( IPresentation pptxDoc = Presentation . Open ( @"Data/Template.pptx" ) )
6+ using ( IPresentation pptxDoc = Presentation . Open ( Path . GetFullPath ( @"Data/Template.pptx" ) ) )
77{
88 //Instantiate PresentationToPdfConverterSettings.
99 PresentationToPdfConverterSettings settings = new PresentationToPdfConverterSettings ( ) ;
1313 using ( PdfDocument pdfDocument = PresentationToPdfConverter . Convert ( pptxDoc ) )
1414 {
1515 //Save the PDF document to the file system.
16- pdfDocument . Save ( @"Output/PPTXToPDF.pdf" ) ;
16+ pdfDocument . Save ( Path . GetFullPath ( @"Output/PPTXToPDF.pdf" ) ) ;
1717 }
1818}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ static void Main()
2626 using ( PdfDocument pdfDoc = PresentationToPdfConverter . Convert ( pptxDoc , pdfConverterSettings ) )
2727 {
2828 //Save the converted PDF document.
29- pdfDoc . Save ( "../../PPTXToPDF.pdf" ) ;
29+ pdfDoc . Save ( @ "../../PPTXToPDF.pdf") ;
3030 }
3131 }
3232 }
You can’t perform that action at this time.
0 commit comments