Page 1 of 1

Optimization improvements

Posted: Tue Apr 24, 2018 1:42 pm
by Timur Born
Hello,

today I tried to optimize an image heavy PDF (12 pages) down from its original size of 22.4 mb. Unfortunately Editor was only able to optimize it down to 18.7 mb, even with enforced (averaged) downsampling to 150 dpi and "Minimum" JPG quality. As a comparison, PDF24 managed to compress the same file down to 5.5 mb at minimum JPG quality and about 6.6 mb at 75% JPG quality. Even at "Maximum" JPG quality Editor's output images are marred with more JPG artifacts than PDF24's output at 75% JPG quality.

I think the reason for Editor's inability to compress the images further down is due to its downsampling algorithms. Bikubik is sharpest, Average is a bit smoother and the unnamed one's output is sharp but blocky to the point that I wonder why it's even an option. What is missing is a really smooth algorithm that would match the smoothness of PDF24's output and thus allow for much better JPG compression at any JPG quality setting.

Frankly, at its current state I always shied away from Editor's optimization function, especially because of the bad JPG compression output. There also is no way to calculate the final file size without actually saving the file, PDF24 offers such a function and thus makes hitting a target size easier.

On a positive side-note: This specific document optimized by Editor can be compressed to smaller sizes via 7Z or RAR compared to those compressed with PDF24, even though the Editor files start at a bigger size. One reason may be that many of the 238 images in that file are just carbon copies and PDF24 curiously increases the image count to 276.

Re: Optimization improvements

Posted: Tue Apr 24, 2018 11:36 pm
by Patrick-Tracker Supp
Hello Timur,

Thank you for the post. Could you please provide some supporting files so that we might take this to the dev team for consideration?
Thank you!

Re: Optimization improvements

Posted: Tue Apr 24, 2018 11:47 pm
by Timur Born
I sent an e-mail with three sample files: The original, Editor's optimized version ("Minimum" JPG quality, average resampling) and PDF24's optimized version (75% JPG quality).

Re: Optimization improvements

Posted: Thu Apr 26, 2018 11:46 pm
by TrackerSupp-Daniel
Hi Timur,

We've received your email, and after the day of investigation the Development team has requested we make it into an internal development ticket for them to reference while they asses this. and work on it.

I am sorry we do not have an immediate solution, but we are working on it.

Re: Optimization improvements

Posted: Fri Apr 27, 2018 10:02 am
by Timur Born
Thanks and no problem, I can use PDF24 in the meantime and really don't need it often. Overall I am more concerned about the compression bugs that I reported about in September and just revisited in another thread.

Re: Optimization improvements

Posted: Fri Apr 27, 2018 12:54 pm
by Tracker Supp-Stefan
Thanks for the understanding Timur,

I will look at the other topic now as well!

Cheers,
Stefan

Re: Optimization improvements

Posted: Fri Apr 27, 2018 2:08 pm
by Special
Timur Born wrote:There also is no way to calculate the final file size without actually saving the file, PDF24 offers such a function and thus makes hitting a target size easier.
This part always bugged the hell out of me that the Editor cannot do, I'm going to have to check out PDF24 now if it can calculate an end result file size.

Re: Optimization improvements

Posted: Fri Apr 27, 2018 2:34 pm
by Tracker Supp-Stefan
Hi All,

To show anything other than approximation - that other tool is most likely doing most of the conversion in the background - otherwise providing an exact estimate is really tricky!
I will ask our devs if we can include some form of estimation in the Editor as well!

Regards,
Stefan

Re: Optimization improvements

Posted: Fri Apr 27, 2018 2:49 pm
by Timur Born
This is indeed very likely the case. CPU load and estimation time of very large documents supports that assumption.

Re: Optimization improvements

Posted: Fri Apr 27, 2018 4:43 pm
by Special
I would love even a rough ballpark.

Re: Optimization improvements

Posted: Fri Apr 27, 2018 10:50 pm
by Patrick-Tracker Supp
Hi Guys,

I have added these points to the ticket, as well as the issues mentioned here: viewtopic.php?f=62&t=29531

Thank you for your patience and understanding while we work towards a solution.

Sincerely,

Re: Optimization improvements

Posted: Fri Apr 27, 2018 11:05 pm
by HaPe
Didn't know about PDF24,so I thought I give it a try myself (all "tests" were done with default settings)

17MByte file 43pages => new file size after "compression" : 20 MByte :(

88MByte file 934 pages => new file size after compression : 80 MByte :|
compression of the 88 MByte-file took 8 Minutes :(
(it's better to skip the calculation time and to save the file right away otherwise one will have
to wait ages - in this case 16minutes......

155 MByte file containing only 9 pictures (each picture 15-20MByte) => compressed : 9MByte/good quality :)
compression time less than 1 minute :)
====================================================================
same test with PDF-XChange:
17 MByte file 43pages => new file size after compression : 12 MByte :)

