3 Replies Latest reply on Jul 6, 2012 7:33 PM by Mike Wickham

    How do I set the default PDF zoom level?

    jaloren28 Level 2

      I am writing a batch PDF script. I want to set the default zoom level to 125%. I believe these are the book properties I need to use:

      • PDFZoomType
      • PDFZoomFactor

       

      My understanding is that I need to set ZoomType to Constants.FV_PDFZoomNone. Then,  I can set the zoom level to whatever percentage I want using the ZoomFactor property. However, no matter what number I set, the default zoom level is never set to what I want. The extendscript documentation says this about the ZoomFactor property.

       

      DFZoomFactor property denotes the zoom percentage of the PDF document (metric 25% to 1600%).

       

      My guess is I don't understand how to set the "metric of a percentage". What does that mean? How do I set this property correctly and am I using the correct property to begin with?

       

      Thanks,

      Joe

        • 1. Re: How do I set the default PDF zoom level?
          Mike Wickham Level 4

          I don't know if this helps, but you can set the zoom level with PDFMarks in a PostScript box in your FM document. Following is sample code that I use in a text frame in my FM document. I use a separate file at the beginning of my books for this and other PDFMark information, but I believe you can also insert it as a separate frame, anywhere in your FM document-- including just drawing a box in a page margin.

           

          1. Create a text frame and insert your code. The sample code below shows no bookmark or thumbnails panel, opens at page one, and sets initial view to 125% zoom:

           

          /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse

          [ /PageMode /UseNone /Page 1 /View [/XYZ 0 0 1.25] /DOCVIEW pdfmark

           

          2. Right-click the text frame, choose Object Properties, and then delete any flow tag and check the PostScript Code box. This makes the text frame uneditable and tells FM to treat it differently. (It doesn't print.)

           

          3. That's it. FM will process the code when you print to PDF.

           

          For other PDFMark settings, check out the PDF Reference from Adobe. If it doesn't still come with FrameMaker, you can download it from the Web. Unfortunately, it is not complete. As I recall, I found the most help from PDFMark Primer, available here:

          http://www.pdflib.com/developer/technical-documentation/books/pdfmark-primer/

          • 2. Re: How do I set the default PDF zoom level?
            jaloren28 Level 2

            Hi Mike,  Just goes to show you learn something every day. I had no idea that PDF marks existed nor did I notice that postscript code check box in framemaker .  This is definitely a potentially useful way to go about it. Btw,  I did find kinda sorta way to do this with Extendscript but its really kludgy. You have to save each file to MIF, edit the MIF statements, and then save the file back to FM. See here for details:  http://forums.adobe.com/message/4534792#4534792  I suspect that your method would make the script run faster. The downside is that I'd actually have to learn PDFmarks but it doesn't look to complicated (knocks on wood). I'll give it a shot.  Thanks, Joe

            • 3. Re: How do I set the default PDF zoom level?
              Mike Wickham Level 4

              I imagine that it will be easier for you to put together than it was for

              me, since I know nothing of scripting. I just started with a small

              pdfmark snippet someone once posted on one of the forums and was able to

              look up the other settings from there in the sources I previously

              posted.  That /PDFMark Primer/ was especially useful and way better than

              Adobe's /PDFMark Reference/. (Oops... mistyped that as PDF Reference in

              the last message.)

               

              Here's the pdfmark code I put in a PostScript text frame at the

              beginning of my books. I made the data generic so that others can modify

              it. Feel free to use it as a starting point to create your own

              PostScript code frame:

               

              /pdfmark where {userdict /pdfmark /cleartomark load put} ifelse

              % Items below populate the File Info dialog box in FrameMaker. These are

              reserved definitions.

              % They also populate the Description and Custom tabs in the PDF Document

              Properties dialog.

              % Put user data between parentheses. Retain parentheses.

              % Note that curly quotes and copyright symbols do not transfer through,

              but can be added in Acrobat.

               

              [ /Author (Author Name)

              /Title (Your Book Title Here)

              /Subject (Your subject here.)

              /Keywords (Your keywords here)

              /Copyright ((C) 2012 Author Name. All rights reserved.)

              /WebStatement (http://yourdomain.com)

              /JobRef ()

              /Marked (True)

               

              % Items below create custom metadata fields on the Custom tab in the PDF

              Document Properties dialog.

              /Publisher (Company Name)

              /Street (Your Address)

              /CityStateZip (Your City, State, Zip)

              /Country (USA)

              /Phone ((555) 555-5555)

              /E-mail (yourname@yourdomain.com)

              /ISBN_Soft_Cover (ISBN 978-n-nnnn-nnn-n Soft Cover)

              /ISBN_Hard_Cover (ISBN 978-n-nnnn-nnn-n Hard Cover)

              /Website (yourdomain.com)

              /DOCINFO pdfmark

               

              % Items below set initial view in PDF.

              [ /PageMode /UseNone /Page 1 /View /Fit /DOCVIEW pdfmark

              [ << /PageLayout /TwoColumnRight >> /PUT pdfmark [ << /ViewerPreferences << /DisplayDocTitle true >> >> /PUT

              pdfmark