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 - Moving/Shifting pages
  FAQ FAQ  Forum Search   Register Register  Login Login

Moving/Shifting pages

 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: Moving/Shifting pages
    Posted: 14 Aug 20 at 2:35PM
I have a number of large PDFs that need to have the content moved or shifted over.  The documents were created with almost no margin so the text is all on the left.  I need to move everything on every page to the right about an inch.  In a couple of cases the documents were created in Landscape when they should have been Portrait.  What's the best way to do this?

Thx,

Bob 
Back to Top
mLipok View Drop Down
Senior Member
Senior Member
Avatar

Joined: 23 Apr 14
Location: Poland, Zabrze
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote mLipok Quote  Post ReplyReply Direct Link To This Post Posted: 16 Aug 20 at 1:34AM
firstly you must enumerate each page
check if is Landscape and eventually rotate 
this part will be easier 

secondly
you should shift with... i will find how I do somthing similar ... in one of my project.
will back soon...
Here you can find description how to test my examples:
http://www.quickpdf.org/forum/forum_posts.asp?TID=2932&PID=12600&title=drawcapturedpagematrix-matrix-howto#12600
Back to Top
Sopracenery View Drop Down
Team Player
Team Player
Avatar

Joined: 31 Aug 20
Location: Germany
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sopracenery Quote  Post ReplyReply Direct Link To This Post Posted: 31 Aug 20 at 9:45PM
you should shift with...
the following sequence:
- SetGlobalOrigin(1 or 5 or 7)      //   top left will be the root corner of the pages
- SelectPage(1)        // iterate all pages of your document. In this example go always to page 1
- CapturePage()      // remove this page to hidden memory,
                             // returns ID for use with later DrawCapturedPage()
- InsertPages(PageCount+1, 1)    // need a new empty page at the end to draw to
- SelectPage(PageCount)        // goto that page
- DrawCapturedPage(ID, Left := +1 inch, Top:=0, Width:=... , Height:=...)       // draw with shift of 1 inch to the new page. Keep same values for width and height as your source page.

This works with files that fit into your memory. For larger files DA... functions may help.

To turn orientation insert the new empty page in the orientation of your choice (e.g. "A4"=Portrait):
...
- InsertPages(PageCount+1, 1)
- SetPageSize("A4 Landscape") or SetPageSize("A4")    // or other formats
...

Martin


Edited by Sopracenery - 01 Sep 20 at 8:41AM
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