Print Page | Close Window

Formfields on landscape paper

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=1275
Printed Date: 10 Mar 26 at 12:43AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Formfields on landscape paper
Posted By: conner
Subject: Formfields on landscape paper
Date Posted: 18 Nov 09 at 1:13PM
Hi, I have a problem with form fields on rotated pages. Whenever the page is vertical (0 or 180 degrees rotated) the form fields boundaries returned by GetFormFieldBound are correct (I draw a colored rectangle on top of the formfields to verify), but when using landscape they are all misplaced.
 
Any suggestions why this happens? The pages have margins? Noticed that PageWidth seems to return the Height of the document when rotated 90 degrees, but didnt do the trick.



Replies:
Posted By: Ingo
Date Posted: 18 Nov 09 at 3:33PM
Hi!

That's normal if the page was created as portrait and later rotated to landscape.
You can check this in the pdf-source directly searching for "rotated".
The values are in this case only on other parameters (it's only changed... so no real problem but you should know it ;-)
I've told this already to Rowan (Debenu) and i think it will be changed soon.

Cheers, Ingo  


Posted By: conner
Date Posted: 19 Nov 09 at 9:02AM
Got it working kinda... All rectangles are now placed above the actual form fields, however i had to set origin to BottomLeft for a 90 degree rotated paper, but think it actually should have been TopRight.
 
    case QPDF.PageRotation of
      0: FQPDF.SetOrigin(1); // TopLeft
      90: FQPDF.SetOrigin(0); // BottomLeft, think it ought to be TopRight
      180: FQPDF.SetOrigin(3); // BottomRight
      270: FQPDF.SetOrigin(2); // TopRight, think it ought to be BottomLeft though
    end;
 
But got another problem now, whenever i enter text into the form field, the text is misplaced. How can i control where the text is placed? though quickpdf just placed it in the formfield automatically... well its does for most of my documents, but still have problem with one of them.


Posted By: Ingo
Date Posted: 19 Nov 09 at 10:16AM
Hi!

Please have a look in the reference what the options for SetOrigin mean.
The case "rotated" disorder this a little bit ... like i've told it already (Debenu knows it).
With "SetFormFieldValue" or "SetFormFieldValueByTitle" you can set the value wherever the field is. This doesn't matter. I've made few experiences the last time with rotated formfields and i've never had problems with wrong displayed values.

Cheers, Ingo



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