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!
Stamping Rotated Pages... |
Post Reply |
Author | |
cverhoff
Beginner Joined: 03 Nov 05 Location: United States Status: Offline Points: 17 |
Post Options
Thanks(0)
Posted: 23 May 06 at 4:43PM |
I have pdf files that need to be rotated and then stamped at the bottom of the page. They are 8 1/2 x 11 inch pages in landscape position that need to be rotated to portrait position. When I use the RotatePage Function it also changes the co-ordinate system by 90 degress so that when I try to stamp at the bottom of the 8 1/2 x 11 portrait page it actually stamps on the left or right side not the bottom. Can someone help me? I tried adjusting using the SetOrigin function but nothing I try seems to work. I would GREATLY APPRECIATE ANY aSSISTANCE.
THANKS, CURTIS |
|
Michel_K17
Newbie www.exp-systems.com Joined: 25 Jan 03 Status: Offline Points: 297 |
Post Options
Thanks(0)
|
Hi,
Yes, the rotating of the origin took me a while to figure out, but I finally got it working. I published all of my source code on this forum [here]. The source contains a lot of code in order to place the text in any corner, or as a watermark, so you should be able to delete what is not relevant to you. Finally, the lines that are key for what you are looking for are these: ' Check for page rotation. If oPDF.PageRotation = 0 Then ' Set origin to Upper LH rtn = oPDF.SetOrigin(1) PageHeight = oPDF.PageHeight PageWidth = oPDF.PageWidth Else ' Set origin to Lower LH (before page is rotated for viewing) rtn = oPDF.SetOrigin(0) ' In this rotation, X&Y are reversed, Height is Width & Vice versa PageHeight = oPDF.PageWidth PageWidth = oPDF.PageHeight End If . . . . ' Apply the text to the page If oPDF.PageRotation = 0 Then rtn = oPDF.DrawRotatedText(x, y, i, Temp) Else rtn = oPDF.DrawRotatedText(y, x, 90 + i, Temp) End If Cheers! Michel. |
|
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