java - how to find and replace a text into a pdf file using iText in -
i have pdf form, structure following
hello firstname, mr. firstname working @ designation post , current package salary. thanks. excel database -------------------------------------- + firstname + salary + designation + |-----------|----------|--------------| | alin | 3,00,000 | manager | | roy | 2,75,000 | php developer| +-----------+----------+--------------+
here keyword firstname,designation , salary fetched excel database , change dynamically. suppose if user select alin in pdf form in firstname replace alin , salary , designation replace 3,00,000 , manager respectively.
my problem new in itext can't find way how search , replace these keywords. appreciated.
i wouldn't consider itext preferred technology this.
i'd use velocity template xsl-fo, populate dynamic data, generate xsl-fo, , turn pdf using standard xsl-t engine. convoluted, effective.
or, if wish stick itext track, figure out how substitution in java objects , generate form way.
i wouldn't recommend excel "database".
Comments
Post a Comment