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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Size PDF
  FAQ FAQ  Forum Search   Register Register  Login Login

Size PDF

 Post Reply Post Reply
Author
Message
HJM View Drop Down
Team Player
Team Player


Joined: 01 Feb 21
Location: Netherlands
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote HJM Quote  Post ReplyReply Direct Link To This Post Topic: Size PDF
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 17 Feb 21 at 9:23PM
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

Back to Top
HJM View Drop Down
Team Player
Team Player


Joined: 01 Feb 21
Location: Netherlands
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote HJM Quote  Post ReplyReply Direct Link To This Post Posted: 18 Feb 21 at 8:03AM
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??
Back to Top
HJM View Drop Down
Team Player
Team Player


Joined: 01 Feb 21
Location: Netherlands
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote HJM Quote  Post ReplyReply Direct Link To This Post Posted: 18 Feb 21 at 8:10AM
Here it is




Edited by HJM - 18 Feb 21 at 8:14AM
Back to Top
HJM View Drop Down
Team Player
Team Player


Joined: 01 Feb 21
Location: Netherlands
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote HJM Quote  Post ReplyReply Direct Link To This Post Posted: 18 Feb 21 at 8:12AM



Edited by HJM - 18 Feb 21 at 8:22AM
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 18 Feb 21 at 10:12PM
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
Back to Top
HJM View Drop Down
Team Player
Team Player


Joined: 01 Feb 21
Location: Netherlands
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote HJM Quote  Post ReplyReply Direct Link To This Post Posted: 22 Feb 21 at 11:00AM
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.

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 22 Feb 21 at 10:26PM
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

Back to Top
HJM View Drop Down
Team Player
Team Player


Joined: 01 Feb 21
Location: Netherlands
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote HJM Quote  Post ReplyReply Direct Link To This Post Posted: 23 Feb 21 at 8:01AM
Thanks Ingo
This is clear for me
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 23 Feb 21 at 9:55AM
Originally posted by HJM HJM wrote:

installed the program you suggested,but i got only 3 fonts embedded in the pdf..
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.

Originally posted by HJM HJM wrote:

even 13 fonts dont make 8 mb ? But I cant figure out what changed the size eventually

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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store