PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

XPS Converter file sizes
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3224
Page 1 of 1

Author:  Activeplan [ Fri Oct 30, 2015 4:23 pm ]
Post subject:  XPS Converter file sizes

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!

Author:  TH-Soft [ Fri Oct 30, 2015 4:59 pm ]
Post subject:  Re: XPS Converter file sizes

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.

Author:  Activeplan [ Fri Oct 30, 2015 5:02 pm ]
Post subject:  Re: XPS Converter file sizes

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/