Control over PDF image compression?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
Buckhorn
Jr. Propeller Head
Posts: 4
Joined: Fri Jan 23, 2009 10:59 am

Control over PDF image compression?

Post by Buckhorn »

Flare's PDF output applies heavy JPEG-style compression to images. As a result, nice crisp PNG screen shots (that are not resized) turn to crap in PDFs. This is unacceptable.

Image compression does not appear to be controllable via the Adobe PDF printer driver. I think Flare must be using its own PDF generation engine, which doesn't appear in the Printers list, so there isn't a way to access settings there.

I've looked high and low for some way to set image compression inside Flare, but haven't found anything. If this is possible, I hope someone can provide instructions.

Bill C.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Control over PDF image compression?

Post by RamonS »

Flare produces PDF output natively so that one does not need to install and / or buy an additional software package. I do not know of any means to control the image compression from within Flare. Please file a bug report here:
https://www.madcapsoftware.com/bugs/submit.aspx
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Control over PDF image compression?

Post by LTinker68 »

Buckhorn wrote:Flare's PDF output applies heavy JPEG-style compression to images. As a result, nice crisp PNG screen shots (that are not resized) turn to crap in PDFs. This is unacceptable.
Are you talking about when you view the PDF on a monitor, or are the graphics also bad when printing the PDF output?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Buckhorn
Jr. Propeller Head
Posts: 4
Joined: Fri Jan 23, 2009 10:59 am

Re: Control over PDF image compression?

Post by Buckhorn »

Feature enhancement submitted.

Lisa -- Both.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Control over PDF image compression?

Post by LTinker68 »

I don't have Flare open at the moment and I don't remember where the field is (target or skin), but there is an option about creating new images of resized images. That option is enabled by default, so I disabled it. Even though you didn't resize the images, I wonder if that option is enabled and Flare is automatically creating new versions of the image and it's during that process that they're turning out bad. You might try disabling that feature if you haven't already.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Buckhorn
Jr. Propeller Head
Posts: 4
Joined: Fri Jan 23, 2009 10:59 am

Re: Control over PDF image compression?

Post by Buckhorn »

