awesome, a huge step in the right direction.

i think this is what i need to dynamically apply the setExtraMargin to only the multi-line fields. Now my problem is i'm using coldfusion to do this, and I'm not real sure how to convert this to a <CFSCRIPT>

anyone out there have CF background can help with converting this to something I can use?

public static void setField(AcroFields af, String name, String value)
throws Exception {
   AcroFields.Item item = af.getFieldItem(name);
   if (item == null)
       return;
   PdfDictionary merged = (PdfDictionary)item.merged.get(0);
   if (PdfName.TX.equals(merged.get(PdfName.FT))) {
       PdfNumber n = (PdfNumber)merged.get(PdfName.FF);
       if (n != null && (n.intValue() & PdfFormField.FF_MULTILINE) !=
0)
           af.setExtraMargin(0, 6);
   }
   af.setField(name, value);
   af.setExtraMargin(0, 0);
}



Paulo Soares wrote:
http://itext.ugent.be/library/question.php?id=54

Paulo

----- Original Message ----- From: "Dennis Racine" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, July 19, 2007 11:21 PM
Subject: [iText-questions] Multi-Line Text Alignment


Ok, this seems to be a wide spread problem, I'd I'd love to find a solution.
It seems that if you have a multi-line text field in your PDF and
populate + flatten it the text ends up moving UP about 4-6 pixels from
it's original position. In my case my customer has drawn horizontal
lines in their multi-line fields so their dumb customers understand they
have multiple lines for their information. Which in this case makes the
problem really obvious.
I've tried not only iText, but also pdfTK, CFMX8 and activePDF. the only
one that does the multi-line correct is activePDF. Which would be ok,
except they can't seem to do ANYTHING else right.
So I'd like to use iText, everything works great except for the
multi-line. Is there a way to adjust this to make it correct?

Any help would be great, I'm tired of dealing with activePDF and all
their "Sandford & Son Fixes" for things that iText just does correct to
begin with :)

I setup a test URL with the 4 methods here:
http://ho.racine-web.com/pdf_test.cfm

--
----------------------------------
Racine-Web Design
Dennis Racine

Tel. 530-470-8751
Fax (408) 904-4816

website: http://www.racine-web.com
[EMAIL PROTECTED]


Instant Messangers:
Yahoo: dennis_racine
MSN: [EMAIL PROTECTED] (IM Only)
AIM: DRacine33E
ICQ: 967354


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/



--
If this email is spam, report it here:
http://www.OnlyMyEmail.com/reportSpam?Id=MzEyMjU6MzU4MDQ4ODE3OmRlbm5pc0ByYWNpbmUtd2ViLmNvbQ%3D%3D



begin:vcard
fn:Dennis Racine
n:Racine;Dennis
org:Racine-Web Design
adr:;;15293 Beeman Lane;Grass Valley;CA;95949;USA
email;internet:[EMAIL PROTECTED]
tel;work:530-470-8751
tel;fax:408-904-4816
tel;cell:530-575-9268
x-mozilla-html:TRUE
url:http://www.racine-web.com
version:2.1
end:vcard

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to