pdf generation help...

Craig

Cleared for Takeoff
Joined
Nov 23, 2015
Messages
1,201
Location
North Texas
Display Name

Display name:
Craig
Hey guys, I need some help on generating a .pdf file for the type club I'm part of.

The current newsletter is written in Works. It comes to me in individual page files. I download the files, do some minor editing in LibreOffice and then export to .pdf. I then use .pdfchain to generate a single .pdf file. Here is where things get a little wonky....According to the properties tag on my machine, the file is about 23 meg., but when I attach it to a 5 or 6 line email, Thunderbird tells me it's a 30+ meg file. What gives?

Is there a better way for me to do this? I haven't figured out a way to get all the pages into a single document first, but I know that there has to be a way, rather than export and then assemble. I'm sure part of the problem is that many of the pages are setup with text boxes to maintain a very rigid layout for printing.

As to getting the guy writing it to switch to more up to date software, I doubt it will happen until his current computer dies a horrible death. The previous guy that did the newsletter set the templates up probably 25 years ago and they were passed to the current guy when the original guy died.
 
Hey guys, I need some help on generating a .pdf file for the type club I'm part of.

The current newsletter is written in Works. It comes to me in individual page files. I download the files, do some minor editing in LibreOffice and then export to .pdf. I then use .pdfchain to generate a single .pdf file. Here is where things get a little wonky....According to the properties tag on my machine, the file is about 23 meg., but when I attach it to a 5 or 6 line email, Thunderbird tells me it's a 30+ meg file. What gives?

The bump in file size when attaching to email is the normal increase for the encoding to make it an email attachment. It has to be encoded not binary for various historical reasons. In the olden days it would have been uuencode, these days it could be various MIME types and encodings. But anyway, totally normal. Email is fat.

Ad far as PDF file sizes, LibreOffice and various other things have a tendency to attach images inside PDFs as uncompressed JPG or do other silly things like that which bloat the hell out of the resulting PDF file, as I recall. Early versions of LibreOffice were also known for having horrid JPG compression engines (free vs pay) and if they were turned on as part of the PDF generation process they didn’t do nearly as good a job as more license encumbered or “non-free” JPG compression libraries should.

Does the original document contain a lot of images? If not it’s something else, but likely a similar problem down a similar path.

If you Google a bit on the topic you’ll find various ways to deal with LibreOffice not really doing the PDF export well. Everything from some tweaks to the output format inside LO, to having LO export the file as something completely different and using command line and Ghostscript to define the EXACT image quality loss and compression settings desired, without losing too much visible quality in the final PDF.

LO by default attempts to keep as much of your original quality as possible and it makes for a very large file.

Also make sure you’re not exporting a hybrid PDF that’s including your LibreOffice source ODF file. It’ll happy store the full ODF inside the PDF invisible to you for archival and later editing capabilities if you haven’t made sure that’s turned off. Use standard fonts but don’t embed them, that’ll take up unnecessary file space too.

At work we have some long term storage requirements for PDFs. Hundreds of thousands of the things in the active system, way more in the offline backups.

Cramming them through Ghostscript and/or ImageMagic to strip them down to 8-bit black and white, makes for tiny file sizes, and very legible, even if the original was in greyscale.

There’s a few exceptions, and we let our users decide if the archival copy looks okay before it’s saved via a preview box when saving. So in other words look carefully after you tweak your image size and compression options at the document. Zoom in on any images and see if they’re really still high enough quality for folks to see details in photos, etc.

Once you know where a good baseline is, you can leave the PDF export settings alone inside LO after that, for the most part.
 
A few ideas. Have you thought of storing the newsletters in pdf format in a dropbox account? You could share the file by emailing a link to the users.

Or what about the jpg format? Does it have to be pdf?
 
There are various choices on PDF files, from "camera ready" for use by high quality commercial printers, to laser printer (home printer) to e-mail (for viewing on smart phone or home computer screen) 25 Mb to 5 Mb to 1or 2 Mb.
 
Thanks guys for the info. I haven't had a chance to look at things yet. Will see what I find and can do, probably this next week.
 
Don't know about third party applications, but in Adobe Acrobat there is [File] [Save As...] [Optimized PDF] option that generates a compressed version of the PDF for emailing.
 
Back
Top