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 - Taking 3 inches off the bottom
  FAQ FAQ  Forum Search   Register Register  Login Login

Taking 3 inches off the bottom

 Post Reply Post Reply
Author
Message
BobW View Drop Down
Senior Member
Senior Member


Joined: 27 Feb 13
Location: Minnesota
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobW Quote  Post ReplyReply Direct Link To This Post Topic: Taking 3 inches off the bottom
    Posted: 28 Aug 15 at 8:50PM
I have a PDF that is legal sized.  I need to make it letter by lopping off the bottom 3 inches.  I've found several threads about using CapturePage and DrawCapturedPage but the problem is that no matter how I adjust the arguments, the result is always the top three inches of the page being removed rather than the bottom 3.

I'm doing something like this:

LoadFromFile
NewPage
CapturePage 2
SetPageSize "Letter"
DrawCapturedPage CapturedPageID, 0,0,PageWidth(),PageHeight()
SaveToFile

No matter what I put in DrawCapturedPage to replace the 0's, the page never moves.  If I omit the SetPageSize, it looks fine, it's just that it's still legal.  I've tried NormalizePage, SetOrigin, and stuff like that but it doesn't change anything.

Is there any way to take 3 inches off the bottom?
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 30 Aug 15 at 10:17PM
Hi Bob,

you should read the description about function "SetOrigin":

Cheers,
Ingo

Cheers,
Ingo

Back to Top
BobW View Drop Down
Senior Member
Senior Member


Joined: 27 Feb 13
Location: Minnesota
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobW Quote  Post ReplyReply Direct Link To This Post Posted: 31 Aug 15 at 5:51PM
I did read the description about that function, and I tried all the possible values for it with no change in the result.  I also did a search on DrawCapturedPage in the forum and found this note:

http://www.quickpdf.org/forum/resize-a1-and-a0-pages-to-a4_topic3117_post12505.html?KW=drawcapturedpage#12505

which indicates that SetOrigin has no effect on DrawCapturedPage.

Is this a bug in DrawCapturedPage or is there some other way to turn a Legal PDF into a Letter PDF by removing the bottom 3 inches?
Back to Top
erico View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24 Sep 14
Location: Minnesota USA
Status: Offline
Points: 51
Post Options Post Options   Thanks (0) Thanks(0)   Quote erico Quote  Post ReplyReply Direct Link To This Post Posted: 08 Sep 15 at 3:40PM
I'm pretty sure the SetPageSize is cropping off the text. Drawing a captured page in a smaller area only reduces it -- it does not trim the edges. I would guess you need to look at SetCropBox, or the slightly more generic SetPageBox.
Eric O
Back to Top
BobW View Drop Down
Senior Member
Senior Member


Joined: 27 Feb 13
Location: Minnesota
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobW Quote  Post ReplyReply Direct Link To This Post Posted: 03 Dec 15 at 5:32PM
I finally came up with a solution to this problem:

LoadFromFile

For ii = 1 to PageCount
   SelectPage ii
   RotatePage 180
   NormalizePage 0
   SetPageSize "Letter"
   RotatePage 180
   NormalizePage 0
next ii

SaveToFile

I'm not sure that the last NormalizePage is necessary.
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