PDF Output Issue

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

Moderators: Alexander Halser, Tim Green

Post Reply
Ben Hatcher
Posts: 5
Joined: Thu Nov 26, 2020 12:54 pm

PDF Output Issue

Unread post by Ben Hatcher »

Hi folks,

I'm new to this forum and relatively new to H&M. The project I'm working on is very image heavy, It's an installation guide. When I come to output a PDF, I receive an error; 'Error when completing page x: Out of memory'. This error is repeated a few times for different page numbers. On completion, images are missing from some pages. The missing images aren't only from those reported in the errors either.

Any help on this would be greatly appreciated, It's becoming infuriating.

Thanks,

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

Re: PDF Output Issue

Unread post by Tim Green »

Hi Ben,

PDF uses a lot of memory while it's being generated because multiple uncompressed versions of the output must be juggled to create the final product. You can check what's happening on your computer and where the bottleneck is by starting Task Manager with a right-click on the Windows taskbar and then keeping the Performance tab open while you're publishing. Check both the Memory and Disk sections.

One thing that can seriously bloat your PDFs is when you use very large images and resize them in Help+Manual or in Manual Designer in your template. This does not physically resize the images. Instead, it exports the full size image to the PDF along with a scaling command. This gives you excellent image quality for zooming and printing, but it will also bump up the size of your PDF file, of course -- and by a lot if the images are very large. You can reduce this without physically resizing the images by going to Configuration > Publishing Options > PDF > PDF Options and setting 75% JPEG compression in the Image Quality field. That generally provides a good balance between image size and quality.
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.
Ben Hatcher
Posts: 5
Joined: Thu Nov 26, 2020 12:54 pm

Re: PDF Output Issue

Unread post by Ben Hatcher »

Hi Tim,

Thank you for your reply. Indeed the images are taken on a phone and dropped straight into the project. I have tried all compression percentages including 10% with no change. Whole pages are being missed. I've monitored memory and disk; disk barely raises above 1% and memory peaks at 55% (8GB Ram). I have also excluded 95% of the project and only tried to export one topic with no joy either. Have you any other ideas?

Thank you for your help,

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

Re: PDF Output Issue

Unread post by Tim Green »

Hi Ben,

This is unusual. Are you using the current build, which is 8.2.1 Build 5670? You can check this with Help > About and download the current installer here:

https://www.helpandmanual.com/downloads.html?upd
Indeed the images are taken on a phone and dropped straight into the project.
When you say "dropped straight into the project" are the images embedded or stored as external files? If they are embedded you should immediately convert them to external files. You can test this by selecting the image by clicking on it. If it doesn't turn negative when selected it's embedded and needs to be converted to an external file. Just right-click on it and select the option for converting to a file. When images get embedded on insertion HM prompts you to convert directly and you should always do this.

Also, what format are the images?
I've monitored memory and disk; disk barely raises above 1% and memory peaks at 55% (8GB Ram). I have also excluded 95% of the project and only tried to export one topic with no joy either.
Then it's definitely not a memory issue.
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.
Ben Hatcher
Posts: 5
Joined: Thu Nov 26, 2020 12:54 pm

Re: PDF Output Issue

Unread post by Ben Hatcher »

Hi Tim,

So I've played further with this. The images are enormous. The images are set as external but when dragged into the project, I was setting the desired size by adjusting display size. As an experiment, I've re-sized the external images to match the display size ones, replaced the images in the project and output PDF. No error message, all images and pages appear in the PDF. Result... The Issue I have now, is the definition of the re-sized images is poor. I must admit my knowledge of pixels etc isn't the best, more experimenting required.

Thanks for your help,

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

Re: PDF Output Issue

Unread post by Tim Green »

Hi Ben,

Yes, modern phone photos can be huge. If you're using a current Samsung Note 10 or a top-range Xiaomi you can actually have 108 megapixel images, for example, which is over four times the resolution of many top-of-the line digital SLRs.

If you're going to be resizing the images you need to use a program with a good algorithm that can reduce the size without sacrificing too much quality. You can do this with the Impict graphics tool included with Help+Manual, and you can do it from right within Help+Manual itself:
  1. Select the image in the HM editor, then right-click on it and select Picture > Edit in Impict
  2. In Impict, click on the image to select it, then right-click and select "Resize and Effects"
  3. Leave all the settings as they are and resize by entering new dimensions or with the Resize % button, then hit OK to apply
  4. Back in the main editor, select the Resize Canvas tool to the left of the Zoom tool in the toolbar to resize the background to the new size of the image. Then save and exit.
  5. Back in Help+Manual switch to a different topic and back again to reload with the edited image, or right-click on the image and select Picture > Reload to reload it.
Impict has full documentation with exercises and tutorials that you can display with F1.

resize_in_impict.png
You do not have the required permissions to view the files attached to this post.
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.
Ben Hatcher
Posts: 5
Joined: Thu Nov 26, 2020 12:54 pm

Re: PDF Output Issue

Unread post by Ben Hatcher »

Hi Tim,

Thank you for your really helpful reply. I hadn't paid much attention to the inbuilt image editor. I've tried what you have suggested. The picture has resized but a white area is left where the original sized image was. So the original image size is 1085x2902, I reduce its size by 92% via the method you kindly spoke of. The image now appears it has reduced in size but actually, the picture (colour) is 8% and the remaining 92% is white space and of the original 1085x2902 size. Re-sizing the canvas doesn't appear to do anything but in actual fact it is re-sizing around the original size image. I hope this explanation makes sense.

Re-sizing all the images manually in photoshop seems the quickest method.

Kind regards,

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

Re: PDF Output Issue

Unread post by Tim Green »

Hi Ben,
The picture has resized but a white area is left where the original sized image was. So the original image size is 1085x2902, I reduce its size by 92% via the method you kindly spoke of.
You just skipped an important step in the instructions:
Back in the main editor, select the Resize Canvas tool to the left of the Zoom tool in the toolbar to resize the background to the new size of the image.
That is the tool with four directional arrows to the left of the Zoom tool in the Impict toolbar. It resizes the image canvas (background) to match the size of the actual image content. (This also works on images that have multiple components.) 8)
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.
Ben Hatcher
Posts: 5
Joined: Thu Nov 26, 2020 12:54 pm

Re: PDF Output Issue

Unread post by Ben Hatcher »

Hi Tim,

I've tried that and it doesn't adjust anything.

Thanks,

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

Re: PDF Output Issue

Unread post by Tim Green »

Ben Hatcher wrote: Mon Nov 30, 2020 2:35 pm I've tried that and it doesn't adjust anything.
Yes, it does. It will not resize the window around the image but it will resize the canvas (background of the image). If you then re-save you will not have the white area around the image because the canvas and the image will be the same size.

impict_resize_button.png
You do not have the required permissions to view the files attached to this post.
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.
Post Reply