Tips for making PDFs smaller (using ABCPdf7)

401 views Asked by At

I'm generating PDFs from HTML (using ABCPdf and C#) and the files are coming out a reasonable size. However, I'm interested in any tips anyone has for making the PDFs as small as possible.

Anyone for any great ideas?

The HTML being rendered is really basic, just a table of names and dates etc - doesn't have to be too pretty.

Cheers!

-Ev

2

There are 2 answers

0
p4553d On BEST ANSWER

If layout is so simple, then try to relinquish the generation from HTML and write PDF directly with C# tools and libs. Read the data form HTML shouldn't be a problem.

0
Mike Edgar On

If you aren't already using the Flatten method, that will give you back some of the space that is not necessarily required. Be warned that you don't get much back from this when the PDF is very simple, but it's worth a try.

Check the documentation for more info, it does mean that if you want to open and modify the same PDF later that it simplifies and compresses the data in the file and so it's more complicated to walk over it and make changes.