I have a a lot of important PDF files. The only way I modify them is add/remove annotations. Is there an efficient way to have version control for such files. I can perhaps use standard tools like SVN/Git. I heard that SVN stores only deltas even for binary files. In the case of SVN/GIT, would the deltas be huge if all I did was to change annotations in a PDF file? I guess they wont be huge but I'm not sure how annotations are stored in PDF files and how how smart the delta algorithms are.


In an active project, we use git to do the distribution and version control. Some of the files are PDF, and it works quite well. As it has been said, there is no way to do deltas.

One possibility, however, which might work with deltas, would be exporting the comments, which come out as FDF, and then do the version control with these export files. FDF may, if the comments are not too big, be plain text files; you'd have to run tests, however.

|improve this answer|||||

You can uncompress PDFs with a number of tools (qpdf, pdftk, mutool, cpdf). For example:

pdftk original.pdf output uncompressed.pdf uncompress

This should give you the PDF in a format where you can see and diff annotations as plaintext. The uncompressed file will typically consist largely of ASCII characters, but it might still contain binary data. You'd have to test how that works with the version control software of your choice and whether it plays nice with the "embedded" binary data.

The question is what happens when you modify annotations (with a GUI editor, I assume), save the file and de-compress it. If you're lucky, the file will be largely the same except for annotations, but that's not guaranteed. You'll have to choose your combination of software wisely.

|improve this answer|||||

I don't know of any native versioning with PDF files (nor does my Google search). PDF files (according to wikipedia) are binary. Delta storage only works with text files (like source code files and readme files).

I have a background in using SVN and Git. I recommend using Git, as it has superior compression capabilities and is a distributed version control system. Subversion is a centralized version control system, which means you need a server in order to run it. You could install the SVN server software on your computer, but it's probably not worth the overhead. Distributed version control systems work via local repositories (ie: no server required).

|improve this answer|||||
  • The second paragraph is totally irrelevant to the question. I didn't ask about differences between SVN and Git. Also, in the first paragraph, the second line is possibly wrong as the answer of Thomas suggests that PDF files can be uncompressed after which they will consist largely of ascii characters. – Abhishek Anand Sep 7 '16 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.