Author Topic: Overly Large Pdfs-where am I going wrong?  (Read 5297 times)

Karela

  • Jr. Member
  • **
  • Posts: 69
  • Karma: 0
  • Scribus User
Overly Large Pdfs-where am I going wrong?
« on: September 09, 2015, 06:49:39 pm »
I have always noticed that the pdf generation on Scribus seemed to be on the large side, but I have always just thought I could grin and bear it, most of my projects are for print, and I just upload them to my server when they are too big to be e-mailed.

However, I am at the point where I can't bear it, and moreover, I am sure there must be something that can be done (i.e. something that I am doing wrong). I now have two upcoming contracts for EPKs (electronic press kits) and there is no way I can tell my clients that they have to upload it to a server because it is too big for e-mail. After all, the whole point is that you can send it by e-mail!

To give an example, yesterday I printed a letter sized brochure, recto verso, colour. There was a full size image on the front and another on the back, some text as well and a logo. The images were at 219 and 250 dpi, the logo also quite low res, I think 200 dpi. These two pages in pdf came out at a whopping 37.5 MB.

Where have I gone wrong? I didn't check the "limit images to 300dpi" box because they were already less than that. I did outline the fonts out of laziness, I admit, but when I went back and embedded them, it ended up at 38MB. I have set "compress text and vector graphics" to Method:Automatic and Quality:Maximum. Honestly, considering that my images were lower resolution than I would have liked, I am not eager to lower the quality.

I am sorry if this topic has been covered, I did browse around looking for a thread, but most of them seemed to focus on re-sizing your image to the appropriate size before importing it, and I feel that I have done that.

Nermander

  • Hero Member
  • *****
  • Posts: 1321
  • Karma: 17
Re: Overly Large Pdfs-where am I going wrong?
« Reply #1 on: September 10, 2015, 09:11:15 am »
Images are usually NOT the problem. Fonts and placement of text are the most common ploblems.

When it comes to fonts, a unicode Open Type font may be as big as 10-15 MB. Embed several fonts and your PDF becomes very big.

Scribus usually places each glyph individually. This means Scribus will "relocate the cursor" for each glyph in the text.

Most other programs just "place the cursor" at the start of the line and then put a string of glyphs starting at that point.

utnik

  • Hero Member
  • *****
  • Posts: 1326
  • Karma: 14
Re: Overly Large Pdfs-where am I going wrong?
« Reply #2 on: September 10, 2015, 11:10:19 am »
hiharela
hi nermander

Images are usually NOT the problem.

images can be part of the problem!
afaik scribus doesn't crop images to the visible part when they overlap the frame.
if your layout contains large images with edges overlapping the frame, you should crop them with an image processor like 'gimp'

utnik

GarryP

  • Hero Member
  • *****
  • Posts: 1600
  • Karma: 25
  • Scribus User
Re: Overly Large Pdfs-where am I going wrong?
« Reply #3 on: September 10, 2015, 12:06:10 pm »
Hi Karela (and everyone else). Here's my two-penneth.

Both fonts and images can make PDFs large, it just depends on what you're using.

If you have to embed a font then there's not really much you can do about their size unless you tell Scribus to use a subset of the font when exporting (Preferences / Fonts / Scroll right and check "Subset"). Check the size of the actual font file to see how big it will be when it's embedded without subsetting.

On the other hand, if you outline a font and you use a lot of text in that font you might find that the PDF size gets much bigger as you use more text because each character is - essentially - its own little bit of vector art.

For images there's more you can do:

1. What format are your images in? An A4 300dpi PNG can be around 14MB whereas the same image as JPG (with quality of 90%) can be around 2MB. That's a big difference in file size without any noticeable difference in image quality.
2. Are you using all of the image? If your image doesn't all fit in the frame then think about cropping it - in GIMP or whatever (as utnik suggests) - before putting it in the frame. This can cut down the file size considerably if the "unused image area" is large on many images. (I think you've said that you've done this but it might be useful to anyone else reading this post.)
3. Does your image have an alpha channel it doesn't need? Removing it might bring the file size down.
4. Have you tried compressing the images outside Scribus before importing them? Most image types can be compressed using a utility to make them smaller without much degradation of quality. (On Macs, ImageOptim is good.)
5. Do you need high resolutions? This might not be applicable to your current situation but if you know that something definitely isn't going to be printed out then 72/144dpi will be fine in most cases.

