Clickable Bookmarks for Bentley Mark IV Service Manual PDF ... TOC + FULL INDEX

ejb11235

Active member
Joined
Jun 15, 2020
Location
Seattle
TDI
2005 Jetta TDI Mk IV
There's a PDF of the Bentley manual out there. The file is "Bentley - Volkswagen Jetta, Golf, GTI MK4 Service Manual- 1999-2005 - OCR.pdf"

It's OCR'd and the quality is high, but it doesn't have any bookmarks. At almost 2,000 pages, it's a pain to navigate around.

I've generated a set of bookmarks for all of the chapter & section starts, and the Jetta TDI wiring diagrams. The bookmarks can be placed into the pdf using pdftk, which is available for windows and linux, and I assume mac.

EDIT: It appears that it's a bit of a pain to install PDFTK on a Mac. One solution is to use a linux virtual machine.

Here's the command line to insert the bookmarks...modify the filenames as needed:
Code:
pdftk Bentley_VolkswagenJettaGolfGTI_MK4ServiceManual_1999-2005.pdf update_info bookmarks.txt output Bentley_VolkswagenJettaGolfGTI_MK4ServiceManual_1999-2005_Bookmarks.pdf
EDIT: bookmarks file available on github

Sample bookmarks Store the following bookmark definitions in a file called "bookmarks.txt" to work with the command above. I made an Excel spreadsheet to generate this so it's easy to add more entries.
Code:
BookmarkBegin
BookmarkTitle: ii ... Important Safety Notice
BookmarkLevel: 1
BookmarkPageNumber: 2
...
BookmarkBegin
BookmarkTitle: 97-878 ... No. 81/16 (Lanes 197 - 210)
BookmarkLevel: 3
BookmarkPageNumber: 1808
 
Last edited:

KrashDH

Top Post Dawg
Joined
Dec 22, 2013
Location
Washington
TDI
2002 Golf
Thanks for the legwork on this! I have that pdf and it's great, but it takes A minute to find what you're looking for! I'll have to give this a go
 

ejb11235

Active member
Joined
Jun 15, 2020
Location
Seattle
TDI
2005 Jetta TDI Mk IV
Thanks for the legwork on this! I have that pdf and it's great, but it takes A minute to find what you're looking for! I'll have to give this a go
Cool! This makes me happy that someone found it useful. Let me know if you have any difficulties. Also, I spent a ton of time figuring out how to read the wiring diagrams.

I have posted the speadsheet and the bookmark text file in a github repository, available here.

Windows PDFTK available here: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
 
Last edited:

Nuje

Top Post Dawg
Joined
Feb 11, 2005
Location
Island near Vancouver
TDI
2015 Sportwagen; Golf GLS 2002 (swap from 2L gas); 2016 A3 e-tron
Great idea - thanks for the legwork!
I couldn't get it to work on Mac; tried it with Win7, though, and the test command (pdftk -version) worked!

Followed your instructions, and it completed without any error messages, and I got an output file, but....no bookmarks added (at least, none that work in Mac Preview.app).
 

ejb11235

Active member
Joined
Jun 15, 2020
Location
Seattle
TDI
2005 Jetta TDI Mk IV
Great idea - thanks for the legwork!
I couldn't get it to work on Mac; tried it with Win7, though, and the test command (pdftk -version) worked!

Followed your instructions, and it completed without any error messages, and I got an output file, but....no bookmarks added (at least, none that work in Mac Preview.app).
In Mac Preview, go View --> Show Table of Contents On my MacBook that displays a sidebar that has all the bookmarks. Let me know if that works.

In Adobe Acrobat Reader on Windows 10, go View --> Show/Hide --> Navigation Pane --> Bookmarks, or just click on the bookmark icon on the left.
 

Nuje

Top Post Dawg
Joined
Feb 11, 2005
Location
Island near Vancouver
TDI
2015 Sportwagen; Golf GLS 2002 (swap from 2L gas); 2016 A3 e-tron
Ahhh - there we go; awesome!
(I was thinking that the Bookmarks would be hyperlinked text in the table of contents itself on Page 3. This is almost as good; thanks again!)
 

ejb11235

Active member
Joined
Jun 15, 2020
Location
Seattle
TDI
2005 Jetta TDI Mk IV
Ahhh - there we go; awesome!
(I was thinking that the Bookmarks would be hyperlinked text in the table of contents itself on Page 3. This is almost as good; thanks again!)
Yay! Yeah I hadn't even thought about having hypertext ... I wish I knew how to do that! Cheers
 

KrashDH

