The Document class uses coordinates in 1/720 of an inch. This is the same unit of measure used by the LEADTOOLS Annotations library. This value is stored in the constant UnitsPerInch and is set to 720.
This unit of measure is used because it is device-independent and uniform regardless of the current screen or device resolution (DPI).
A resolution in dots per inch (DPI) is needed to convert from document coordinates to pixels and vice versa. This is done using the following formula:
Pixels = (Document Units / 720) * Resolution
The DocumentToPixels method uses this formula to convert from document units to pixels.
The following formula is used to convert from pixels to document coordinates:
Document Units = (Pixels / Resolution) * 720
The PixelsToDocument method uses this formula to convert from pixels to document units.
When loading documents, each page size is stored in the Size property in document units. Although rare, some document formats such as TIFF and PDF support having different size pages and thus, the size is stored in the page object itself and not in the document.
The global document resolution is parsed by the loader and set in the DocumentPages.DefaultResolution value. Again, each page maybe have different resolution depending on the document format and hence, DocumentPage.Resolution will contain the actual resolution of the page (in most cases, equal to DocumentPages.DefaultResolution.
Most of the coordinates uses values of LeadPointD, LeadSizeD and LeadRectD that represent a point, a size and a rectangle area. The Document class contains the following helper methods to quickly convert any of these values from document to pixel coordinates and vice versa: Document.PointToPixels, Document.PointToDocument, Document.SizeToPixels, Document.SizeToDocument, Document.RectToPixels and Document.RectToDocument.
Loading Using LEADTOOLS Documents Library
Creating Documents with LEADTOOLS Documents Library
Uploading Using the Documents Library
Loading Encrypted Files Using the Documents Library
Parsing Text with the Documents Library
Barcode processing with the Documents Library
Products |
Support |
Feedback: Documents Library Coordinate System |
Introduction |
Help Version 19.0.2017.6.21
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.