Significant PDF size discrepancy between machines

Please post all questions on Help+Manual 8 here

Moderators: Alexander Halser, Tim Green

Post Reply
Ron Horn
Posts: 84
Joined: Tue Sep 10, 2019 10:47 pm

Significant PDF size discrepancy between machines

Unread post by Ron Horn »

Republishing 20+ manuals today. All but 1 is 30mb or below in size.

One of the manuals that used to be 31mb is now 161mb. The only difference being the machine the manual is published on. Both machines running 8.32.5795 on Win10 Pro. One machine has a fixed license, the other is using a floating license.

Machine A - H&M fixed license
Machine B - H&M floating license

Re-copied entire H&M project from Machine A to a NEW folder on Machine B
Re-published newly copied project on Machine B, PDF is still 161mb.
Re-published same project on Machine A, still 31mb.

Comparing the sizes of the other manuals on Machine A that were generated about a year ago to those on Machine B that were regenerated from the same project source in the past week, they are all nearly the same size - except for the one in question.

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

Re: Significant PDF size discrepancy between machines

Unread post by Martin Wynne »

Ron Horn wrote: Tue Mar 01, 2022 11:31 pm Any ideas?
Hi Ron,

PDF file size issues nearly always come down to fonts, and which ones your project uses in the rogue project.

Check which fonts are installed on each machine, and any differences between the machines.

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

Re: Significant PDF size discrepancy between machines

Unread post by Tim Green »

Hi Ron,

Further to Martin's comment, a size difference of that magnitude means that the larger PDF has been generated with the text as glyphs, i.e. little graphics for every character instead of real text. You can check this by trying to select and search for text in the PDF -- you won't be able to.

One possible cause for this is, as Martin suggested, that the fonts are not available or do not include all the characters you are using. Then Windows switches to glyphs instead.

Another possibility is that the language and font embedding settings on the rogue machine may be different, although that is less likely since they are project and not global settings. But still, check that the language settings match the project and look at the font embedding settings in Configuration > Publishing > PDF > Font Embedding.

While you are at it, also check the PDF reference driver on the rogue machine. HM uses a printer driver to generate PDF (remember that a PDF is really just raw printer data in a file, and a PDF viewer is basically a printer that prints to the screen instead of to paper). You can access the reference printer driver settings in View > Program Options > PDF. By default, HM will use the screen device driver, but you can often get better results by using a real printer driver. By the same token, some printer drivers can also cause problems, particularly optimized drivers from printer manufacturers. It is generally better to use one of the standard drivers supplied with Windows.

If the driver of your own installed printer doesn't work well you can activate and select one of the known good standard drivers included with Windows. You don't have to actually have the physical printer. Just add the driver with Add Printer in the printer section of the Windows Control Panel and then select it as your reference driver in Help & Manual. The standard Windows Brother HL-2040 and HL-2060 drivers deliver good results, and standard LaserJets and DeskJets are usually also OK. You can also use the Microsoft XPS Document Writer driver, which is always installed in all current Windows versions. However, this driver has the restriction that it can't be set to the higher output resolutions supported by more recent printer drivers.

Windows 10 no longer provides direct access to the list of standard drivers. To access it you must do this:

Select Add Printer, then click on "The printer I want isn't listed"
Next: Select "Add a local printer or network printer with manual settings"
Next: Accept the suggested port (this is irrelevant)
Next: Click on "Windows Update" and wait a couple of minutes for the list to display.

The last step can really take a few minutes. Go and make a cup of coffee... ;-)

​After this you will be able to select a driver from the list.​

Important Notes:

DON'T use "PDF printer drivers" like Adobe Distiller for this! This will not work properly and is actually counter-productive.

The output resolution and default paper size are set in the settings for the printer driver in the Windows Control Panel. The default page size set for the printer driver must be at least as large as the page size you have set in your print manual template. If it is smaller you will get clipping in your PDF pages.
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.
Ron Horn
Posts: 84
Joined: Tue Sep 10, 2019 10:47 pm

Re: Significant PDF size discrepancy between machines

Unread post by Ron Horn »

Thanks for the great info and details. I see I was on the correct path prior to submitting the post.

I thought about font embedding but if anything the problem machine has more fonts installed than the other one. I did assume what you said (it's a project level setting) but also verified matched settings on the 3 Adobe PDF pages. But I need to look closer at the actual font being used in THIS particular document and ensure both do have it.

I also looked at the program option for PDF export. Use 'screen' caught my eye since the problem machine does have a 4k screen and I've set it to 150 DPI. So I tried default printer here - my HP inkjet. Made very little difference. Plus, only ONE document exhibits this PDF size problem. The others are 95-99% the same size on both machines.

So it must be fonts. The glyphs idea would certainly explain the size difference - however, search for (and selecting) text works in the large document. I use PDF Exchange as my reader. FWIW, Export Symbol Fonts as Glyphs is selected on each machine.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Significant PDF size discrepancy between machines

Unread post by Tim Green »

Hi Ron,

If the text is searchable it is unlikely that the fonts alone could account for a size discrepancy of that magnitude. Recent versions of Windows with Unicode fonts have much larger font files than older versions, so embedding more fonts would make the file larger, but not that much larger unless you were using and embedding a huge variety of fonts. You can check that in Adobe Reader -- just open the PDF in it and look in Properties in the File menu, and then the Fonts tab.

With searchable text and a size discrepancy of that magnitude the culprit would usually be graphics. Check in Configuration > Publishing > PDF > PDF Options and then the Image Quality settings. Having a lot of large bitmap graphics without some compression added can make a huge difference.

Other graphics possibilities are the use of different, larger versions of the same graphics; including more graphics; and using a PDF template with very large graphics. I've seen some users accidentally create templates by just selecting graphics without realizing that they were super high resolution. I've seen some that were 12,000 pixels wide and over 50MB for a single image, for example.
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.
Ron Horn
Posts: 84
Joined: Tue Sep 10, 2019 10:47 pm

Re: Significant PDF size discrepancy between machines

Unread post by Ron Horn »

Sampled the problem document and another similar in page count yet only 30mb in size. They both include 14 fonts.

There are allot of images (189 png files/23mb) and Image Quality is set to JPEG 100% (good quality) on both machines.

Another thing I'll try later today is installing H&M on a 3rd machine. Then I'll just declare the problem machine defective :vconfused:
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Significant PDF size discrepancy between machines

Unread post by Tim Green »

Hi Ron,

This is very weird. If it's not the graphics and not the fonts, then there's not a lot it could be. However, since only one project is affected it's also not some general problem on the computer in question. Questions to cover all the bases:

1) Does this machine have the same version of Help+Manual installed? Check with Help > About.
2) Are you absolutely sure you're publishing from the same project and using the same PDF template?
3) Are you absolutely sure that you're looking at the same output files? Double-check the output location on the affected machine.

