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

Free Support Forum - aspose.com

Problem with zooming of Pdf FIle

Hey there

I have a problem with zooming of pdf files

When i apply this code

com.aspose.pdf.Document doc=new com.aspose.pdf.Document("C:/Users/himran/Documents/Original.pdf");

@SuppressWarnings("deprecation")

GoToAction action = new GoToAction();

action.setDestination(new XYZExplicitDestination(0, 0, 0, 5));

((IDocument) doc).setOpenAction(action); doc.save("Zoomed_pdf.pdf");

Then open my new file, the viewer zoom percentage is changed by 500 % which has no effect on the file

On the other hand my requirement is that the data or text in the file should be permenantly enlarged to some value

Can u help


My sample file is also attached...

Hi Hafsa,


Thanks for contacting support.

Please note that when using setDestination(…) method, you specify the zoom factor at which document should open when trying to view it in PDF viewer application. As per your code, the document should open at 500% zoom factor.

In case you need to large the file contents, you may consider parsing each text object inside PDF and change its font size to some higher value. For more information, please visit Replace Text in Pages of a PDF Document

Hey there it is not the solution of my problem…
I need some solution to enlarge all the document permanently to some zoomed percentage value…

Is it possible through aspose

Hafsa101:
Hey there it is not the solution of my problem…
I need some solution to enlarge all the document permanently to some zoomed percentage value…

Is it possible through aspose
Hi Hafsa,

Thanks for sharing the details.

I have again tested the scenario using following code snippet (based on code shared in your first post) and as per my observations, when viewing the resultant PDF, the document is opened at 500% zoom and all page contents appear in larger size. Can you please share some more details (what exactly do you mean by permanent zoom factor for page contents). Do you mean the contents should be enlarged instead they appear large when viewing PDF document ?

yes i want them to be permanently enlarged to some zoom percentage value other than just viewing them on some higher zoom value.

Hafsa101:
yes i want them to be permanently enlarged to some zoom percentage value other than just viewing them on some higher zoom value.
Hi Hafsa,

Thanks for sharing the details.

I am afraid the requested feature is
currently not supported but for the sake of implementation, I have logged this
requirement in our issue tracking system under New Features list as PDFNEWJAVA-34653.
We will further investigate this requirement in details and will keep you
updated on the status of a correction. <o:p></o:p>

We apologize for your inconvenience.

Okay thankyou, i will be waiting for such feature