Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Size PDF |
Post Reply ![]() |
Author | ||
HJM ![]() Team Player ![]() Joined: 01 Feb 21 Location: Netherlands Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() Posted: 17 Feb 21 at 2:23PM |
|
How is it possible that a PDF with one page and one image of 37K has a size of over 8MB?
How can I reduce the file size
|
||
![]() |
||
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
|
Hi Henri,
where's the file? The 37 kb image won't be the only one inside... Some hidden embedded inside should be there. If i can have a look... i can tell more ;-) |
||
Cheers,
Ingo |
||
![]() |
||
HJM ![]() Team Player ![]() Joined: 01 Feb 21 Location: Netherlands Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
|
Hi Ingo
here's an example. BUT the code now generates a normal size and I don't know what changed. Could you have a look at this one?? Henri PS I can't attach the pdf here?? |
||
![]() |
||
HJM ![]() Team Player ![]() Joined: 01 Feb 21 Location: Netherlands Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
|
![]() |
||
HJM ![]() Team Player ![]() Joined: 01 Feb 21 Location: Netherlands Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
|
Edited by HJM - 18 Feb 21 at 8:22AM |
||
![]() |
||
mLipok ![]() Senior Member ![]() ![]() Joined: 23 Apr 14 Location: Poland, Zabrze Status: Offline Points: 453 |
![]() ![]() ![]() ![]() ![]() |
|
Usually each separate font it is about 300Kbytes or even more.
But in your case you have 13 dfferent, embeded font. And for example one of them is using 939280 bytes. Use: https://www.debenu.com/docs/pdf_library_reference/ReplaceFonts.php btw. I use https://www.winking.be/products/pdfanalyzer to analyze yours PDF. Check this: ![]() and: ![]() Edited by mLipok - 18 Feb 21 at 10:16PM |
||
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600 |
||
![]() |
||
HJM ![]() Team Player ![]() Joined: 01 Feb 21 Location: Netherlands Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
|
Hi MLipok
installed the program you suggested,but i got only 3 fonts embedded in the pdf.. I changed the code to not embed a font... and now it works, maybe because of embedded fonts but even 13 fonts dont make 8 mb ? But I cant figure out what changed the size eventually But thanks for letting me know to look at the pdf this way. |
||
![]() |
||
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
|
Hi Henri,
you should open your pdf with notepad to analyze by yourself (it's very easy). Each embedded fontfile was inserted as stream. Before each stream you'll find the size in bytes. In your case try to search with... /FontFile2 Besides this search string you'll find the object position for example: /FontFile2 9 0 R This means object 9 0. If you try to search backwards to the beginning of object 9 0 you'll find this: 9 0 obj << /Length 806504 /Length1 806504 >> stream ... This means that the first embedded font content has a stream length of 806504 bytes. Go on searching you'll find the next object here: /FontFile2 13 0 R Searching backwards with 13 0 you'll find this: 13 0 obj << /Length 111108 /Length1 111108 >> stream ... So the second embedded stream has a size of 111108 bytes. At the end you've found 10 streams - each stream with a content size range from 100 kb up to 910 kb. These fonts are resulting in the large file size. Cause these embedded fonts are standard fonts and no special ones you should change to referenced fonts to have a small handy and fast loading file. Cheers, Ingo |
||
Cheers,
Ingo |
||
![]() |
||
HJM ![]() Team Player ![]() Joined: 01 Feb 21 Location: Netherlands Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
|
Thanks Ingo
This is clear for me |
||
![]() |
||
mLipok ![]() Senior Member ![]() ![]() Joined: 23 Apr 14 Location: Poland, Zabrze Status: Offline Points: 453 |
![]() ![]() ![]() ![]() ![]() |
|
You have about 10 fonts not 3. I see you already check @Ingo explanation (how to check it with NotePad) and I try to do the same explanation with PDFAnalyzer.
The screenshot which I post to you cleary indicates that this specific fonts takes alomst 1MB size !!! So why you was suprised that 13 or 10 fonts can make 8 MB ? Did you not notcie the length of specific fonts from the screenshot ? btw. Thanks Ingo for the tip with checking in notepad. Edited by mLipok - 23 Feb 21 at 10:02AM |
||
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600 |
||
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store