High resolution values will render the document with greater detail at the expense of using more system resources. PDF documents do not contain a resolution: it is up to the user to specify resolution when rendering the document. It is also desirable to obtain the converted values in top-left coordinates when converting from PDF units (logical) to pixels (physical), since most rendering systems such as System.Drawing and use the top-left corner of the window as the origin. In the example above, if a resolution of 150 is used, then the size of the page in pixels is 1575 by 1950 (obtained by multiplying 10.5" and 13" by 150). Resolution is the number of dots (pixels) per inch to use when converting logical to physical values. To convert from logical to physical units, a resolution must be provided. Physical values such as pixels are needed when a PDF document is rendered to the screen. Object locations are always calculated based on the media box, regardless of the existence and position of the crop box. So when a PDF viewer such as Adobe Acrobat Reader opens the document shown above, it will report the page size to be 10.5" by 13", even though the crop box size is 8.5" by 11". PDF viewers typically do not show objects that are located outside of the crop box and report the size of the page to be the width and height of the media box. The media box defines the width and height of the page, while the crop box defines the viewable/printable area. If the PDF document does not define a crop box, then it is the same as the media box. PDF documents contain a media box and optionally a crop box. The following image shows this typical PDF document and an object: An object located at point 288, 432 in the PDF has a distance of 4" by 6" from the bottom-left corner of the page (Also obtained by dividing each coordinate of the location point by 72).The size in inches is 8.5" by 11" (Obtained by dividing the width of 612 and the height of 792 by 72).To convert a PDF unit to a physical value such as pixels, the external value for the resolution must be provided.įor example, a typical PDF document may have a page width and height of 612 by 792 units. PDF documents do not have a resolution.One PDF unit is equivalent to a DTP point (1/72"). All locations and sizes are stored as logical values in PDF units.The x-axis extends to the right and the y-axis extends upward. The origin of the document is at the bottom-left corner.PDF documents have the following properties:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |