Knowledgebase

Back to Articles List

When I use PXC_SetPageBox to save PB_CropBox values and then read it with PXC_GetPageBox, the bottom and top values are interchanged.

Problem:

When I use PXC_SetPageBox to save PB_CropBox values and then read it with PXC_GetPageBox, the bottom and top values are interchanged.

For example, if a value of 50 is saved as the top value and a value of 700 is saved for the bottom value, then PXC_GetPageBox subsequently reads the values as 700 for the top value and 50 for the bottom value.

Answer:

This is the manner in which the software is meant to operate. Please note:

  • The 'y' coordinates in PDF operate from bottom to top, which means that in rect the top is always greater than the bottom.
  • The top-left corner of images that is specified when images are placed.
  • Image dimensions are given in coordinates, as opposed to pixels.
  • Images take full rect, regardless of their size.

Please see the 2.3.1 Coordinate system in the PDF-Tools 4 SDK help file (page 61) for further information.

Was this article helpful?
Yes No Somewhat