PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat May 04, 2024 3:23 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Dec 18, 2008 7:58 pm 
Offline

Joined: Thu Dec 18, 2008 6:16 pm
Posts: 2
I am using PDFSharp to merge multiple PDF files into one PDF. I'm following the ConcatenateDocuments example.

The PDFs I am combining are all very similar -- they are almost entirely text and use the same fonts.

When I concatenate many files together the file size is very large and I don't quite understand why. If I combine 10 similarly-sized 1MB files together the resulting file size is about 10MB. However if I try another tool such as ABCpdf the resulting file size is much smaller, around 2MB or a little less.

Is there some sort of setting I am missing here? Any tips on how to get the file size down?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 08, 2009 9:52 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3097
Location: Cologne, Germany
Are you using a Release build? The Debug build creates larger, formatted PDF files for debugging.

Look at the font list of the resulting document. AFAIK the current implementation of PDFsharp doesn't merge the fonts of the source documents (but this is on the To Do list).
With PDFsharp it's more efficient to have a 100 page resource file than 100 single page source files: if you copy 10 pages from a huge 100 page file, fonts will be included only once (I dunno if that helps with your application).

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 08, 2009 2:23 pm 
Offline

Joined: Thu Dec 18, 2008 6:16 pm
Posts: 2
I verified I am using a release build, that doesn't seem to be the issue.

I am not sure how I can tell if PDFSharp is repeatedly including font information for each appended document. When you say to look at the font list of the resulting document, what am I looking for?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 08, 2009 3:06 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3097
Location: Cologne, Germany
Open the PDF in Adobe Reader and press Ctrl+D, then go to the Fonts tab.

Names like "Arial", "Arial,bold", "Arial,italic", "Arial,bolditalic" are no duplicates, but different glyphs of the font Arial.

But if you see identical glyph names more than once then these are likely duplicated fonts (normally these are font subsets so you can't tell for sure if they are identical subsets).

PDFsharp was developed to create new PDF files. It's not yet optimized for merging files.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 75 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