NormalizePage
Text, Page manipulation
Description
Moves and/or rotates the contents of the page so that subsequent drawing operations are at the expected position on the page. All the page boundary boxes are adjusted to the physical size of the page and the page's rotation attribute is reset to zero.
PDF version behavior: normalized BleedBox, TrimBox, and ArtBox page dictionary entries require PDF 1.3. When a lower unlocked document version is active, NormalizePage automatically raises the document to PDF 1.3 through the same boundary-box version gate used by SetPageBox.
Syntax
Delphi
Function TPDFlib.NormalizePage(NormalizeOptions: Integer): Integer;
ActiveX
Function PDFlib::NormalizePage(NormalizeOptions As Long) As Long
DLL
int DLNormalizePage(int InstanceID, int NormalizeOptions);
Parameters
| NormalizeOptions | 0 = Standard normalization 1 = Normalize and also balance the graphics state stack 2 = Maintain existing page structure 3 = Maintain existing page structure and balance the stack |
|---|
Return values
Returns 1 when the page has been normalized. Returns 0 for an unsupported option value, an unavailable current page, or geometry or content that cannot be normalized. Invalid annotation geometry reports LastErrorCode 111
Remarks
The content, annotation rectangles, link quadrilaterals, paths and widget geometry are transformed together using the page's CropBox and rotation. An unrotated page with an offset CropBox still needs the same translation for its content and annotations
When an annotation rotates, its referenced appearance streams are copied, so a page that shares the original appearance keeps its existing rendering