Print Page | Close Window

Set margins of page

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1804
Printed Date: 14 Dec 25 at 9:58PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Set margins of page
Posted By: rmgdc
Subject: Set margins of page
Date Posted: 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




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk