Free Support Forum - aspose.com

Scale a PDF and print centered on page

I have a PDF that I am printing using the PdfViewer. If I set ScaleFactor before printing the PDF, it scales the content down. However, the content is pinned to the top left. I would prefer to have the content centered on the page. PdfViewer’s VerticalAlignment and HorizontalAlignment properties do not seem to affect the result.

How can I print the PDF using PdfViewer so it is centered on the page?

@conradherrmann

Thank you for contacting support.

Would you please share source and generated PDF file while explaining how do you want to scale the contents, by sharing a screenshot. So that we may investigate further to help you out.

Farhan,

Thank you for your response. It turns out that it was my own bug. VerticalAlignment was working properly. Please close this request.

Best regards,
Conrad

@conradherrmann

Thank you for your kind feedback.

Please keep using our API and in event of any further query, feel free to ask.