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

Large file size
https://forum.pdfsharp.net/viewtopic.php?f=2&t=523
Page 1 of 1

Author:  ilivewithian [ Fri Oct 31, 2008 10:00 am ]
Post subject:  Large file size

I'm using reporting services to generate pdf files, they have images and tables and a bunch of other bits.

I heard that PDFsharp was much better at saving pdf files and producing smaller files, however when I saved the files using PDFSharp the files ended up twice the original size.

Has anyone got any ideas why this might happen?

Thanks

Author:  gastan [ Sat Nov 01, 2008 7:00 pm ]
Post subject: 

maybe u need to turn compression on.

Author:  ilivewithian [ Mon Nov 03, 2008 8:09 am ]
Post subject: 

How do I do that?

I thought it was on by default.

Author:  Thomas Hoevel [ Mon Nov 03, 2008 8:58 am ]
Post subject: 

The debug build creates (by default) "verbose" PDF files to make them more readable to humans.
The release build creates compact PDF files.

Author:  ilivewithian [ Mon Nov 03, 2008 9:00 am ]
Post subject: 

Ah, i didn't realise that, thanks.

Author:  Thomas Hoevel [ Mon Nov 03, 2008 12:10 pm ]
Post subject: 

The line that makes the difference is in class PdfWriter:
Code:
#if DEBUG
      layout = PdfWriterLayout.Verbose;
#endif

I'm afraid there is no way to change this behaviour at runtime.
Remove this line if you want compact PDF files even with the DEBUG build.

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