Creating bookmarks

This Forum is for the use of End Users requiring help and assistance for Tracker Software's PDF-Tools.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
KTP9733
User
Posts: 8
Joined: Mon Nov 27, 2023 4:00 am

Creating bookmarks

Post by KTP9733 »

I need a little help creating bookmarks from text. I might be overthinking it, underthinking it, or just completely brain fried at the moment.

I'm trying to create bookmarks from text (seen in attached picture).
Screenshot 2023-11-26 211744.png


I have too many files to open each on, highlight the text and create that way. I would like to use the Match Text Pattern, but I'm having problems with regex. It doesn't like repeated periods and I'm not thinking straight to figure it out. Any help will be grateful.

Thanks.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Creating bookmarks

Post by TrackerSupp-Daniel »

Hello, KTP9733

That would appear to be a Table of contents. Generally, if you have a ToC, the Create bookmarks from page text function is not necessary, as you would want to use the "from table of contents" option instead (assuming you do not already have bookmarks in place, which is likely when you have a ToC already. To use this feature, simply activate the "select text" tool, and highlight the ToC pages you wish to create bookmarks from.
image.png
This option allows you to choose the separator type and such as desired, or leave it on the default, incase you have some variance to your table:
image(1).png
The "from page text" option is instead meant to be used with things like page titles, and other similar text which has relatively unique formatting, compared to the main "body" of your document, as examples:
image(2).png
image(3).png
Both of these are, as you can see, very unique from the main body text, and so using them as templates for formatting with the "from pages text" function, would allow you to generate bookmarks that point to their locations (if you did this with the ToC content however, you would likely get a few dozen bookmarks pointing to the same page).

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
KTP9733
User
Posts: 8
Joined: Mon Nov 27, 2023 4:00 am

Re: Creating bookmarks

Post by KTP9733 »

I know I can do it that way, however I have over 200 files, scanned from books, and your suggested way is not ideal. Since these are scanned from books, done by me, there are no bookmarks, links, etc. I am working on adding all that in to the 200 files. I figured there was a more productive way to add the bookmarks and links to all the files, instead of individually. By your suggestion, there must not be a bulk way of doing it. Thanks though.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Creating bookmarks

Post by TrackerSupp-Daniel »

Hello, KTP9733

You certainly could use the "bookmarks from page text" function to do this in bulk with PDF-Tools. Assuming that all of your 200 books use similar fonts/sizes/etc for their headers, it could be configured in a way to generate those quickly and in bulk, which was the purpose of my latter two screenshots. All I was meaning to convey is that if you already have a table of contents, it may be easier to use that to generate these, than trying to configure the "from page text" function to work in so many variations..

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
KTP9733
User
Posts: 8
Joined: Mon Nov 27, 2023 4:00 am

Re: Creating bookmarks

Post by KTP9733 »

Yes, all the files TOCs are set with the same format and range from 2 to 8 pages. I just wanted to find a simple way to apply bookmarks and links, using the TOCs, to all the files at once. I lack JS knowledge.

Since we're on the topic, would there be a way to simplify adding links on the index page to the page or section number?
image.png
image.png (22.4 KiB) Viewed 9522 times
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Creating bookmarks

Post by TrackerSupp-Daniel »

Hello, KTP9733

Yes, the "Create Bookmarks from ToC" feature offers an option enabled by default, to add links on the page inside the existing ToC which point to the newly generated Bookmarks. Similarly, the Generate ToC from bookmarks function will build the ToC with links to the relevant bookmark in question in place on that new page.
I am afraid that there is no way to take an existing ToC and existing bookmarks and automatically link them together however, it is a one or the other situation, so in your case, the most effective method would likely be to process each file one by one in the Editor, with the Create bookmarks from ToC function.

Beyond that, JS is not able to directly access base content, which would be what both of these functions need to function, so you would not be able to use JS in this context regardless. The features on our toolbars will need to be activated manually.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
KTP9733
User
Posts: 8
Joined: Mon Nov 27, 2023 4:00 am

Re: Creating bookmarks

Post by KTP9733 »

Well boo. :(

Thanks for the help.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17960
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Creating bookmarks

Post by Tracker Supp-Stefan »

:)
KTP9733
User
Posts: 8
Joined: Mon Nov 27, 2023 4:00 am

Re: Creating bookmarks

Post by KTP9733 »

So, I've gone down the long path of doing each file, separately, and this is the problem I am having. As you can see if the image, it's adding random lettering at the end of each bookmark and it added 0-6. Neither are not on the TOC. How can I fix the random letters?

Side note, I have to keep closing Editor and open it because it quits displaying text; all pages go blank until the PDF is reopened. Any idea why?
Attachments
Screenshot 2023-11-29 111554.png
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Creating bookmarks

Post by TrackerSupp-Daniel »

Hello, KTP9733

To look into the issue with generating bookmarks from the ToC, I would need a copy of the file in question to test with. If it contains any sensitive or not for public disclosure information, please email us with a link to this forum post and a copy of the file, via Support@pdf-xchange.com

As for the disappearing content, this would typically indicate that you have a damaged installation of the software. Please completely uninstall all of our software, then ensure that you download and rung the installer directly from our official website, and not from any third party download site, as they may tamper with the installers.

Ideally, you will want to use the installer presented on your account page, if you hold a license, but if not, you can check the downloads page.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
KTP9733
User
Posts: 8
Joined: Mon Nov 27, 2023 4:00 am

Re: Creating bookmarks

Post by KTP9733 »

I emailed the file.

Thanks for the help.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Creating bookmarks

Post by TrackerSupp-Daniel »

Hello, KTP9733

Thank you for sending that along. It appears that the text present here does actually include those items, which unfortunately will cause the automated bookmarking approach here to encounter issues:
image.png
As you can see, the "dots" in these lines of text appear to be incorrect, upon dissecting the file a bit further, I found that the ToC consists of two layers of invisible "searchable text" which is certainly further confusing the systems (I made it visible here so you can see why the computer is converting these incorrectly), this is what the PC reads your ToC as:
image(1).png
While I would like to suggest that our OCR would be a great solution to this issue (and it works well for the first two pages of your ToC), it does encounter some issues on the latter pages of the ToC due to the low quality of the scan. I will be emailing about this as well, but I would like to have your permission to share this file with the dev team, instead of deleting it immediately as a sensitive file. hopefully they can target these issues and improve the OCR for the future, to help navigate around text issues like this.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
KTP9733
User
Posts: 8
Joined: Mon Nov 27, 2023 4:00 am

Re: Creating bookmarks

Post by KTP9733 »

After doing some testing, I found that problem comes after using PDF Tools to optimize the files. I will email the original scan, so you can take a look at it and compare it to the other file. You can share them with your Dev team and might find what happened with optimizing. Not sure how the scans are poor quality, unless it became that way after optimizing. You have the two files to compare.
image.png
image.png (16.99 KiB) Viewed 9473 times
Thanks again. 8)
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Creating bookmarks