My general suggestion would be to look at the sizes of the files you are using within Scribus - font files and images and vector art - and total them up. Without using the compression options in Scribus - if they even make a difference - that total will pretty much be your absolute minimum PDF size and there's not a lot you can do about it. You can't put ten pounds of potatoes in a five pound bag.
« Last Edit: September 10, 2015, 12:17:15 pm by GarryP »

Nermander

  • Hero Member
  • *****
  • Posts: 1321
  • Karma: 17
Re: Overly Large Pdfs-where am I going wrong?
« Reply #4 on: September 10, 2015, 12:30:02 pm »
images can be part of the problem!

In almost all cases where users have complained about the Scribus PDF file size images have not been the problem. I recall many cases where users have stated things like "not even removing the image completely made much difference!".

Yes, in a few cases (like extremely cropped images) they may be the problem, but in most cases they are not.


TexAgg

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
  • Scribus User
Re: Overly Large Pdfs-where am I going wrong?
« Reply #5 on: September 21, 2015, 06:27:12 pm »
Hello,

Use this site to re-optimize your PDF.

https://online2pdf.com/

Just upload and download, it will be much smaller.

Has worked wonders for me.

Don't forget to compress using ZIP or RAR, self-extracting so they don't need the program...
« Last Edit: September 21, 2015, 06:30:25 pm by TexAgg »

NickJOB

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Overly Large Pdfs-where am I going wrong?
« Reply #6 on: February 18, 2016, 02:50:02 pm »
Hello,

I wanted to resurrect this topic as I am having the same problem and I don't believe that uploading the pdf to a third party should be the answer for a piece of software that surely is fairly focussed on producing pdfs.

I am using Scribus to produce my CV. I am using version 1.5.0 on Ubuntu. My CV is purely text, no images at all. Two A4 sides. Using one of the libre fonts that comes with Ubuntu.

The scribus file is 28kb. As far as I am aware I am using the standard PDF export settings. The font is set to be embedded. This produces a PDF of 3.4MB.

Opening this file in Preview on a Mac and choosing 'File > Export as PDF...' with no other settings changed / tools used produces a PDF of 93kb. As far as I can tell this PDF displays and prints identically.

In my case the file size is relevant because recruitment websites often limit the size of uploads or of email attachments. Any solutions that don't involve rebooting into OS X or sending my files to a third party would be most welcome, ideally of course I'd like to achieve a reasonable size PDF directly from Scribus.

Many thanks,

Nick


utnik

  • Hero Member
  • *****
  • Posts: 1326
  • Karma: 14
Re: Overly Large Pdfs-where am I going wrong?
« Reply #7 on: February 18, 2016, 03:31:04 pm »
hi nick


in this case (almost only text) the file size depends on the used fonts.
an example: if you use the font 'DeyaVuSans' in the cuts 'regular', 'bold', 'italic' and 'bold italic' this embedded fonts will add up to 2.6MB. the file size might shrink when you embed a subset of the fonts.
there are ways to decrease the size via ghostscript, but i'm not familiar with them…


utnik

Nermander

  • Hero Member
  • *****
  • Posts: 1321
  • Karma: 17
Re: Overly Large Pdfs-where am I going wrong?
« Reply #8 on: February 19, 2016, 10:50:18 am »
I wanted to resurrect this topic as I am having the same problem and I don't believe that uploading the pdf to a third party should be the answer for a piece of software that surely is fairly focussed on producing pdfs.

Scribus is focused on producing pdfs for printing. This means the end product is a printed matter, the PDF is only an intermediate format.

This means for example that Scribus will usually place every glyph individually on the page, which increases the file size doe to "cursor placement" before each glyph. Also embedded fonts take a lot of space. You can easily see the size of the content by using the Collect for output feature and include images and fonts.

Unfortunately, a lot of people use Scribus to create pdfs that are not intended for print. Those users often complain about the PDF size.

I'd recommend using Open/Libre Office to create PDFs if they are not to be used for print. Also Inkscape may be an alternative.
« Last Edit: February 19, 2016, 10:52:13 am by Nermander »

NickJOB

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Overly Large Pdfs-where am I going wrong?
« Reply #9 on: February 19, 2016, 01:57:27 pm »
Many thanks for your replies utnik and Nermander,

Collect for output including the fonts shows 3 fonts (FreeSerif.ttf, FreeSerifBold.ttf and FreeSerifItalic.ttf) totalling around 5.4MB. I have 'subset' ticked in 'Preferences>Fonts' for these three fonts but the file sizes are identical to the files sizes in '/usr/share/fonts/truetype/freefont'.

