Free Support Forum - aspose.com

Save Word DOCX Document As PDF using C# .NET API Code | Preserve Page Margins during DOCX to PDF Conversion

Hi

i am upgraded to Aspose.Words 9.5.0 version and the pdf export method 'SaveAsPdf' is missing..please help me to find out a solution..also margin issue when convert from word to pdf using direct save method .


This message was posted using Aspose.Live 2 Forum

Hi

Thanks for your request. There were a few breaking changes to the API in the latest version. You can find full details of these changes in the migration article:

SaveToPdf method was replaced with Save method.

// Open source document
Document doc = new Document("test.docx");

// Save output document
doc.Save("out.pdf", SaveFormat.pdf);

Please let me know if you need more assistance, I will be glad to help you.

Best regards,