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

Free Support Forum - aspose.com

Crop the pdf and set the origin again to 0,0

The requirement is , we want the user to use the template of the correct size , if user uses incorrect template, we need to set the template back to correct size , so we want to crop the file to the correct template media box size based on the center point – trim equal amounts off both sides, and top/bottom. And we * If we do trim*, then we may need to re-set the origin to 0,0 again.

Please assist as to how to do this, Asap help would be greatly appreciated

@sourabhp

Thank you for contacting support.

Would you please explain your requirements a little more. Please clarify which file formats and Aspose API are you working with. Are you editing a Word or a PDF document. However, you may visit below links for your kind reference if you are manipulating a PDF document.

We hope this will be helpful. Please elaborate your requirements while sharing sample data, if any, so that we may investigate further to help you out.

Hi Farhan,
So my requirement is

  1. i have certain templates that user uses and if there is change in the template size , we want to recreate the template to fit in the actual template size and place the content positioned equally from left/right and top/bottom which the user has uploaded .

@sourabhp

Please elaborate the file format you are working with, while sharing sample files so that we may help you accordingly. Moreover, please visit suggested documentation articles if you are working with PDF format files.