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 - Stamping Rotated Pages...
  FAQ FAQ  Forum Search   Register Register  Login Login

Stamping Rotated Pages...

 Post Reply Post Reply
Author
Message
cverhoff View Drop Down
Beginner
Beginner
Avatar

Joined: 03 Nov 05
Location: United States
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote cverhoff Quote  Post ReplyReply Direct Link To This Post Topic: Stamping Rotated Pages...
    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

Back to Top
Michel_K17 View Drop Down
Newbie
Newbie
Avatar
www.exp-systems.com

Joined: 25 Jan 03
Status: Offline
Points: 297
Post Options Post Options   Thanks (0) Thanks(0)   Quote Michel_K17 Quote  Post ReplyReply Direct Link To This Post Posted: 17 Jun 06 at 11:41AM
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.
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