Top Post Dawg
Joined
Dec 22, 2013
Location
Washington
TDI
2002 Golf
Can confirm this works great on Windows 10, thanks again! 100x easier to navigate now!!



A couple of tips for people doing this the first time:

  • Store your original Bentley .pdf and your downloaded files from @ejb11235 in the same folder
  • Shift+Right Click on that folder (where everything is stored) and choose the option--->Open Powershell Window Here
  • It's easiest to copy the code in the first post (single line) for the filename and re-name your Bentley .pdf to that...it allows simple copy-paste of the code into the powershell command instead of typing your filename all the way out in it
  • It will look like nothing is happening but it's running in the background. Wait for it to finish then check your folder. You'll now have the original .pdf and the "_bookmarks".pdf
 

Nuje

Top Post Dawg
Joined
Feb 11, 2005
Location
Island near Vancouver
TDI
2015 Sportwagen; Golf GLS 2002 (swap from 2L gas); 2016 A3 e-tron
Let me guess, you wear a cape and fight crime in your spare time as well. ;)
(Seriously - thanks for your work on this!)
 

ejb11235

Active member
Joined
Jun 15, 2020
Location
Seattle
TDI
2005 Jetta TDI Mk IV
yes well, there is that too, but I hardly have time anymore, with all my other activities :rolleyes:
 

ejb11235

Active member
Joined
Jun 15, 2020
Location
Seattle
TDI
2005 Jetta TDI Mk IV
Ok! I got it all done. I've added an set of bookmarks for virtually all of the entries in the index. The biggest omission is that I only have links for the 2005 Jetta TDI wiring diagrams. If someone wants me to update another year or model and is willing to compile the data, let me know and I'll tell you what to do and I can update the files to generate new bookmarks.

There is a certain irony to this ... yesterday I finally discovered the cause of my Jetta non-running ... the engine speed sensor reluctor is missing a tooth. Probably too expensive to fix, so it doesn't look like I'm going to be an active TDI owner anymore. But I am cooking up an interesting idea for how to fix it electronically.

But I wanted to finish what I started and give back to the community rather than just coming here for trouble-shooting advice.

Bookmark files available here: https://github.com/onetalltree/bentley-mark-iv-service-manual-bookmarks
 

Nuje

Top Post Dawg
Joined
Feb 11, 2005
Location
Island near Vancouver
TDI
2015 Sportwagen; Golf GLS 2002 (swap from 2L gas); 2016 A3 e-tron
Very cool! Thanks again.

There's an up-to-date PDFtk installer available here: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg

I was able to run it on Mac and get an output file, just using the command you provided earlier, in Terminal.
Code:
pdftk ./Bentley_VolkswagenJettaGolfGTI_MK4ServiceManual_1999-2005.pdf update_info bookmarks.txt output ./Bentley_VolkswagenJettaGolfGTI_MK4ServiceManual_1999-2005_Bookmarks.pdf
However, the "hyperlinks" in the indexes don't work. I get the little pointer finger when I hover, but clicking gives me a little error "honk" and nothing else.


I'll try it again in my Windows VM when I have a chance.
 

ejb11235

Active member
Joined
Jun 15, 2020
Location
Seattle
TDI
2005 Jetta TDI Mk IV
Very cool! Thanks again.

There's an up-to-date PDFtk installer available here: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg

I was able to run it on Mac and get an output file, just using the command you provided earlier, in Terminal.
Code:
pdftk ./Bentley_VolkswagenJettaGolfGTI_MK4ServiceManual_1999-2005.pdf update_info bookmarks.txt output ./Bentley_VolkswagenJettaGolfGTI_MK4ServiceManual_1999-2005_Bookmarks.pdf
However, the "hyperlinks" in the indexes don't work. I get the little pointer finger when I hover, but clicking gives me a little error "honk" and nothing else.


I'll try it again in my Windows VM when I have a chance.
I think you're clicking on the wrong thing. Remember that what I've added is bookmarks, which are viewable in a separate window. I didn't touch the index in the PDF itself ... I think your viewer is trying to interpret those as telephone numbers, but I didn't have anything to do with that. I'm guessing you would see that even in your original PDF. Let me know how it goes. I would love to be able to edit the actual index and add hyperlinks, but that's a serious learning curve on how to manage PDFs programmatically.

 

Nuje

Top Post Dawg
Joined
Feb 11, 2005
Location
Island near Vancouver
TDI
2015 Sportwagen; Golf GLS 2002 (swap from 2L gas); 2016 A3 e-tron
Riiiiiight. My bad.

Works as promised (by you), not as hoped (by me). :)

But still - nice work!! Thanks a lot for all of the effort in putting that together and providing fairly fool-proof instructions.
 

