0

The datasheet of the WM8804 has the annoying behavior that when I click on some item on the table of contents (in the pane on the left), it goes to that page but resets the zoom level to "fit entire page". This behavior is present both with evince and with Firefox built-in PDF display.

I tried "recoding" the PDF with pdftk:

pdftk WM8804.pdf output WM8804-better.pdf

The annoying behavior disappears (now I navigate to a page ant it maintains the same zoom level I had set). However, I no longer have a table of contents (only thumbnails --- not good enough for navigation in a datasheet document).

The strange thing is: if I do pdftk WM8804-better.pdf dump_info, it looks like it does have the table of contents. This is a small fragment of the output:

[···]$ pdftk WM8804-better.pdf dump_info
···
NumberOfPages: 66
BookmarkBegin
BookmarkTitle: WM8804
BookmarkLevel: 1
BookmarkPageNumber: 1
BookmarkBegin
BookmarkTitle: 1:1 Digital Interface Transceiver with PLL
BookmarkLevel: 1
BookmarkPageNumber: 1
BookmarkBegin
BookmarkTitle: DESCRIPTION
BookmarkLevel: 1
BookmarkPageNumber: 1
BookmarkBegin
BookmarkTitle: FEATURES
BookmarkLevel: 1

I tried saving the dump_info data and try with update_info --- the table of contents is back, but so is the annoying behavior with the zoom level. I even removed all of the lines describing pages, the ones like:

PageMediaBegin
PageMediaNumber: 50
PageMediaRotation: 0
PageMediaRect: 0 0 595 842
PageMediaDimensions: 595 842

before running again the update_info command. The resulting PDF still shows the table of contents, but still exhibits the annoying behavior.

How do I fix this? (i.e., how do I get the table of contents but eliminate the annoying behavior with the zoom level?)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.