Wednesday, February 29, 2012

PDF Bookmarks: Change Zoom level and Name of PDF Bookmarks

If you are wanting to change the Bookmark zoom level on a bunch of your PDF bookmarks in Adobe Acrobat, or just modify the name of your bookmarks, here is the easy way to do it:


Use JPDFBookmarks:

http://sourceforge.net/projects/jpdfbookmarks/



And follow these instructions:

  1. Modify one of your bookmarks to inherit the zoom (or choose whatever type of zoom you want)
  2. Download JPDFBookmarks
  3. Open the zip file and extract the files, then open JPDFBookmarks.
  4. Open your PDF file in JPDFBookmarks.
  5. Dump the bookmark data to a text file using JPDFBookmarks with the command Tools>Dump.
  6. Find the bookmark you edited (in the text file that opens,) copy the correct portion of the text associated with your edited bookmark that is different from all the other bookmarks, such as TopLeftZoom,0,0,0.0, and replace the other setting on all the other bookmarks, such as FitWidth, -6,  using Find and Replace in Notepad.
  7. Change the name of any bookmark as well, by editing the name of the bookmark.
  8. Save the changes to the text file.
  9. In JPDFBookmarks, load the bookmark data back using Tools>Load
  10. Save the file in JPDFBookmarks. 
  11. Open the PDF in Adobe Acrobat, and the bookmarks are fixed.

This is a great open source solution for working with PDF bookmarks, and changing the zoom level of existing PDF bookmarks.

See also:

http://www.serpentus.com/2011/05/10/acrobat-set-all-bookmarks-to-inherit-zoom/

Keywords:

Rename many PDF Bookmarks
Inherit Zoom
Fit Page
Actual Size
Fit Width
Fit Visible
Named Destination
pdf bookmarks inherit zoom
dozens hundreds thousands many bunch
edit PDF bookmarks

7 comments:

  1. Hey man, just wanted to thank you for this solution. I've been trying to do this for a while, and none of the other suggestions have worked. My documents are now actually readable!

    ReplyDelete
  2. Hi, I actually can make an adition to the solution that hopefuly may be helpful for someone. I used Notepad++ for the search and replace process. With it, you can use wildcards and make the process a bit faster and accurate. This is an example of how i made the search:

    Search: FitWidth...
    Replace: TopLeftZoom,0,0,0.0

    With "." it finds any character. In this case it founds the expression: "FitWidth,-5" and changed it correctly.

    ReplyDelete
  3. Thanks for the tip, this works great and it's also safer as it doesn't involve loading and saving the whole PDF file in a text editor...

    JPDFBookmarks will however open the resulting text file automatically with the default text editor, in my case plain old Notepad. Obviously, that's something better avoided as Notepad isn't the most reliable text editor available. The above mentioned Notepad++ will do the job, though I use EditPlus 3.

    Here's how I replace all zoom entries at once with the inherit zoom setting (check "Use Regular Expressions" and enter the text below without the ""):

    Find what: "(open,).*\n"
    Replace with: "\1TopLeftZoom,0,0,0.0\n"

    ReplyDelete
  4. I realized that bookmarks are defined as open or closed. The above RegExp replacement will only replace those bookmarks defined as open. You'll have to do another replacement for all closed bookmarks (same patterns except for changing "open" to "closed"):

    Find what: "(closed,).*\n"
    Replace with: "\1TopLeftZoom,0,0,0.0\n"

    ReplyDelete
  5. I wrote a small java application which is based on the PDF Clown library. It allows you to easily apply various bookmark configurations, such as 'Inherit zoom', to multiple PDF files within a desired directory.

    This is my first public project and due to the fact that I'm taking my exams in the next couple of weeks, I'm running out of time. But afterwards, which should be in mid-February, I'll keep on developing.

    In the meantime, feel free to use the application and give some feedback.

    https://bitbucket.org/beatngu13/pdfbookmarkwizard/downloads

    ReplyDelete
  6. Fantastic. Thank you so freaking much.

    ReplyDelete