Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF output size bloated? #19

Open
RaffaeleT opened this issue Feb 29, 2016 · 3 comments
Open

PDF output size bloated? #19

RaffaeleT opened this issue Feb 29, 2016 · 3 comments
Assignees

Comments

@RaffaeleT
Copy link

Hallo I'm running aeroodocs with Odoo v8 on Ubuntu 14.04.
I'm experiencing a huge growth of PDF outputs size.
This is the simplest test I did:

  1. I created a 3-pages template containing only page breaks (no text body), with header and footer containing images
  2. I printed it (eg. as an invoice) as PDF: the size is 38.5KB
  3. I added a Lorem Ipsum line of text in each page in the original template
  4. I printed it as PDF: the size is 132KB
  5. I printed the "Lorem Ipsum" template as DOC
  6. Using LibreOffice application, I manually saved the doc as a PDF: the size is 50.6KB

Summarizing:
A 3-page document with header and footer containing images:

  1. if it contains no text in the body, is sized 38.5 KB - when printed with aeroodocs
  2. if it contains a line of text in each page, is sized 132 KB - when printed with aeroodocs
  3. if it is saved from within LibreOffice, is sized 50.6 KB

In real-word example, these are the sizes of a 1-page invoice with 3 tables in it:

  1. 422KB when printed as PDF
  2. 36.5KB when printed as DOC
  3. 130KB when the DOC is exported as PDF manually from LibreOffice

Any idea about where I should investigate on?

@RaffaeleT RaffaeleT changed the title Multipage PDF output bloated? PDF output size bloated? Feb 29, 2016
@RaffaeleT
Copy link
Author

I noticed that the document used different fonts, and typographical emphasis (bold, italic, etc).
These are the optimization I gained:

  1. using Times New Roman only = 220KB
  2. striping off bolds and italics = 142KB

Still, it is larger than the document exported as PDF from LibreOffice, which is 98KB.

@sraps sraps reopened this Mar 1, 2016
@sraps
Copy link
Contributor

sraps commented Mar 1, 2016

I will give it a look. If it's true, it'd indeed adding up in space on thousands of documents...

@sraps sraps self-assigned this Mar 1, 2016
@RaffaeleT
Copy link
Author

I solved by installing Microsoft TTF fonts. Sorry, I didn't know they were missing by default from the system.
The PDF output now is 72.5KB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants