03-07-2020, 05:48 AM
(03-24-2019, 06:47 PM)itsme Wrote: Many PDF readers support clickable bookmarks. This is very helpful to navigate to a certain song when you use a PDF fakebook outside MSP.This is immensely helpful! Thank you. I'm trying to avoid using yet another application (LibreOffice) to get there. Looking at your list of LibreOffice edits (which I've italicized sections of below), I have a couple questions that will help me use my existing software (that I'm already using to create the CSV file for MobileSheets import) instead:
If you already have a CSV file for a certain PDF file you can easily use it as input to add bookmarks to the PDF.
Before you start
---
- make sure that the required programs are available
LibreOffice Calc is used to prepare the bookmarks file
jPDFBookmarks is used to add the bookmarks list to the PDF
https://sourceforge.net/projects/jpdfbookmarks/files/
both are available for free and should be usable on various platforms
I did the following on Win10
- make backup copies of the CSV file and PDF file (just in case)
Convert the CSV file to a bookmarks file
---
- open the CSV file with LibreOffice Calc
select the correct encoding and separator
- delete all columns except TITLE and PAGES
- delete the column header line
- delete other unnecessary lines if required
(e.g. CSV files that were posted by me often contain a line that refers to the complete book)
- edit PAGES of multi page songs so that only the start page remains
e.g. edit "9-11" or "9,10,11" to "9"
- sort the lines by PAGES or by TITLE as you like to see the bookmarks in the resulting PDF
- save the edited file as "bookmarks file"
File > Save As... (Datei > Speichern unter ...)
choose "File Type" (Dateityp) "CSV"
uncheck "Automatic file name extension" (Automatische Dateiendung)
check "Edit filter settings" (Filtereinstellungen bearbeiten)
specify the filename for the bookmarks file, use .txt as file extension
- as soon as you click "Save" (Speichern), the window "Export Text File" (Textdatei exportieren) opens
select "Character set:" (Zeichensatz) "Western Europe (ISO-8859-1)" (Westeuropäisch (ISO-8859-1))
set "Field delimiter:" (Feldtrenner) to "/" (without the quotes)
click OK
Create bookmarks with jPDFBookmarks
---
- open the PDF with
File > Open ...
- open the bookmarks file created as above with
Tools > Load
- save PDF with bookmarks with
File > Save as ...
choose a new name, e.g. add -bookmark to the original filename
- check the result
I used the default settings of jPDFBookmarks for a minimalistic approach.
Clicking a bookmark jumps to the top of the given page and scales that page to the width of the current window.
You might have to scroll down to find the song you are looking for.
Example
---
I used "Kinder wollen singen" as an example to find out how bookmarks can be created easily.
See https://www.zubersoft.com/mobilesheets/f...&pid=24797
You can find a sample bookmarks file there
. . .
select the correct encoding and separator - my software uses the semi-colon but I can change it to the forward slash if that's necessary for this purpose, but what do I need to know about the "correct encoding"? I should note that my software is German, so I presume it's defaulting to an encoding that works there.
. . .
- edit PAGES of multi page songs so that only the start page remains - my software exports a separate field for this
e.g. edit "9-11" or "9,10,11" to "9"
- sort the lines by PAGES or by TITLE as you like to see the bookmarks in the resulting PDF - no problem for me
. . .
- select "Character set:" (Zeichensatz) "Western Europe (ISO-8859-1)" (Westeuropäisch (ISO-8859-1)) - what default encodings could hurt me?
. . .
Thanks! The rest looks pretty easy with JpdfBookmarks, which I've already downloaded and can run on a desktop that has Java Runtime installed already. Will I need to worry about updates to the Jave Runtime breaking JpdfBookmarks?
- Kevin