We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Pdf PageSetup.PageWidth/PageSetup.PageHeight properties have no effect if read in first using Aspose.Words and then converted to PDF

Hello,

I am in need of technical support with the current .NET versions of both Aspose.Words (8.0.0.0) and Aspose.Pdf (4.1.1.0).

The issue is that setting the Aspose.Pdf PageSetup.PageWidth/PageSetup.PageHeight properties have no effect if the document is read in first using Aspose.Words and then converted to PDF.

I have attached an extremely simple stand alone Visual Studio 2008 Console Application that replicates this issue.

I also am posting this in the Aspose.Pdf forum as well.

Thanks for your quick assistance.

Alex

Hi

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

Thanks for your inquiry. Can I ask you, why you do not use direct method of PDF conversion? In this case you can specify page size for each section before converting your document to PDF. Please see the following code:

// Open document

Document doc = new Document(@"Test088\in.doc");

foreach (Section section in doc.Sections)

{

section.PageSetup.PageWidth = 800;

section.PageSetup.PageHeight = 600;

}

// Save output PDF.

doc.SaveToPdf(@"Test088\out.pdf");

Hope this helps.

Best regards,

Hello Andrey,

Thanks for your quick reply!

Looks like that will work nicely for us. We will try that.

Thanks again!

Alex