Post by TrackerSupp-Daniel »

Hello, KTP9733

Ahh, did you use the "optimize scanned pages" feature on this?
That tool does offer the ability to perform OCR and cna only do so as "searchable text" layers. If enabled, that would have the same issues I encountered when trying to work around this. Since the document already has a text layer, you would probably want to disable this option.

As for the quality drop, that could again be caused by the same function, as it is intended to keep quality just good enough for human perception while reducing the file size. You can adjust the settings on this so it is not so aggressive, but the settings you have currently do seem to make OCRing the pages more difficult later on. I will forwards this information to the Dev team, it seems we have our work cut out for us in two areas now!

Thank you for the help finding these issues, even if it seems both of them are not directly related to your reason for this post, the discussion certainly helped!

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
KTP9733
User
Posts: 8
Joined: Mon Nov 27, 2023 4:00 am

Re: Creating bookmarks

Post by KTP9733 »

Yes, I did. I do recall a banner popping up at the top asking about OCR, but I thought I clicked No. Anyways, glad I could give your Dev Team as task, :lol:

I've come across another problem, when creating the bookmarks. One section, of the TOC, doesn't highlight the text properly and I can't figure out why. It's happening in the original scanned file, so you'll be able to check it out. Just check out the screenshot. Just trying to highlight the second entry and this is how it is highlighting the text, which is throwing off creating links at the same time as the bookmarks. Maybe it's a setting?

How it highlights the text. This is the only section doing this; only the three lines containing the word WITH.
image.png


How the bookmark is created.
image(1).png


How the links are created.
image(2).png
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Creating bookmarks

Post by TrackerSupp-Daniel »

Hello, KTP9733

That would be caused by the original text layer which is present, not being ordered properly in the content order. In PDF, each object is effectively "in front" or "behind" all other objects, no two things exist on the same "plane" and the concept of layers is a bit skewed. As you can see here:
PDFXEdit_0pe0gPYtHv.gif
In the case of text selection, the content order on the page is very important, as a broad example, If you write sentence 1, and then realize you did not add a header to the page, do so, and then start writing sentence 2 after that, the header is labelled as "object 2" in the pages object order, in turn, selecting text from the start of sentence 1 to the end of sentence 2, will just so happen to also select the header which was added "in between" them from that perspective.

Now, I should say, we are working on changing our selection system to work in a "visual order" method, instead of relying on the actual PDF content order for these tasks, but it is a very complicated process, and requires a great deal of fine tuning. I expect that when complete, it will help to mitigate the secondary issue you are seeing that came about becuase of this selection order.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Post Reply