Print Page | Close Window

Moving/Shifting pages

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=3834
Printed Date: 04 May 24 at 4:36AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Moving/Shifting pages
Posted By: BobW
Subject: Moving/Shifting pages
Date 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 



Replies:
Posted By: mLipok
Date 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


Posted By: Sopracenery
Date 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



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