Thank you Kevin.
I'm going to track down the original docs and see if modifying them
might be easier.
On Nov 24, 2008, at 7:29 PM, Kevin Day wrote:
The new parser
(com
.lowagie.text.pdf.parser.SimpleTextExtractingPdfContentStreamParser)
will set the stage for you on locating the text.
The first challenge that I forsee is determining the field position
and size relative to where that text is placed - for example, it is
highly unlikely that you want the field width to be the width of the
text string [FIRST NAME]... If they left justified that text, and
the field width is the same for all first name fields, then you are
good to go. If not, then you might have to do some additional work
- look for the colon immediately prior to [FIRST NAME] - use it's
position plus some margin for the start of the field - then your
guess is as good as mine for determining the field width.
The other challenge (maybe not as big - but maybe even bigger) is
how to get rid of the existing text... It might be sufficient to
just place the Acro field over top of the existing text, or you
might have to do something with directly editing the content
stream... While editing an existing content stream is certainly an
interesting problem, I'm not sure I'd want to be tackling it without
a lot of time on my hands :-)
Cheerio,
- K
----------------------- Original Message -----------------------
From: Robert Morse <[EMAIL PROTECTED]>
To: Post all your questions about iText here <itext-questions@lists.sourceforge.net
>
Cc:
Date: Mon, 24 Nov 2008 18:35:05 -0700
Subject: [iText-questions] Adding Form Fields
Hello,
I have several hundred PDF documents that I'd like to turn into
Acroforms. Adobe Acrobat does a pretty good job of identifying check
boxes, and different fields designated with underlines, but it doesn't
completely address my situation.
In the document set I'm trying to convert, the original authors used
the following convention to identify fields:
First Name: [FIRST NAME]
Last Name: [LAST NAME]
Acrobat ignores these. Is it possible with iText to locate text (in
this case, surrounded by brackets) and replace it with a field?
If there is a tool better suited for this, I'd appreciate a pointer.
I'm not looking for a solution (I'll dig that out myself), I was just
looking
for some help avoiding blind alleys.
Thanks!
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win
great prizes
Grand prize is a trip for two to an Open Source event anywhere in
the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win
great prizes
Grand prize is a trip for two to an Open Source event anywhere in
the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php