PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Sep 26, 2024 9:23 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
PostPosted: Tue Jan 12, 2010 5:10 am 
Offline

Joined: Wed Dec 30, 2009 11:01 am
Posts: 5
Hi,

Thanks for this good software. I like to know some ways to improve my PDF quality with this tool. My PDF contains image and text. As far I know, PDFSharp uses LZW compressed bitmap format for PDF compression. My application produces good quality PDF with larger size with this tool. But my user needs to use them in web. For this, I like to reduce the size of the PDF. So, if you guide me it would be nice. Thanks in advance.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 12, 2010 9:05 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3110
Location: Cologne, Germany
Hi!

PDFsharp neither changes the resolution of an image nor does it re-compress JPEG files.

Examples: if you have a picture size 500x500 pixel and you think 250x250 pixel are enough for web, then it's up to you to resize the image. This will eliminate 75 % of the pixel and may save a similar amount of file size.

JPEG allows compression with different quality settings. Using a lower quality for web will also reduce file size.
You should use an image with lossless compression to start from (if possible). Better not re-compress JPEG files, but start with the original file (BMP, TIFF, PNG, ...).

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 13, 2010 4:14 am 
Offline

Joined: Wed Dec 30, 2009 11:01 am
Posts: 5
Thanks for your reply. Okay, is there a way to compress a PDF with PDFsharp API? Actually, in my application the image arrive as a web response and then I cast it as image. However, It would be nice if there is a way through PDFSharp API to save PdfDocument in a compressed way, that is, to compress the complete PdfDocument before saving in PDFSharp. I think I could make you understand my problem. Thanks in advance.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 13, 2010 9:56 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3110
Location: Cologne, Germany
Such a feature is on the wish list, but not on the roadmap.
This won't be implemented in the near future.

Before passing the image to PDFsharp, use something like StretchBlt to create a smaller version of it.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 15, 2010 5:15 am 
Offline

Joined: Wed Dec 30, 2009 11:01 am
Posts: 5
Thanks for your reply and provided information. We hope the wish will be done in near future.


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: Bing [Bot] and 72 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