Ridiculously large size of output PDF file

Previous topic - Next topic

riczan

hi all

I have a 200 page document consisting of text and pictures.
Collecting it for output with uncompressed file and including fonts and colour profiles produces a folder of total size of 513MB.
When I create a PDF set to PDF 1.4 for Printer compressing text and vector graphics, compression method Lossless, quality Maximum, but no maximum image resolution I obtain a PDF of approximately 2.5 GB; however if I change to a maximum image resolution of 300 dpi the output PDF is now approximately 1.5 GB. Why the size difference between the output PDF and the collected files? How is it possible that combining 513 MB of files into one multiplies the overall size by 3 or 5 times??
BTW, I am using Scribus 1.5.8 on Windows 10.

Nermander

Often the issue is not the images but the text. As far as I understand Scribus places each glyph independetly. So instead of "Move cursor to X, Y, Insert string 'Hello world'" it will do:
Move cursor to X, Y, Insert glyph 'H'
Move cursor to X, Y, Insert glyph 'e'
Move cursor to X, Y, Insert glyph 'l'
Move cursor to X, Y, Insert glyph 'l'
Move cursor to X, Y, Insert glyph 'o'
etc.

Then when it comes to images, what format are the images? The PDF format can only handle a limited set of image types, so when creating the PDF the images may be converted to a different format causing them to grow.

riczan

#2
Hi Normander

Thanks for your reply.
In the collected output folder the .sla file is 788 KB, how is it possible that it can grow to 1 GB??
Out of 105 pictures 14 are .png, 3 are .webp, 1 is a .tif (but only 750 KB) and the rest are .jpg.
Do you have any suggestions on what I can do to bring that size down?

utnik

hi riczan

i'm not sure, but i think that the images blow up your file size. if you don't allow them to stay as lossy .jpg they may be much bigger than the source images.

utnik

Nermander

Quote from: riczan on December 26, 2024, 10:10:17 PMOut of 105 pictures 14 are .png, 3 are .webp, 1 is a .tif (but only 750 KB) and the rest are .jpg.

If you go here and scroll down to Raster images, you can see what formats can be stored in the PDF.

https://en.wikipedia.org/wiki/PDF#Imaging_model

This essentially means that most of the images are re-encoded in the PDF. The images are not embedded as is.

I would suspect the PNG and webp images may be the major concern. You could try and remove some images (for example just move the image files to a different folder so Scribus will not find them, makes it easy to then just move them back) and re-export the PDF and see what happens to the file size.

AdmFubar

On the Save To PDF window, in the General tab, at the bottom are settings to adjust the image compression for export. I took a 106 mb pdf down to 1.5 mb adjusting these.  1.5 mb pdf still looks good.
Using Scribus 1.5.8 & 1.6.2, openSUSE 15.5
Advanced hobbyist

riczan

I think I may have found the major contributor to my issue: duplicated pictures.
I have some pictures that are displayed more than once; while these pictures only appear once in the collected output I guess in the PDF separate copies are created, one at each position in the document...
Thanks to all who answered my original query.

riczan

For the benefit of any future readers of this post, I found this interesting wiki page about compression methods and image resolution: https://wiki.scribus.net/canvas/Image_DPI_and_Scaling,_and_Resultant_File_Sizes