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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Set margins of page
  FAQ FAQ  Forum Search   Register Register  Login Login

Set margins of page

 Post Reply Post Reply
Author
Message
rmgdc View Drop Down
Beginner
Beginner
Avatar

Joined: 12 Apr 11
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote rmgdc Quote  Post ReplyReply Direct Link To This Post Topic: Set margins of page
    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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store