Duplicated pdf larger than original

file conversionpdfpreview

I have a pdf which, when I duplicate it in Preview and save it, is substantially bigger afterwards:

Before:

$ pdfinfo manuscript-EditorComments.pdf
Title:
Subject:
Keywords:
Author:         Rainer M Krug
Creator:        LaTeX with hyperref package
Producer:       pdfTeX-1.40.14
CreationDate:   Fri Jan 24 13:59:56 2014
ModDate:        Fri Jan 24 13:59:56 2014
Tagged:         no
Form:           none
Pages:          39
Encrypted:      no
Page size:      612 x 792 pts (letter)
File size:      1715794 bytes  <<<<<<<<<<<<<<
Optimized:      no
PDF version:    1.5  <<<<<<<<<<<<<<

Afterwards:

$ pdfinfo manuscript-EditorComments\ copy.pdf
Author:         Rainer M Krug
Creator:        LaTeX with hyperref package
Producer:       Mac OS X 10.9.1 Quartz PDFContext
CreationDate:   Fri Jan 24 13:27:14 2014
ModDate:        Fri Jan 24 13:27:14 2014
Tagged:         no
Form:           none
Pages:          39
Encrypted:      no
Page size:      612 x 792 pts (letter)
File size:      2673770 bytes   <<<<<<<<<<<<<<
Optimized:      no
PDF version:    1.3   <<<<<<<<<<<<<<

I highlighted the relevant differences. Now is this only caused by the different pdf version?

Even reducing the size with the quartz filter does not change the file size:

$ pdfinfo manuscript-EditorComments\ copy\ reduced.pdf
Author:         Rainer M Krug
Creator:        LaTeX with hyperref package
Producer:       Mac OS X 10.9.1 Quartz PDFContext
CreationDate:   Fri Jan 24 13:35:43 2014
ModDate:        Fri Jan 24 13:35:43 2014
Tagged:         no
Form:           none
Pages:          39
Encrypted:      no
Page size:      612 x 792 pts (letter)
File size:      2428897 bytes   <<<<<<<<<<<<<<
Optimized:      no
PDF version:    1.3   <<<<<<<<<<<<<<

OK – no really heavy images in the pdf, but is the difference really only because of the pdf version?

Best Answer

The size difference of a few hundred kilobytes can be attributed to the PDF version and encoding.

Recent versions of PDF introduced features to reduce the file size. These features included compressed object streams in v1.4.

A PDF file can look identical but be stored on disk in nearly infinitely different forms. The application responsible for creating the PDF is critical to getting the smallest possible file size.

Most applications, such as Preview, will call out to a general purpose PDF framework or library to deal with the file format. This will result in well formed files with minimal effort by the application's developers.

Other applications may create PDFs highly-tuned to their content and needs. The PDF specification allows for creative reuse of content, de-duplication, and optimisations that require knowledge of the document's purpose and intention. This requires significant effort and is increasingly rare.