-
1. Re: Use external Javascript to control native PDF zoom
stevejking Nov 2, 2012 7:34 AM (in response to Steven Boese)You can access the zoom feature if you embed Pdfmarks in your document, eg. if you produce it via a postscript pdf printer (eg. Pdf 995) or distiller:
eg. if it's from an MS Office document you could insert an EPS file (text file with *.eps name, and insert as image) in the form:
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 72 72
%%Creator: Your Name Here if you like
%%Title: ZoomViewIn PDFMark
%%BeginProlog
/pdfmark where
{pop} {userdict /pdfmark /cleartomark load put} ifelse
%%EndProlog[ /Rect [ 0 0 72 72 ]
/Action << /Subtype /JavaScript
/JS (app.execMenuItem("ZoomViewIn");) >>
/Border [0 0 0]
/Subtype /Link
/ANN pdfmark -
2. Re: Use external Javascript to control native PDF zoom
Steven Boese Nov 2, 2012 7:53 AM (in response to stevejking)Can you call this from an external JS file?
-
3. Re: Use external Javascript to control native PDF zoom
stevejking Nov 2, 2012 8:35 AM (in response to Steven Boese)I've only really dabled with placing JS in the pdf.
This old thread might help you:
http://forums.adobe.com/message/4447169
particularly the pdf_open_parameters link near the bottom.
-
4. Re: Use external Javascript to control native PDF zoom
Steven Boese Nov 2, 2012 8:38 AM (in response to stevejking)It looks like it is not possible then. Thank you for your time. It would be great if Adobe made it possible...
-
5. Re: Use external Javascript to control native PDF zoom
Sabian Zildjian Nov 2, 2012 9:55 AM (in response to Steven Boese)If the PDF file is embedded in a frameset you can do this via Browser JS. There used to be an example in the Acrobat SDK so you might want to start there.
Here is a link to the area in the SDK that you want to use and the method I believe you would want to work with is "setZoom".
Sets the magnification according to the specified value.
void setZoom(FLOAT percent);
percent
The desired zoom factor, expressed as a percentage. For example, 1.0 represents a magnification of 100%.