ejb11235

Active member
Joined
Jun 15, 2020
Location
Seattle
TDI
2005 Jetta TDI Mk IV
@nuj
Yeah I wish I knew how to do that ... I spent more than a little time exploring. It seems like I should be able to build a document that has all the link information, turn it into a PDF and then merge it with the Bentley PDF. But I don't know how. :unsure: ... the problem with the index is that it's a lot of entries, so anything that requires manual work is a non-starter. There are some libraries out there that appear that they could do the job, but the licensing is $600.
 

Nuje

Top Post Dawg
Joined
Feb 11, 2005
Location
Island near Vancouver
TDI
2015 Sportwagen; Golf GLS 2002 (swap from 2L gas); 2016 A3 e-tron
I used PDFexpert (Mac app) to successfully add a couple of hyperlinked titles from the index page at the beginning of the first "chapter", but like you said - it's a manual process, and therefore, would take dozens (maybe low-hundreds?) of hours.
 

ejb11235

Active member
Joined
Jun 15, 2020
Location
Seattle
TDI
2005 Jetta TDI Mk IV
I am really curious about this and have started exploring some PDF libraries that would allow me to create in-document hyperlinks to pages. They are paid products, but they have free demo periods. The most likely scenario would be to add additional pages to the end of the manual that has an index. Ideally I could make a stand-alone document that could be added to the end of the Bentley pdf ... not sure if that's possible.
 

KrashDH

Top Post Dawg
Joined
Dec 22, 2013
Location
Washington
TDI
2002 Golf
Just wanted to say that since I got a second laptop, I found this thread and re-ran the script so I could have the indexable manual on both computers. Still works great for anyone wanting to do this to make finding things a breeze!
 

ejb11235

Active member
Joined
Jun 15, 2020
Location
Seattle
TDI
2005 Jetta TDI Mk IV
Just wanted to say that since I got a second laptop, I found this thread and re-ran the script so I could have the indexable manual on both computers. Still works great for anyone wanting to do this to make finding things a breeze!
It's cool to see that this still has life. I had to sell my TDI due to other issues, so I am no longer part of the TDI family :(. But it was nice to give back to the community.

One thing I would like to point out is that the clickable indexes get baked into the PDF, so if you transfer the PDF you make to another computer, it will still have the functionality. Good to know that everything is still working.

The nicest solution to this would be to simply post the new PDF where people could download it without having to do the extra work. I just didn't want to do that due to copyright issues.
 

KrashDH

Top Post Dawg
Joined
Dec 22, 2013
Location
Washington
TDI
2002 Golf
It's cool to see that this still has life. I had to sell my TDI due to other issues, so I am no longer part of the TDI family :(. But it was nice to give back to the community.

One thing I would like to point out is that the clickable indexes get baked into the PDF, so if you transfer the PDF you make to another computer, it will still have the functionality. Good to know that everything is still working.

The nicest solution to this would be to simply post the new PDF where people could download it without having to do the extra work. I just didn't want to do that due to copyright issues.
Nice I didn't realize I could just transfer it so I went ahead and just ran it again on my new laptop, which wasn't a big deal.
Yeah I hear you on the copyright issues though...
 

benmarks

Veteran Member
Joined
Jun 14, 2003
Location
Portland, OR
TDI
2004 Jetta GLS Sedan Platinum Gray
I got this to work as expected on my Mac using HomeBrew to install the pdftk binary. For those that don't know, HomeBrew is an open source command line tool, i.e. a "package manager" similar to rpm or yum on Linux. The exact steps for a Mac user would be as follows. If it sounds oversimplified, I am writing this for someone who may not be familiar or comfortable with Terminal:

1. Install HomeBrew: https://brew.sh
2. Install pdftk: brew install pdftk-java
3. Create a folder on your Desktop (or anywhere) and put the Bentley PDF and bookmarks.txt files in it.
4. In Terminal, run this command which assumes you put everything in a folder on your Desktop:

pdftk ~/Desktop/Bentley/Bentley.pdf update_info ~/Desktop/Bentley/bookmarks.txt output ~/Desktop/Bentley/Bentley_with_Bookmarks.pdf

(I renamed the original service manual "Bentley.pdf" but you can rename the original and destination files to whatever you want.)

HomeBrew should add the command to your user profile so that you can just type the command pdftk in Terminal no matter what your working directory is, but if you get an error like "command not found," then you can either add it to your profile yourself or you can navigate to where HomeBrew installs the pdftk binary:

/usr/local/Cellar/pdftk-java/3.3.1/bin
 
Top