PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Apr 28, 2024 7:05 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Jun 14, 2012 6:27 am 
Offline

Joined: Wed Jun 06, 2012 5:48 pm
Posts: 7
Hi

Is there any way to set dpi in pdfSharp?

Thanks
Shahdat


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 14, 2012 8:18 am 
Offline
PDFsharp Guru
User avatar

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

No, PDF files are vector files that have no DPI.

If your question is about images stored in the PDFfile:

PDFsharp stores images as they come. PDFsharp does not (yet) resize images to lower DPI to reduce the file size. Your application knows which image will be used where and at which size, so you should reduce the raster images to the DPI (*) you need before using them with PDFsharp.

Please note that images will be included in the PDF only once, even if they are drawn several times - and they can be drawn at different size (e.g. large company logo on first page, smaller on subsequent pages).

I hope I answered the question. If not, please explain what you are asking for.

(*) calculate pixel width and height of images based on the size they will have on the PDF page and the DPI you want; some raster images have a DPI setting, but this does not affect image file size.

http://stackoverflow.com/a/11029147/162529

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

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