Hello, I have been testing Aspose.PDF. I am trying to resize an existing PDF doc and adding some simple text on it in the bottom right corner.
We do not want the text to be overlapping any of the document contents, so we are adding a “gutter” to the bottom.
I am able to successfully resize the page and add the stamp. However, the issue I am facing now is that the Page.SetPageSize() adds the “extra” height to the top. I understand that Aspose views the bottom left corner as the starting point and it makes sense why this happens but I am curious how to effectively add the extra space to the bottom of the page?
Do I have to move all the content on the page individually??
Thank you for contacting support.
You may simply Resize Page Contents of PDF document from bottom of the page so that empty space is created and then add text in bottom right corner as per your requirements.
We hope this will be helpful. Please feel free to contact us if you need any further assistance.
This is not exactly what I am looking for as it distorts the content of the page. I am looking to expand the page height by about 10 to 20 px without altering the content of the PDF. Page.SetPageSize() does this, however, it adds the extra space to the top. How can I add it to the top without altering the content?
Please also note that the contents can be resized in points as well where 10 or 20 points/pixels would not probably distort the contents. If you still prefer resizing the page then please share your source and generated files with us so that we may investigate accordingly.
After doing some more testing, I think your purposed way is going to work. It is not ideal and would like to extend page size. I will put together some code and test results to show you what exactly I’m looking for.
Thanks for the help.
Please take all the time you need and feel free to get back to us as per your convenience.