Yeah, I tried disabling that option (it's in the target settings), but that didn't improve the quality.

I also experimented with changing PNG images to GIF and high-quality JPEG to see whether the PDF engine would treat them any better. No dice. It appears that the PDF output process converts all images to low-quality JPEGs. Not only do the images end up looking cheesy, but transparency in GIFs and PNGs is lost. It also appears that the PDF engine enlarges images by about 10% (even if the image's print size is set to the exact size of the original in pixels -- via the Object dialog), which further degrades the quality of screen shots.
garyjgeoaccess
Sr. Propeller Head
Posts: 148
Joined: Mon Feb 16, 2009 3:23 pm

Re: Control over PDF image compression?

Post by garyjgeoaccess »

I can confirm much of what Buckhorn says here about image compression with Flare PDF output.

My tests show that Flare converts ALL images to JPEG with low-medium compression.

This might be marginally acceptable for photos. However, for screenshots, this approach causes inferior quality images in the PDF (with a considerable number of artifacts around text).

In addition, the process of converting all images to JPEG causes the PDF file size to bloat. Here is what happens:

My screenshots are saved as PNG at 150 dpi and 4.5 inches wide. Typical file size of each image: 15-25KB. However, the file size of low-medium compression JPEG versions of these images will be about 40-80KB each (or about 3X the size of the original). These sizes come from Adobe Photoshop.

When I generate a PDF from Flare of a user manual that contains about 200 screenshots, I get a file that's 13MB in size.

If I send this manual first to Framemaker and then generate the PDF using the Adobe PDF Converter, I get a file that's 5MB in size. PLUS, the images come through in their original PNG format (and of course, yes, that's why the file size is much smaller). So the images are crisp and clean.

The Adobe PDF converter does indeed have controls for image compression, so the user has some control over when image compression is used. The Standard/Default Adobe PDF Converter settings only apply compression when the dpi is above 225dpi (at which point JPEG medium-quality compression is applied by default). All of my graphics are below this limit, so no compression takes place.

Flare does not have configuration controls for PDF generation. We simply get JPEG low/medium-quality compression for all images, regardless of image type, regardless of dpi.

This isn't acceptable. MadCap needs to rethink how PDFs are generated.

I've attached an example that shows Adobe Acrobat's Audit Space Usage data for a PDF generated from Flare vs. a PDF generated via Framemaker and PDF converter.

In general, I'm very impressed with PDF output from Flare; however, the poor quality of images in PDFs--and the bloated size--makes me wonder if I should delay generating PDF output directly from Flare until MadCap either 1) provides configuration settings for image compression in PDF output and/or 2) provides us with the ability to generate PDF output using the Adobe PDF Converter.

I have entered an enhancement request.
You do not have the required permissions to view the files attached to this post.
Andre
Jr. Propeller Head
Posts: 5
Joined: Mon Feb 09, 2009 3:31 am

Re: Control over PDF image compression?

Post by Andre »

Same here, I can confirm that PNG files are getting compressed when using the PDF output function of Flare. I even submitted a ticket to the support and the simply forwarded it straight to the development.

So I guess they already know that something is not going the right way. Nevertheless I do not understand why they do not simply handle the graphics without touching so no recompression or whatever at all?

For me it would be fine if they simply the graphics without doing anything with it.

Regards
gwadmin
Propeller Head
Posts: 41
Joined: Thu Feb 16, 2006 8:37 am
Location: Boston, MA

Re: Control over PDF image compression?

Post by gwadmin »

Just came looking for an answer to this issue...after talking up the fact that I could now produce PDF files directly from Flare, which would save time (and client $$) over going through Frame and postprocessing...that is, after I spent a bunch of time rebuilding fresh stylesheets for creating print (pdf) output with formatting akin to that I had produced via Frame. :roll:

Well, it certainly is faster, though the graphics are entirely unacceptable -- I likewise created .gif/.png files of screen images that do not need to be compressed or resized. And now the client gets a PDF with fuzzy graphics, or I eat a bunch of billable time re-tweaking the new stylesheets to work with Frame and then go back to postprocessing via handwork/framescript. :oops:

While having extensive distiller-like configuration settings within Flare can reasonably be seen as a feature request, I'd definitely call this a bug. At the very least Flare should provide a web (low-quality) vs. print (high-quality) setting. :cry:
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Control over PDF image compression?

Post by RamonS »

Graphics always seem to be an issue when creating PDFs. I know that at one of my former jobs we created PDFs through Distiller from Word and while the process was easy the resulting images always looked like crap. At my current company the tech writer creates PDFs straight from Frame and the image quality is plain horrible (looks OK in the WebHelp created through WebWorks). I am by no means a PDF or even Frame expert, but it strikes me that crafting PDFs with crisp graphics is not that trivial.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Control over PDF image compression?

Post by KevinDAmery »

It can be done (our graphics person here does it routinely) but Adobe hides the control for it deep in the print output settings, where you aren't going to casually come across it. If you know where to look it's not hard at all, but if you don't know where to look you'd have to be pretty persistent to find it on your own.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Control over PDF image compression?

Post by KevinDAmery »

gwadmin wrote:While having extensive distiller-like configuration settings within Flare can reasonably be seen as a feature request, I'd definitely call this a bug. At the very least Flare should provide a web (low-quality) vs. print (high-quality) setting. :cry:
Agreed 100%. Or a "compressed" and "not compressed" setting. Anything to let you produce a PDF that you might not mind putting your name to once you're done.

Right now, Flare's PDF creation is a little like the chess-playing dog. At first you're amazed that it can play chess, then you notice it loses a lot....
Until next time....
Image
Kevin Amery
Certified MAD for Flare
garyjgeoaccess
Sr. Propeller Head
Posts: 148
Joined: Mon Feb 16, 2009 3:23 pm

Re: Control over PDF image compression?

Post by garyjgeoaccess »

Yes, at the very least an option should be available on a Flare PDF output dialog for compressing images (i.e., converting to JPEG) vs not compressing images. AND a setting for compression quality.

Better yet, we also need additional options that allow you to determine when compression is done and not done (such as dpi ranges, image format, and file size).

And better yet still, we need an option to use Acrobat PDF Converter/Distiller instead of Flare's built-in PDF generation engine. I appreciate MadCap not requiring users of Flare to also have Acrobat in order to produce PDF output, but I already have Acrobat and would like to use it. I don't expect MadCap to ever build into their Flare PDF generation engine all the sophistication (some might say "complications") already present in Acrobat.

Yes, the compression settings in Acrobat are somewhat buried. However, if you generate PDFs that are distributed to customers, it's important to be familiar with these settings. By understanding the impact of the various settings, you can minimize file size while also producing images of acceptable quality, you can ensure fonts are embedded, you can deal with color management issues, you can determine backward compatibility for previous versions of Acrobat Reader, etc.

Bottom line: Acrobat PDF Converter/Distiller does an acceptable job of creating PDFs (for most situations) with its default settings. Unfortunately, Flare does NOT do an acceptable job of creating PDFs with its default settings. We need access to these settings. Either access to these settings must be built into Flare or we must be allowed to use Acrobat for PDF generation.
MikeKatz
Sr. Propeller Head
Posts: 133
Joined: Tue Mar 07, 2006 5:54 pm

Re: Control over PDF image compression?

Post by MikeKatz »

KevinDAmery wrote:It can be done (our graphics person here does it routinely) but Adobe hides the control for it deep in the print output settings, where you aren't going to casually come across it. If you know where to look it's not hard at all, but if you don't know where to look you'd have to be pretty persistent to find it on your own.
I've tried and I can't find any settings. Where is it?
Mike
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Control over PDF image compression?

Post by KevinDAmery »

For PDF Writer, you need to tell the document to Print, then go into Properties in the print job. The second tab gives you compression options for images, including various levels of JPEG as well as ZIP (ZIP of course is lossless).
Until next time....
Image
Kevin Amery
Certified MAD for Flare
MikeKatz
Sr. Propeller Head
Posts: 133
Joined: Tue Mar 07, 2006 5:54 pm

Re: Control over PDF image compression?

Post by MikeKatz »

KevinDAmery wrote:For PDF Writer, you need to tell the document to Print, then go into Properties in the print job. The second tab gives you compression options for images, including various levels of JPEG as well as ZIP (ZIP of course is lossless).
OK thanks, I know about those, but they still don't give good images at all page sizes on the PDF file.
Mike
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Control over PDF image compression?

Post by KevinDAmery »

MikeKatz wrote:
KevinDAmery wrote:For PDF Writer, you need to tell the document to Print, then go into Properties in the print job. The second tab gives you compression options for images, including various levels of JPEG as well as ZIP (ZIP of course is lossless).
OK thanks, I know about those, but they still don't give good images at all page sizes on the PDF file.
Ok, the other way we do things is to use the Acrobat application to open the source document, then create a PDF from it. I'll have to get back to you on the exact steps as we have some testing going on at the moment that can't wait.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
MikeKatz
Sr. Propeller Head
Posts: 133
Joined: Tue Mar 07, 2006 5:54 pm

Re: Control over PDF image compression?

Post by MikeKatz »

KevinDAmery wrote:
MikeKatz wrote:
KevinDAmery wrote:For PDF Writer, you need to tell the document to Print, then go into Properties in the print job. The second tab gives you compression options for images, including various levels of JPEG as well as ZIP (ZIP of course is lossless).
OK thanks, I know about those, but they still don't give good images at all page sizes on the PDF file.
Ok, the other way we do things is to use the Acrobat application to open the source document, then create a PDF from it. I'll have to get back to you on the exact steps as we have some testing going on at the moment that can't wait.
Thanks, you don't need to research it - I use that way as well.
Mike
garyjgeoaccess
Sr. Propeller Head
Posts: 148
Joined: Mon Feb 16, 2009 3:23 pm

Re: Control over PDF image compression?

Post by garyjgeoaccess »

I don't know if this will help, but here goes.

Regarding PDFWriter ...

Adobe Acrobat used to include a printer driver called PDFWriter. This printer driver was dropped as of Adobe 6.0 (version 5.0 for Mac).

PDFWriter was a simple approach to PDF generation, meaning it was designed for text documents. It didn't handle images very well. It wasn't designed to. Adobe Distiller was Adobe's full-featured printer driver. Notice I said "was." As of Adobe version 6.0, Distiller was renamed simply "Adobe PDF" (although there is still a product called Adobe Distiller Server, a bit confusing, maybe?). That is the name that shows up in the Control Panel for printers.

For the Adobe PDF printer driver, the settings for PDF generation can be found in the printer driver preferences (also available from other applications through Print Setup).

You can also use Adobe's Print Optimizer (available in Acrobat 9, and maybe earlier, but I'm not sure). You run this from within Acrobat. You open a PDF and then choose Tools > PDF Optimizer. This allows you to downsample images and choose the type of compression. However, this is strictly for reducing PDF file size and throwing out irrelevant information. If your images do not already look good, then you did something wrong earlier in the process. Optimizer won't make bad images look good.

