After A LOT of playing around, I finally figured out how to create a PDF file, add watermarks, images on certain pages, footers and security. PHEW!
But now, when the user downloads the PDF file, it is pretty big and when you print it, a progress bar that reads "flattening:xx%" comes up for every page and takes a long time to print.
The PDF I created is not a PDFForm, so I am not sure why "flattening" is coming up. In any case, I need the file to print faster.
So here is the main question, once I have created a PDF file and it is on my server, is there a way to flatten (I know flatten is not the correct word, since flattening is for forms - but I hope you understand what I mean) the file so that it can no longer be stripped of watermarks, footers, etc? I imagine doing so, will also make the file print more quickly.
For example, if I take my PDF file and print it to a 3rd party distiller program as a new PDF file and I open the new file, it prints almost instantly.
I can't attach the file, so here it is on my server:
Here is a better example.
is the original PDF file that is uploaded by a user. Note that it is only 48kb in size.
I take the file, add a couple of watermarks and a footer for each page as well as a small image on the last page, add security on it and BAM, the file:
is now 1.5 MB and it takes a LONG time to print.