PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Jul 02, 2024 7:12 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: XPS Converter file sizes
PostPosted: Fri Oct 30, 2015 4:23 pm 
Offline

Joined: Fri Oct 30, 2015 4:07 pm
Posts: 2
I am using the XPS to PDF convertor function in 1.31 (which I merged into the 1.32 code base) and am getting problems with file sizes.

If my XPS file contains images the resultant PDF file size becomes significantly larger. My XPS file is 3.6mb with 6 pages containing many different images. The creatred PDF is 56mb which is a massive increase.

My assumption from reading previous forum posts is that each image is being bound as a resource to every single page rather than being one single library of images for the whole file.
So far my only workaround is to use a commercial PDF library to compress the PDF but this is totally unsuitable for the application I'm developing.
Has there been any progress or updates to the XPS convertor? Does anyone have any ideas on fixing this issue? I've tried to work with the source code but it is very complex and I am not familiar with the internal structure of PDF files.

I've tried looking for other XPS>PDF convertors to no avail. There are commercial libraries and we don't mind spending a few hundred $ on something we can distribute but many of these cost many thousands which is a lot for one simple function.
Any pointers very welcome!


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 30, 2015 4:59 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 951
Location: CCAA
The Debug build creates larger PDF files with some extra comments. You can check which images there are and whether there are duplicated images (PDFsharp normally avoids duplicating images in a PDF file).

The Release build creates smaller PDF files.

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 30, 2015 5:02 pm 
Offline

Joined: Fri Oct 30, 2015 4:07 pm
Posts: 2
I get the same results with release build and is the same at our clients site using the compiled EXE so it isn't to do with build mode unfortunately.


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 19 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