Of course, the application that you use to lay out the original document plays a role in this process. It needs to communicate effectively with the Adobe PDF printer driver. In my experience, some applications communicate effectively, others don't. For example, Adobe FrameMaker is fussy about images. I try to avoid rescaling any images in FrameMaker because rescaled images are subject to pronounced degradation during output to PDF.
MikeKatz
Sr. Propeller Head
Posts: 133
Joined: Tue Mar 07, 2006 5:54 pm

Re: Control over PDF image compression?

Post by MikeKatz »

garyjgeoaccess wrote:I don't know if this will help, but here goes.

Regarding PDFWriter ...

Adobe Acrobat used to include a printer driver called PDFWriter. This printer driver was dropped as of Adobe 6.0 (version 5.0 for Mac).

PDFWriter was a simple approach to PDF generation, meaning it was designed for text documents. It didn't handle images very well. It wasn't designed to. Adobe Distiller was Adobe's full-featured printer driver. Notice I said "was." As of Adobe version 6.0, Distiller was renamed simply "Adobe PDF" (although there is still a product called Adobe Distiller Server, a bit confusing, maybe?). That is the name that shows up in the Control Panel for printers.

For the Adobe PDF printer driver, the settings for PDF generation can be found in the printer driver preferences (also available from other applications through Print Setup).

