Recently, I used pdftk to add pages from pdf to another. But to my surprise, the output file now takes less space than the original pdf file. In particular, the original pdf file say file1.pdf had 510 pages. And I needed to add the page 1 of file2.pdf before the very first page of file1.pdf. I did this using the following command(to reproduce the issue):
pdftk A=file1.pdf B=file2.pdf cat B1 A output output.pdf
As expected, I got a new file named output.pdf that now has 511 pages where the first page is from file2.pdf . But to my surprise, the output.pdf takes 3.2 MB while the original file(file1.pdf) took 3.6 MB.
So, I want to know why(how) this is so? The pdf file is a book manuscript so I am worried about any page loss in between or maybe some kind of quality loss. So I need to be sure if there was any information loss in this process because the new output file takes less space so where/how did that space go/freed?
For reference and for completeness’ sake, here is what I get when I type pdftk --version:
pdftk port to java 3.3.3 a Handy Tool for Manipulating PDF Documents
Copyright (c) 2017-2018 Marc Vinyals - https://gitlab.com/pdftk-java/pdftk
Copyright (c) 2003-2013 Steward and Lee, LLC.
pdftk includes a modified version of the iText library.
Copyright (c) 1999-2009 Bruno Lowagie, Paulo Soares, et al.
This is free software; see the source code for copying conditions. There is
NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.