What I don't understand is how a simple 'Open', 'Export as PDF...' in Preview on a Mac can so drastically reduce the file size yet the PDF still displays identically on systems that don't have those 3 fonts installed (i.e. presumably the required subset of the fonts remains in the PDF). Presumably Scribus is including the whole font not a subset in the PDF? Is there anything else that I can do to ensure only the subset is included?

@Nermander Thank you, I am aware of Libre Office and Inkscape. The PDFs that I produce are intended for both screen and print.




Nermander

  • Hero Member
  • *****
  • Posts: 1321
  • Karma: 17
Re: Overly Large Pdfs-where am I going wrong?
« Reply #10 on: February 19, 2016, 02:34:45 pm »
What I don't understand is how a simple 'Open', 'Export as PDF...' in Preview on a Mac can so drastically reduce the file size yet the PDF still displays identically on systems that don't have those 3 fonts installed

On screen they may display identically, but print would most likely show differences. A screen's resolution is a lot lower than what is used for print, this means comparing two PDFs on screen will not show you the small differences between a high quality PDF and a lower quality PDF.

What you are saying is essentially "Scribus gives me a higher quality than I need".

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2234
  • Karma: 28
    • the graphics lab
Re: Overly Large Pdfs-where am I going wrong?
« Reply #11 on: February 22, 2016, 11:08:49 am »
you mostly can sefely distribute the "os x" pdfs... it's probably the better choice if your goal is to get the people to view the pdf on their monitor or print on their home printer.

for the pdf you're sending to the print shop, you'd probably want to use the scribus own pdf engine: it gives you a finer control and more options.

GarryP

  • Hero Member
  • *****
  • Posts: 1600
  • Karma: 25
  • Scribus User
Re: Overly Large Pdfs-where am I going wrong?
« Reply #12 on: February 22, 2016, 12:21:22 pm »

Bemused

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Scribus User
Re: Overly Large Pdfs-where am I going wrong?
« Reply #13 on: April 18, 2016, 09:47:54 pm »
I'm very new here (first post)... and maybe I'm missing something here and this is out of place, but...

Is it possible or wouldn't it be useful to to be able to use Scribus to output what I would call a 'draft' PDF document in a smaller file size that can be used as an examination or collaboration copy, or for those times when you simply don't need to have a fully 'print-shop' quality document to print on a lower res printer and still want to use Scribus for  it's workflow?

Sure, you could use Libreoffice / Openoffice or something else. Sure, you might be able to use some third-party program to shrink or compress the PDF. But wouldn't a "draft" PDF feature be useful, even if it isn't the main purpose for using Scribus?

LinuxMint 17, Scribus 1.5.1

GarryP

  • Hero Member
  • *****
  • Posts: 1600
  • Karma: 25
  • Scribus User
Re: Overly Large Pdfs-where am I going wrong?
« Reply #14 on: April 19, 2016, 11:57:48 am »
Welcome to the forum Bemused.

That's an interesting idea but I think it really depends on what you mean by a "draft" PDF. If you ask three people what they would want from a "draft" PDF you'll probably get at least four different answers depending on what situation they're in.

Reducing file size by, somehow, making Scribus place glyphs in a more "file-size-efficient" manner might be useful but the output might not be good enough to get an idea of what the real output will be. If you can't tell what the output will be from a draft then it's not much use as a draft.

The size taken up by the fonts can already be reduced by subsetting - or even outlining depending on the amount of text - so that's already possible. Any further "crunching" of the font will probably generate bad typography which, again, won't be very useful for a draft document.

Scribus can already automatically reduce image resolution on export so that area is already sorted.

One thing that's missing is an "automatic image crop" feature that would remove the unseen portions of an image to reduce file size but that would be useful in non-draft situations also so it wouldn't really be a "draft function". (It might also make the file size bigger unless the mechanism was smart enough to cope with reuse of images.)

If you want a low resolution version of the whole document - or just a subset of pages - you can export whatever you want to a set of images (e.g. 72/144dpi JPEGs), so that's already covered too. (You've got to switch between images when reading but most image viewers let you do this anyway.)

It might be nice to have a way of exporting placeholders instead of images but, again, that doesn't really give you an idea of how the document will look in the end - especially if the images are integral to the layout.

Is there something that I've missed? What would you find useful that hasn't been mentioned?

I don't want to dismiss your idea out-of-hand because it could have some useful/interesting connotations but there's already a lot of things you can do to reduce file size. You just need to know about them (which is why I've listed them above).