Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Set margins of page |
Post Reply
|
| Author | |
rmgdc
Beginner
Joined: 12 Apr 11 Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Topic: Set margins of pagePosted: 13 Apr 11 at 12:18PM |
|
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 |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store