Free Support Forum - aspose.com

SaveToPDF changing margins

I have an MS Word document that uses non-standard (smaller than normal) margins, has a table in the document, uses an 8.5pt arial font, and uses automatic sizing of the columns in the table. When I use SaveToPDF(), the resulting PDF grows to 2 pages (it was 1 page as a Word doc) and the table runs off the right side of the page. The text in the columns is wrappped in places in the PDF where it was not wrapped in the Word document.

Does ASPOSE Words not read the margins from the Word document during the constructor call? Is there a way to read the margins in the Aspose.Words.Document object and apply the same margins to the SaveToPDF options? It's important to us that the PDF produced is no different from the Word document.

Some additional info: I tried reproducing the behavior with a new MS Word document. The margins and odd font size do not seem to make a difference but the columns not being set to an absolute width causes similar behavior (does not cause table to overrun right side of page but does cause additional text wrapping in the output PDF such that the PDF requires more page height.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Could you please attach your input document here for testing? I will check the problem on my side and provide you more information.

Best regards,

Here’s an example Word document

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I cannot reproduce the problem on my side using the latest version of Aspose.Words (8.2.0). You can download this version from here:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

Best regards,