PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Aug 21, 2024 2:16 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: PDF size is huge!
PostPosted: Mon Feb 08, 2016 1:37 pm 
Offline

Joined: Mon Feb 08, 2016 1:28 pm
Posts: 3
Hi, is it possible to inspect a PDF to see why it is so huge?
I am appending several pages, each with a couple of small PNG files (with an alpha channel).
The source PNGs are a few tens of kb, but the PDF is as large as 90MB!
(Even a single page with just 3 images is around 15MB)

Happy to send you a PDF to look at.

Many thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: PDF size is huge!
PostPosted: Mon Feb 08, 2016 2:37 pm 
Offline

Joined: Mon Feb 08, 2016 1:28 pm
Posts: 3
OK I have a solution.

I manually changed the PNG to JPG and used those instead.
The file size of the PDF went from 15MB to 600KB, thats 25 times smaller, or 4% of the original size!!!!

I think PDFsharp need to review how they handle PNGs!


Top
 Profile  
Reply with quote  
 Post subject: Re: PDF size is huge!
PostPosted: Mon Feb 08, 2016 4:42 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 971
Location: CCAA
C10B wrote:
I think PDFsharp need to review how they handle PNGs!
I think they can't do that if you don't submit some of your PNG files. There are no problems with the PNG files I have tested.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
 Post subject: Re: PDF size is huge!
PostPosted: Mon Feb 08, 2016 4:50 pm 
Offline

Joined: Mon Feb 08, 2016 1:28 pm
Posts: 3
TH-Soft wrote:
C10B wrote:
I think PDFsharp need to review how they handle PNGs!
I think they can't do that if you don't submit some of your PNG files. There are no problems with the PNG files I have tested.


I'm very happy to send the PNG, PDF and JPG to the company if they think they will find it useful.

But at the moment I'm OK using JPG


Top
 Profile  
Reply with quote  
 Post subject: Re: PDF size is huge!
PostPosted: Wed Feb 17, 2016 12:16 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3109
Location: Cologne, Germany
C10B wrote:
I think PDFsharp need to review how they handle PNGs!
C10B didn't send any of their PNG files yet.

For testing I used two PNG files with screen shots, created with MS Paint.
The first has a file size of 101.516 bytes.
The second has a file size of 128.616 bytes.

A Hello World PDF has a file size of 18.024 bytes.
The Hello World PDF with the first image has a file size of 102.652 bytes.
The Hello World PDF with the second image has a file size of 130.135 bytes.

So there is no general problem with the handling of PNG files. If you encounter problems with specific PNG files then please submit samples for investigation.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group