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

Does XRect use points or pixels?
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1817
Page 1 of 1

Author:  Whit [ Wed Oct 12, 2011 8:40 pm ]
Post subject:  Does XRect use points or pixels?

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.

Author:  Thomas Hoevel [ Thu Oct 13, 2011 7:17 am ]
Post subject:  Re: Does XRect use points or pixels?

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

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