You can also use Adobe's Print Optimizer (available in Acrobat 9, and maybe earlier, but I'm not sure). You run this from within Acrobat. You open a PDF and then choose Tools > PDF Optimizer. This allows you to downsample images and choose the type of compression. However, this is strictly for reducing PDF file size and throwing out irrelevant information. If your images do not already look good, then you did something wrong earlier in the process. Optimizer won't make bad images look good.

Of course, the application that you use to lay out the original document plays a role in this process. It needs to communicate effectively with the Adobe PDF printer driver. In my experience, some applications communicate effectively, others don't. For example, Adobe FrameMaker is fussy about images. I try to avoid rescaling any images in FrameMaker because rescaled images are subject to pronounced degradation during output to PDF.
Hi Gary

My PDF output prints very well, but when I display the PDF on screen, the screen shots are distorted. I have to view at 140% to get a clean-looking screen in PDF.
I've noticed the same thing in other PDFs too that I display. It may have something to do with my screen resolution, I'm not sure.
BTW, I don't create PDFs from Madcap products.
Mike
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Control over PDF image compression?

Post by doc_guy »

I have Acrobat 7.

In this version you open your PDF, then go to the Advanced menu, and select PDF Optimizer...

Image

There are a bunch of settings you can tweak in here to change how stuff is included in your PDF file.
Paul Pehrson
My Blog

Image
garyjgeoaccess
Sr. Propeller Head
Posts: 148
Joined: Mon Feb 16, 2009 3:23 pm

Re: Control over PDF image compression?

Post by garyjgeoaccess »

This deficiency has been addressed with Flare v4.2.1.

A control for compression has been added to the Basic tab of Targets (click the Options buttons). The compression control is fairly simple at this point. It provides these options: Default, Automatic, and JPEG.

I've tested the Default option with a project that contains many PNGs. Flare now seems to send the PNGs to PDF without applying JPEG compression. Yea!

The Automatic option does ... I'm not sure what. It doesn't do any additional compression on JPEGs, I think.

The JPEG option turns all images into JPEGs. A checkbox allows you to select maximum quality compression.

These controls are far from providing the level of sophistication of Adobe Acrobat, but they're a step in the right direction. I hope to see these controls made more robust in future releases (e.g., with options for reducing dpi and options for applying compression to images in specific dpi ranges). I'll submit an enhancement request.
Post Reply