88 MByte file 934 pages => new file size after compression : 49 MByte :) :)
compression time about 2 Minutes :)

155MByte file containing only 9 pictures (each picture 15-20MByte) => compressed : 4 MByte/good quality :)
compression more less than 2 minute - not as fast that of PDF24

================================================================
This "test" is of course not representative,but I hope that any changes made to the current compression algorithm
will not affect my results achieved with PDF-XChange......

Re: Optimization improvements

Posted: Fri Apr 27, 2018 11:15 pm
by TrackerSupp-Daniel
Quite to the contrary,
Any changes to the algorithm should improve the results with PDF-XChange, Not make them worse :)

Re: Optimization improvements

Posted: Mon Apr 30, 2018 1:01 pm
by Timur Born
PDF24 always resamples and recompresses images to whatever DPI you set up (default 144). So you can end up with larger sizes if your original images were smaller than what you set up in PDF24. Editor comes with useful options to circumvent these traps. But the current output of Editor is too large and sometimes even of considerably lower quality, despite the larger size.

Re: Optimization improvements

Posted: Mon Apr 30, 2018 5:26 pm
by TrackerSupp-Daniel
Hi Timur,
Thank you for reiterating those points, we are looking into it, and will continue to work on improvements.

Re: Optimization improvements

Posted: Mon Apr 30, 2018 5:42 pm
by bqxmprij
Timur Born wrote:Hello,

today I tried to optimize an image heavy PDF (12 pages) down from its original size of 22.4 mb. Unfortunately Editor was only able to optimize it down to 18.7 mb, even with enforced (averaged) downsampling to 150 dpi and "Minimum" JPG quality. As a comparison, PDF24 managed to compress the same file down to 5.5 mb at minimum JPG quality and about 6.6 mb at 75% JPG quality. Even at "Maximum" JPG quality Editor's output images are marred with more JPG artifacts than PDF24's output at 75% JPG quality.

I think the reason for Editor's inability to compress the images further down is due to its downsampling algorithms. Bikubik is sharpest, Average is a bit smoother and the unnamed one's output is sharp but blocky to the point that I wonder why it's even an option. What is missing is a really smooth algorithm that would match the smoothness of PDF24's output and thus allow for much better JPG compression at any JPG quality setting.

Frankly, at its current state I always shied away from Editor's optimization function, especially because of the bad JPG compression output. There also is no way to calculate the final file size without actually saving the file, PDF24 offers such a function and thus makes hitting a target size easier.

On a positive side-note: This specific document optimized by Editor can be compressed to smaller sizes via 7Z or RAR compared to those compressed with PDF24, even though the Editor files start at a bigger size. One reason may be that many of the 238 images in that file are just carbon copies and PDF24 curiously increases the image count to 276.
Try printing the pdf with PDF-Exchange Standard to a new pdf. You will have to adjust the settings to compress the images, but this always works better for me than the optimization feature.

Re: Optimization improvements

Posted: Mon Apr 30, 2018 5:47 pm
by TrackerSupp-Daniel
Hi bqxmprij
While it may work better for file size, please be aware that the results of printing a PDF to PDF are not always ideal. This process can lead to eventual document corruption.
Simply be wary whenever using this as a workaround, and be sure to keep a stable copy of the original document if you are planning to take this route.

Re: Optimization improvements

Posted: Tue May 01, 2018 8:08 am
by Timur Born
Since I recently discovered that Editor's optimization does not properly compress stamps and that differently sized images are handled differently I can imagine that the whole optimization process is somewhat flawed for the time being. So comparisons are currently rather meaningless until we know that those bugs are ironed out. In the meantime I will use PDF24 (Ghostscript) when I need good recompression in combination with good image quality.

Reprinting is no real alternative, because the results are often flawed for my type of documents, both out of Editor (no proper Type 1 font support) and Adobe Reader (tends to introduce blank 1 pt lines in image parts).

Re: Optimization improvements

Posted: Tue May 01, 2018 8:19 am
by Tracker Supp-Stefan
Hello Timur,

We do what we can with compression, but indeed there might be some more optimal approaches in some scenarios.
We will continue investigating and improving as much as we can in this respect!

Regards,
Stefan

Re: Optimization improvements

Posted: Tue May 01, 2018 10:57 am
by Timur Born
Here is a comparison image to demonstrate that the differences are not subtle.
Editor_vs_PDF24_150dpi.png
Editor_vs_PDF24_150dpi.png (24.72 KiB) Viewed 5250 times
PS: "Maximum" seems to be roughly 85% JPG quality?!

Re: Optimization improvements

Posted: Tue May 01, 2018 11:59 am
by Tracker Supp-Stefan
Thanks for the sample Timur!

Regards,
Stefan