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!
PDF-Form Landscape |
Post Reply |
Author | |
hkoestner
Beginner Joined: 29 Oct 05 Location: Germany Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 28 Apr 06 at 2:29PM |
I am working on a solution concerning the presentation of PDF-forms in a delphi form. The solution is based on the "FormTool" of "Chicks".
With forms in the landscape format the problem occurs that the fields are aligned vertically instead of horizontally. The problem can also be reproduced with "FormTool". Does anybody have a solution for this problem? |
|
chicks
Debenu Quick PDF Library Expert Joined: 29 Oct 05 Location: United States Status: Offline Points: 251 |
Post Options
Thanks(0)
|
Can you post an example PDF with the issue somewhere?
|
|
hkoestner
Beginner Joined: 29 Oct 05 Location: Germany Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Hi chicks,
no problem, you can find it here: http://www.formsoft.de/quer.pdf best regards |
|
hkoestner
Beginner Joined: 29 Oct 05 Location: Germany Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Hi chicks,
any idea? - The example was created with Acrobat 6 best regards |
|
chicks
Debenu Quick PDF Library Expert Joined: 29 Oct 05 Location: United States Status: Offline Points: 251 |
Post Options
Thanks(0)
|
Well, I haven't had time to play with this too much, but here's a start:
In the RenderPage function, check the page rotation (I'm only checking non-zero here, but would need to be more sophisticated), and set pageWidth and pageHeight accordingly: IF iSEDPageRotation() <> 0 THEN pageWidth = iSEDGetPageBox(2,3) pageHeight = iSEDGetPageBox(2,2) ELSE pageWidth = iSEDGetPageBox(2,2) pageHeight = iSEDGetPageBox(2,3) END IF Also in RenderPage, check the form fields for rotation, and position accordingly: scale = iResolution / 72 FOR i = 1 TO fieldCount IF Fields(i).page = iCurPage THEN id = Fields(i).fldID IF iSedGetFormFieldRotation(id) <> 0 THEN Fields(i).x = (iSEDGetFormFieldBound(id, 0) - iSEDGetPageBox(2,0) ) * scale Fields(i).y = (pageHeight - iSEDGetFormFieldBound(id, 1) + iSEDGetPageBox(2,5)) * scale Fields(i).w = iSEDGetFormFieldBound(id, 3) * scale Fields(i).h = iSEDGetFormFieldBound(id, 2) * scale ELSE Fields(i).x = (iSEDGetFormFieldBound(id, 0) - iSEDGetPageBox(2,0) ) * scale Fields(i).y = (pageHeight - iSEDGetFormFieldBound(id, 1) + iSEDGetPageBox(2,5)) * scale Fields(i).w = iSEDGetFormFieldBound(id, 2) * scale Fields(i).h = iSEDGetFormFieldBound(id, 3) * scale END IF END IF NEXT i This still doesn't position the field correctly, you'll need to play with that a bit, but it does at least paint it in the correct direction. |
|
hkoestner
Beginner Joined: 29 Oct 05 Location: Germany Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Thanks Chicks
I will try it. best regards |
|
FKirch
Team Player Joined: 29 Oct 05 Location: Germany Status: Offline Points: 23 |
Post Options
Thanks(0)
|
Where can I find the "formtools" of chicks?
|
|
chicks
Debenu Quick PDF Library Expert Joined: 29 Oct 05 Location: United States Status: Offline Points: 251 |
Post Options
Thanks(0)
|
There are a few hacks here, including formtool, mostly having to do with PDF:
http://www.geocities.com/sea_sbs/files/ |
|
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