How to save bookmarks to the file

Asked by Laureano on 2020-07-11

Hello.
It seems bookmarks have a very ephemeral condition. Any change on the file name or path make them vanish.
is there a way to save that information to the file?

Question information

Language:
English Edit question
Status:
Answered
For:
qpdfview Edit question
Assignee:
No assignee Edit question
Last query:
2020-07-27
Last reply:
2020-07-27
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Adam Reichold (adamreichold) said : #2

Hello Laureano,

I am sorry for not answering on time. As we are trying to avoid collecting history data by default, bookmarks, tabs and per-file settings are ephemeral and are a lost when the application exits. But you can enable the "Restore bookmarks" etc. settings via the settings dialog to enable these entities to be stored persistently.

Best regards,
Adam

Laureano (laureanogasparin) said : #3

Thank, you, Adam.

Sorry, it seems i was not clear enough in my question.

I have those options enabled. But if you rename or move the file the
bookmarks (and other settings) are lost as the file is no longer "the same".

that's why I asked if there may be a way to store that data "to the
file". But may be the question has no sense because when you say
"bookmark" you mean something external to the file by its own definition.

The thing is that I sometimes move my files from one folder to another,
or change their names, and then I lose bookmarks. so I was thinking if I
could do something to preserve bookmarks

On 27/07/2020 12:20, Adam Reichold wrote:
> Your question #691809 on qpdfview changed:
> https://answers.launchpad.net/qpdfview/+question/691809
>
> Adam Reichold posted a new comment:
> Hello Laureano,
>
> I am sorry for not answering on time. As we are trying to avoid
> collecting history data by default, bookmarks, tabs and per-file
> settings are ephemeral and are a lost when the application exits. But
> you can enable the "Restore bookmarks" etc. settings via the settings
> dialog to enable these entities to be stored persistently.
>
> Best regards,
> Adam
>

Adam Reichold (adamreichold) said : #4

Hello again,

I think I understand what you mean and have to admit that this is currently not implemented, neither by modifying the PDF documents in place as the Poppler library's Qt frontend does not have such functionality yet to e.g. modify the outline of a document, nor by creating a sidecar file that can be moved together with the PDF document.

Creating a sidecar file containing the bookmarks should be relatively straight forward to implement but would still have the usability downside of loosing bookmarks when the sidecar is not renamed/moved together with the file it refers to. One could try to avoid this using extend file system attributes but that will probably fail to work when e.g. using a flash drive formatted with FAT.

Another option that should be straight forward would be to create a file attachment annotation in the PDF that contains qpdfview's bookmark data but that would mean injecting that annotation somewhere and it being visible in the file, so it seems like that would be a manual procedure and could hence also be forgotten.

Best regards,
Adam

Can you help with this problem?

Provide an answer of your own, or ask Laureano for more information if necessary.

To post a message you must log in.