I know these questions sound silly, but I want to be sure that we haven't missed anything. :?
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
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Significant PDF size discrepancy between machines

Unread post by Martin Wynne »

Ron Horn wrote: Wed Mar 02, 2022 5:45 pmThere are a lot of images (189 png files/23mb) and Image Quality is set to JPEG 100% (good quality) on both machines.
Hi Ron,

Converting a screenshot PNG (line graphics) to JPG and back to PNG can vastly increase the PNG file size.

Try opening the PDFs in a PDF editor and extracting the images. Compare the image file sizes from each machine.

My guess is that the entire difference in PDF file size will be down to one specific image -- you don't have a BMP image accidentally mixed in there perhaps?

cheers,

Martin.
Last edited by Martin Wynne on Thu Mar 03, 2022 12:31 pm, edited 1 time in total.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Significant PDF size discrepancy between machines

Unread post by Tim Green »

Martin Wynne wrote: Thu Mar 03, 2022 12:24 pm Converting a screenshot PNG (line graphics) to JPG and back to PNG can vastly increase the PNG file size.
This no longer happens in the current version of Help+Manual. PNG images are supported natively in PDF, including PNGs with alpha transparency.
Try opening the PDFs in a PDF editor and extracting the images. Compare the image file sizes from each machine.
This is still worth a try, however, to see if something screwy has nonetheless happened to the images. 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.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: Significant PDF size discrepancy between machines

Unread post by Martin Wynne »

Hi Ron,

Are both machines using the same version of the same PDF reference driver?

Are both drivers set to the same print quality (DPI) and paper size? Is one on A4 and the other on US Letter?

Are any images set to 100% page size both ways?

Do both PDFs have the same number of pages?

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

Re: Significant PDF size discrepancy between machines

Unread post by Tim Green »

Hi Ron,

We'd like to compare the 2 PDFs to see what is going on here. Please zip the small and large one and send me a download link at support AT ec-software.com (replace the AT with @). This is really the only way to figure out what's going on here. 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.
Ron Horn
Posts: 84
Joined: Tue Sep 10, 2019 10:47 pm

Re: Significant PDF size discrepancy between machines

Unread post by Ron Horn »

Trust me, at this point in time, after this many iterations, no question is too silly :)

The machine is now officially "haunted". I WISH I had just recorded my entire screen over the past 30 minutes to prove I'm not insane.

This MORNING as I reviewed everyone's replies and prepared to try more things, I just published the PDF again. To my astonishment it was only 30mb. BUT, the file name was longer. The old larger file was still in the same PDF output folder I use for all LOCAL publishing. I guess I may have changed the name but don't recall doing that. So unless I was sleep-working, nothing changed over night. :vconfused:

Next, I published for release - which in my flow just uses a Publishing Task with a post build event that copies the output from the same LOCAL build folder to another folder in the Git project. Large file again. Published LOCALLY right afterwards. Large file again. Closed H&M, opened project, published locally, back down to 30mb. Published for release, now still at 30mb.

So I still have more iterations to go before I figure out what I'm doing wrong. Also, I've got to step away for a few days. But I did just complete a long recording that I can share next week after I edit out the slow parts. Camtasia bogs down anything I try to use while recording.

As for drivers, I'm using the PDF Export setting that uses the screen as the reference device. Did try the default HP printer as mentioned earlier - no change.
Some images may be at 100% but in total they only add up to around 28mb
Same 128 pages in each PDF.
Comparing images - I'll check that, since I still have a copy of the 160mb version whose name I apparently changed yesterday.
As I mentioned initially, same version/build on both machines. BUT, it's not the CURRENT version, so that's on the table to try once I track down the mystery.
Double checked, same project, same template. I literally copied them from the other machine.
I watch the output folder AS the file is built, so I can see the size go to zero as the file write begins and change to 30mb or 160mb the instant it finishes the build.

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

Re: Significant PDF size discrepancy between machines

Unread post by Tim Green »

Hi Ron,

Hah, Gremlins... We'd still like to compare the big and small file, however. That will let us know WHAT is causing the size difference, which should also make your troubleshooting easier.

Are you publishing directly into a Git-managed directory system? My experience with Git so far is limited, but I would tend towards recommending never publishing into any version control directory system. :?
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.
Ron Horn
Posts: 84
Joined: Tue Sep 10, 2019 10:47 pm

Re: Significant PDF size discrepancy between machines

Unread post by Ron Horn »

The source and published PDF is kept in a locally checked out Git file structure. When publishing for release that output is generated into a local non-git folder then (post action) copied into the Git structure. I'll get the two different files sent over in a few days once I get back into the office.
Post Reply