Hi all again,
I'm having some problems using the SetPageBox function to define page margins. I know i can do the math but for "cleaner" code porposes i would like to use this kind of "area limiting" functions.
I'm trying to define the margins using the setPagebox but this is given me unexpected results. Samples:
QuickPDFSetPageBox(This.InstanceID, 1 /* Media box */, This.MarginLeft, This.MarginTop, QuickPDFPageWidth(This.InstanceID) - (This.MarginLeft + This.MarginRight) , QuickPDFPageHeight(This.InstanceID) - (This.MarginTop + This.MarginBottom) )
Correct results. Trim the page size to a smaller area and redifines the base point to This.MarginLeft / This.MarginTop points.
QuickPDFSetPageBox(This.InstanceID,
2 /* Crop box */,
This.MarginLeft,
This.MarginTop,
QuickPDFPageWidth(This.InstanceID) - (This.MarginLeft + This.MarginRight) ,
QuickPDFPageHeight(This.InstanceID) - (This.MarginTop + This.MarginBottom)
)
Incorrect results I think. Page size is also cropped (not the visual area). And the base point is not changed. (Drawing on point 0 is cropped). If this is the correct behaviour I thing the page shouldn't be changed by the function.
QuickPDFSetPageBox(This.InstanceID,
3 /* Bleed box */,
This.MarginLeft,
This.MarginTop,
QuickPDFPageWidth(This.InstanceID) - (This.MarginLeft + This.MarginRight) ,
QuickPDFPageHeight(This.InstanceID) - (This.MarginTop + This.MarginBottom)
)
Nothing happens, maybe i'm not in a production environment (don't know how this is defined).. Also with ArtBox and TrimBox nothing visually happens on my PDF. I'm using the 7.23 version.
If i'm missusing the function sorry but by "my logic" this would be the results I was expecting.
Thanks again for any valuable information, Rui Cruz
|