Help with Images in Output PDF

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

User avatar
Sheri Steeves
Posts: 146
Joined: Tue Aug 05, 2008 5:06 pm
Location: Ottawa, Ontario,CANADA
Contact:

Help with Images in Output PDF

Unread post by Sheri Steeves »

Hello,

I'm creating a set of quick start guides as PDF in H&M and I'm having issues getting my screenshots/diagrams to be clear in the resulting PDF.

My initial screenshots are taken using TNT2, saved as either 24-bit bmp or png in a rare case. I'm then building the actual screen shot using Impict to get the image plus hand-build callouts.
I've then exported these images as 24-bit or 8-bit bmp and PNG files to use in my topics.

When inserting them into the topic, they look fine in the H&M interface. When I export to PDF, the any text in results images is very jaggy. In the screenshot below the left side shows the view in Adobe Reader at 100%.
JaggPDF.PNG
I have tried both PNG (24-bit) and BMP(24-bit\8-bit) files and the result looks the same in the fina PDF (or not enough of a change to be noticalbe). I also tried creating the IMPICT file at a higher resolution, importing the IPP file directly instead of an image and played with using SVG files instead as they are vector and not image graphics. The SVG files failed utterly with only partial areas of any dialog screen shots showing once I was actually able to get an SVG.

When exporting to PDF I have set the Brother HL-2045 as my PDF export printer and my PDF Options Image Quality is set to No Compression.

Is there anything I can do to improve this? Or is this the best I can get?

Thanks,

Sheri
You do not have the required permissions to view the files attached to this post.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Help with Images in Output PDF

Unread post by Martin Wynne »

Hi Sheri,

How are you creating the callouts? Try selecting the callout in Impict and then selecting this option:
impict_smooth.png
Having said that, I prefer to create blank callouts in Impict itself. The callout text is then written in an editor program (you could use the H&M editor), screen captured, cropped and overlaid on the callout in Impict as a bitmap object.

This produces a much neater end result and allows full formatting of the text.

Another option is to use an Impict image with blank callouts as a background image to a table in H&M. You can then add text in various cells over the callouts. This not only allows full text formatting, you can include clickable links, toggles, etc., in the callout text.

regards,

Martin.
You do not have the required permissions to view the files attached to this post.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Help with Images in Output PDF

Unread post by Tim Green »

Hi Sheri,

In addition to Martin's excellent comments, check the size of your image and the zoom setting in your PDF viewer. If you want high quality images at all zoom settings in PDF you need to use an image that is a lot larger than its display size and then scale it down in the HM editor. HM exports the full original image to the PDF with a scaling command, and this then leaves you enough "reserve quality" to display with better appearance at larger zoom settings.

In addition to this, make sure that you are saving your images in IPP or BMP format, NOT as JPG or PNG. Using JPG will always reduce the quality of screenshots because the compression algorithm in JPG is not suitable for images with sharp edges. IPP and BMP can be used directly in PDF with lossless compression so they don't lose quality. Also check your Image Quality setting in Configuration > Publishing Options > PDF > PDF Options. You can apply additional JPEG compression there to reduced the size of your PDF files, but if you apply too much this will also reduce the quality of your images significantly.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Sheri Steeves
Posts: 146
Joined: Tue Aug 05, 2008 5:06 pm
Location: Ottawa, Ontario,CANADA
Contact:

Re: Help with Images in Output PDF

Unread post by Sheri Steeves »

Martin and Tim,

Thanks for the advice. I tried images with the anti-aliasing set to all 4 settings - the only ones that gave me halfway decent text in the final PDF were None and Extra Smooth.
I will experiment with Martin's advice on overlaying the text as images in the IPP file.

I know not to use JPG screenshots but I did a side-by-side compare of a PNG and a 24-bit BMP file and saw minimal difference between the text on the two images in my final PDF output. I have always used 256 (8-bit) screenshots in the past as most of time in the previous manual I was working in it was just screenshots and dialogs.

