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

Free Support Forum - aspose.com

PdfFileSecurity is removing the Zoom Behavior

Our product stores PDF files in an archive form which they can be viewed or distributed later. For View we apply privilege settings based on a profile. When we do that, the Zoom Behavior gets set to default. I can't find a way to set it back using the PDF API. Searching on zoom behavior just gets me hits on Aspose.Words for saving as a PDF, which is how I set it in the first place. Is there a way to set what Aspose.Words refers to as "Zoom Behavior" using Aspose.PDF?

Thanks.

Hi Scott,


Thanks for your inquiry. Please check following code spinet to set zoom factor of a PDF document. Hopefully it will help you to accomplish the task.

ddouble zoom = 1.2;

// instantiate new Document object

Document doc = new Document(myDir + "input.pdf");

GoToAction action = new GoToAction(new XYZExplicitDestination(doc.getPages().get_Item(1), 0, 0, zoom));

doc.setOpenAction(action);

doc.save(myDir + "Zoomed_pdf.pdf");

Please feel free to contact us for any further assistance.


Best Regards,