PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jul 14, 2024 2:34 pm

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: Wed Oct 12, 2011 8:40 pm 
Offline

Joined: Wed Oct 12, 2011 8:03 pm
Posts: 4
After reading through the samples, I haven't been able to figure out the answer to this question, so I thought I'd post it here. When using XRect to draw text to the document in PDFSharp, I know it uses the pattern x, y, width and height. I'm going to have a lot of XRects to put on the document in all sorts of different places and haven't been able to determine what unit XRect uses.

What unit(s) are these XRect arguments using? Pixels? Points? If it's some other means than pixels, is there any conversion utility available to convert to/from pixels?


EDIT: So, after I wrote out far too long of a paragraph here, I deleted it and replaced it with what you see now but forgot to update the title. Consider it so fixed.


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 13, 2011 7:17 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
There are no Pixels in PDF files.
You specify class "Unit" for positions &c. and you can use "Unit.FromXxx" to work with Points, Millimetres, Centimetres, ...

See also:
viewtopic.php?p=1231#p1231

_________________
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 27 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