My PDF export options are set to open zoomed to fit a single page and no TOC (I'm using an XML template to set the openmode=0 from a earlier version of H&M). Compression is set to Deflate for text and No Compression (Best for Screenshots) for the images. When I open my PDF, the zoom (%) depends on the window size (which makes sense as it is fitting the page). Usually my zoom is 83% or so due to my desktop size and a maximized Adobe Reader window.

This may be a stupid question - if I need an image that is a lot larger than its display size, is there a way to create that from screenshots of dialogs? A lot of my pictures are annotated dialogs. I'll play with upscaling the IPP resolution and vertical/horizontal dimenstion and using the IMPICT scaling to increase the dialog size - would this be how I could do this?

Basically what I'm trying to reproduce (or get as close to as possible) is something like the quickstart for Excel (http://download.microsoft.com/download/ ... 0GUIDE.PDF).

In this screenshot both PDF files are fit to page at 80%. I know the Excel is using a different font. I'm using Verdana, perhaps there is a different font that scales better?
CompareToExcel.PNG
Thanks for the help; I'll try the suggestions today and see how it goes.

Sheri
You do not have the required permissions to view the files attached to this post.
User avatar
Sheri Steeves
Posts: 146
Joined: Tue Aug 05, 2008 5:06 pm
Location: Ottawa, Ontario,CANADA
Contact:

Re: Help with Images in Output PDF

Unread post by Sheri Steeves »

Hello,

I should also mention that my PDF layout is a landscape 2-column layout.
The topic width in my column is 5.07" width - I think this is somewwhere else I have gone wrong with my images - I've designed them too wide. I've got a few large-ish things to try and display - some are is 720px - @ 96pi that is a 7.5" image that I'm trying to fit into a 5" column.

Thanks,

Sheri
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Help with Images in Output PDF

Unread post by Tim Green »

Hi Sheri,
This may be a stupid question - if I need an image that is a lot larger than its display size, is there a way to create that from screenshots of dialogs?
Sorry, I should have mentioned that in the very nature of things, you can't get high-resolution screenshots of dialogs, because they are what they are on the screen, and you can't squeeze more pixels out of them. The only way you can do that is to use a high-resolution monitor, provided the program is also high-resolution aware -- you can tell if it is if the text looks razor sharp on a 4K or 5K desktop monitor or a device like the Microsoft Surface or Lenovo Yoga Pro range.

Basically, screenshots in PDFs are not going to look super sharp unless you have a reasonably high resolution image to start with and the PDF is displayed at exactly 100% zoom (which is almost never). At any other zoom setting you will get some degree of degradation because of scaling -- more or less depending on the size and quality of the original image.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Simon Dismore
Posts: 454
Joined: Thu Nov 16, 2006 1:29 pm
Location: London, UK

Re: Help with Images in Output PDF

Unread post by Simon Dismore »

Sheri Steeves wrote:...and played with using SVG files instead as they are vector and not image graphics. The SVG files failed utterly with only partial areas of any dialog screen shots showing once I was actually able to get an SVG.
I've just tried marking up a PNG screenshot using Adobe Illustrator, saving as SVG, importing to H&M 7 and publishing as PDF. Seems to work very well.

Here's a screenshot of my PDF output, zoomed to 400%. The original UI (from my embedded PNG) is jagged, but the callout box and text are smooth.
screenshot annotated in SVG, published to PDF by H&M and viewed at 400%.png
You do not have the required permissions to view the files attached to this post.
User avatar
Sheri Steeves
Posts: 146
Joined: Tue Aug 05, 2008 5:06 pm
Location: Ottawa, Ontario,CANADA
Contact:

Re: Help with Images in Output PDF

Unread post by Sheri Steeves »

Simon,

Thanks for the tip on SVG.

I was pretty sure my main issues with the SVG were the tools I had access to when creating them.

I don't have Illustrator. I tried XARA, which we own but it has known issues with bitmap scaling inside it's exported SVG from what I read on their forums.

I also tried Gimp and exporting to SVG but that did not create an SVG file that H&M could display either.

Thanks,

Sheri
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Help with Images in Output PDF

Unread post by Martin Wynne »

I have always been puzzled by the PDF export from H&M.

My application has an editor section using the same editor as H&M (TRichView), and creates PDF exports using the same PDF engine as H&M (wPDF).

But I don't see the same line-width rounding problems which crop up in H&M. Here for example is an example of my original, and the PDF export viewed at 3 different zoom levels. The PDF is exported directly at 600dpi, i.e. not requiring a reference device:
sb_pdf_export.png
regards,

Martin.
You do not have the required permissions to view the files attached to this post.
User avatar
Sheri Steeves
Posts: 146
Joined: Tue Aug 05, 2008 5:06 pm
Location: Ottawa, Ontario,CANADA
Contact:

Re: Help with Images in Output PDF

Unread post by Sheri Steeves »

Hello,

After Martin's comment, I went back and tried SVG again. Right now the only tool I have to create it is Inkscape (forgot to mention that I had tried this tool as well).

I was able to of course, save as the Inkscape SVG format, as well as a plain and a optimized svg file. The svg file consists of an embedded bitmap image, a line, a rectangle and some text.

All three files will display correctly in IE but fail inside H&M. All I get in H&M is the line, rectangle and text. The embedded bitmap does not show.

Is there some restrictions to SVG files? I can send the sample file if needed.

Sheri
Simon Dismore
Posts: 454
Joined: Thu Nov 16, 2006 1:29 pm
Location: London, UK

Re: Help with Images in Output PDF

Unread post by Simon Dismore »

Sheri Steeves wrote:I went back and tried SVG again. Right now the only tool I have to create it is Inkscape (forgot to mention that I had tried this tool as well). I was able to of course, save as the Inkscape SVG format, as well as a plain and a optimized svg file. The svg file consists of an embedded bitmap image, a line, a rectangle and some text. All three files will display correctly in IE but fail inside H&M. All I get in H&M is the line, rectangle and text. The embedded bitmap does not show. Is there some restrictions to SVG files? I can send the sample file if needed.
I've had a lot of difficulty getting H&M to understand SVG output from Inkscape. I managed to achieve a screenshot using the following steps:
  1. Run Inkscape 0.92.
  2. File > Import the screenshot with the default settings (embed, dpi from file, rendering auto). This creates a new document the same size as the screenshot.
  3. Don't use document properties to add blank space around the screenshot. This will confuse H&M. If you need to crop and/or add margin to the screenshot so that it is the right size for adding your captions, do it in GIMP or similar.
  4. Add your callouts and text. Be very careful not to get into "flowed" text mode which H&M won't understand. Don't use transparency (i.e. in the RGBA values the alpha must be FF).
  5. Save as "plain" rather than "Inkscape" SVG.
  6. Import into H&M.
  7. Publish and cross your fingers.
Here's the result:
screenshot annotated in Inkscape, published to PDF by H&M and viewed at 300%.png
You do not have the required permissions to view the files attached to this post.
User avatar
Sheri Steeves
Posts: 146
Joined: Tue Aug 05, 2008 5:06 pm
Location: Ottawa, Ontario,CANADA
Contact:

Re: Help with Images in Output PDF

Unread post by Sheri Steeves »

Simon,

Thanks for the excellent tips. I will try them and let you know how it goes.

Just one question - what is flowed text? Is that when I use enter to break a line in the text object? Do I need to enter each line separately?

Thanks again,

Sheri
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Help with Images in Output PDF

Unread post by Alexander Halser »

I just did a glance over this thread... do I get it right that it is about "jagged" text in images in PDF files?

There are two kinds of images in general - bit-maps and vector graphics. BMP, JPEG, GIF and PNG are the first category. Text in those images is basically pixels spread over underlying image (screenshot). WMF, EMF and SVG are the latter category. Text in those images scales up and down without (much) quality loss.

So, when you use a bitmap or JPEG image in H&M, it will become either an embedded bitmap or an embedded JPEG image in the PDF. This depends on the image compression that you can set for bitmap images. PNG images become embedded PNGs, to retain the alpha transparency of PNG images.

When you use a WMF, EMF or SVG image, these images contain drawing commands. These drawing commands will be translated by H&M into PDF drawing commands as far as this is possible. If the SVG image contains a text, H&M will output a text into the PDF at this position. We use a 3rd party SVG drawing engine to do that. This text will scale when you zoom into the PDF and will stay crisp at any magnification.

Bit-mapped images such as BMP, JPEG, GIF or PNG are just pixel data in the PDF, together with the command "paint this rectangle of pixels at this position and size". Position and size are not integer values, but fractions of that. The PDF viewer decides how to scale the image and how to round the position and size information to full screen pixels. This can result in small distortions when the image is displayed. Those artefacts are different depending on the PDF viewer and change when you adjust the zoom. The bigger the image originally is, the better are typically the results. In other words: if you have a 3000 x 2000 pixel image that you display in H&M at 50%, there are 2 data pixels per one pixel on the screen. This makes it easier for the PDF reader to scale it and retain a good image quality. The image is, however, much bigger and will increase the PDF size.

When you use large images in H&M, keep in mind that these images are almost ALWAYS scaled down to fit the print width defined by the manual template.
Alexander Halser
Senior Software Architect, EC Software GmbH
Simon Dismore
Posts: 454
Joined: Thu Nov 16, 2006 1:29 pm
Location: London, UK

Re: Help with Images in Output PDF

Unread post by Simon Dismore »

Sheri Steeves wrote:what is flowed text?
I'm not an Inkscape expert but according to http://tavmjong.free.fr/INKSCAPE/MANUAL ... Enter-Flow if you click and drag to create a text area you get one that is output using non-standard markup.
Simon Dismore
Posts: 454
Joined: Thu Nov 16, 2006 1:29 pm
Location: London, UK

Re: Help with Images in Output PDF

Unread post by Simon Dismore »

Alexander Halser wrote:I just did a glance over this thread... do I get it right that it is about "jagged" text in images in PDF files?
Basically it's about the Impict-to-PDF pipeline. An IPP file stores text and shape objects as vectors but they are rendered at low (screen) resolution.

We're talking about using SVG as an alternative to Impict, by having the screenshot as an embedded or linked <image> at the top of the SVG file, followed by shapes and tspans. When published from H&M, the resulting PDF overlays the vector content on the bitmap.
Post Reply