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!
![]() |
Taking 3 inches off the bottom |
Post Reply ![]() |
Author | |
BobW ![]() Senior Member ![]() Joined: 27 Feb 13 Location: Minnesota Status: Offline Points: 64 |
![]() ![]() ![]() ![]() ![]() 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? |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3530 |
![]() ![]() ![]() ![]() ![]() |
Hi Bob,
you should read the description about function "SetOrigin": Cheers, Ingo |
|
Cheers,
Ingo |
|
![]() |
|
BobW ![]() Senior Member ![]() Joined: 27 Feb 13 Location: Minnesota Status: Offline Points: 64 |
![]() ![]() ![]() ![]() ![]() |
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? |
|
![]() |
|
erico ![]() Senior Member ![]() ![]() Joined: 24 Sep 14 Location: Minnesota USA Status: Offline Points: 51 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
BobW ![]() Senior Member ![]() Joined: 27 Feb 13 Location: Minnesota Status: Offline Points: 64 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
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