SetOrigin
Measurement and coordinate units
Description
Sets the origin for all subsequent drawing operations. The origin will only be changed for the selected document, either loaded using LoadFromFile, LoadFromStream or LoadFromString or subsquently selected with SelectDocument.
This function does not have an effect on the standalone functions such as ExtractFilePageText or direct access functions such as DAExtractPageText. For those it's necessary to rather use the SetGlobalOrigin function.
Origin options 1, 2 and 3 should not be used as there is a historical error for documents with a MediaBox that is not positioned exactly at the coordinate system origin. Rather use origin options 4, 5, 6 or 7 to ensure compatibility with all documents.
Syntax
Delphi
function TDebenuPDFLibrary1811.SetOrigin(Origin: Integer): Integer;
ActiveX
Function DebenuPDFLibrary1811.PDFLibrary::SetOrigin(Origin As Long) As Long
DLL
int DPLSetOrigin(int InstanceID, int Origin)
Parameters
Origin |
Specifies which page corner to use for the origin: 0 = (0,0) of underlying coordinate system 1 = Top left (deprecated, rather use 5 or 7) 2 = Top right (deprecated) 3 = Bottom right (deprecated) 4 = Bottom left of crop box 5 = Top left of crop box 6 = Bottom left of media box 7 = Top left of media box Anything else = same as 0 |