5

I aim to annotate PDFs with the annotations stored separately. Okular used to do this.. but sadly no longer.

Are there any alternatives, either one that stores annotations separately, or a way to split an annotated pdf into the original pdf and a file that contains the annotation?

xiota
  • 5,038
Student
  • 153

1 Answers1

3

Xournal can be used to take notes and annotate PDF files. Annotations are saved in a separate .xoj file. If the original file is example.pdf, the corresponding Xournal file is named example.pdf.xoj. While Xournal is no longer actively developed, it still appears to be maintained and continues to be available in the package repositories.

Xournal++ may also be used. It is a rewrite of Xournal with a slightly modified file format. Old .xoj files can be opened and edited, but will be saved with the new .xopp extension. Xournal++ is available as xournalpp in Ubuntu 22.04 and later.

Is there way to parse xoj files?

.xoj and .xopp files are gzipped xml files.  They can be uncompressed by adding .gz to the filename and running gzip -d on them. Then you can use xml or text processing utilities. For example, you can grep for notes that were typed as text.

Xournal and Xournal++ can open the uncompressed files, so there is no need to recompress them. However, files will be compressed when resaved.

xiota
  • 5,038