GetPageMetricsToString
Page properties
Description
Returns the dimensions (MediaBox and CropBox) and rotation of the specified page range in the document.
Syntax
Delphi
Function TPDFlib.GetPageMetricsToString(StartPage, EndPage, Options: Integer): AnsiString;
DLL
const char* DLGetPageMetricsToString(int InstanceID, int StartPage, int EndPage, int Options);
Parameters
| StartPage | The first page in the range |
|---|---|
| EndPage | The last page in the range |
| Options | 1 = Binary output Nine double values per page are streamed in a continuous array. For each page there are the elements of the MediaBox, the elements of the CropBox and the value of the Rotation entry. 2 = Text output The values are displayed in text format, separated by tab (char 9) characters and with CRLF after each page. |
Return values
Returns the MediaBox and CropBox dimensions plus the rotation for each page in the range: Options 1 packs nine Double values per page into a binary string, Options 2 returns one tab-delimited line per page. Returns an empty string for any other Options value; page numbers outside the document are clamped.