Thank you - that seems to have been the solution!
This is the code I split the pages with:
static List splitByPages(String inFile, String destinationDir, String
prefix) {
List outFiles = []
try {
PdfReader readPages = new PdfReader(inFile)
int n = readPages.getNumberOfPages()
int i = 0
while ( i < n ) {
String outFile =
"${destinationDir}/${prefix}${String.format('%03d', ++i)}.pdf"
PdfReader reader = new PdfReader(inFile)
FileOutputStream fout = new FileOutputStream(outFile)
PdfStamper stamp = new PdfStamper(reader, fout)
reader.selectPages("${i}")
stamp.close()
outFiles << outFile
}
return outFiles
} catch (Throwable t) {
log.error(t)
}
}
This is the code I read the field names with:
static List getSignatureFields(String inFile) {
try {
List fields = []
// It seems necessary to load the file into the PdfReader this
way to
// avoid a java.io.IOException in sun.nio.ch.FileChannelImpl on
AIX.
byte[] content = new File(inFile).readBytes()
assert content.size() == new File(inFile).size(), "Filesystem
error"
PdfReader reader = new PdfReader(content)
AcroFields form = reader.getAcroFields()
fields = form.getBlankSignatureNames()
log.debug("Found signature field names: ${fields}")
return fields
} catch (Throwable t) {
log.error(t)
}
}
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/Finding-signature-fields-in-a-split-page-tp2262716p2263173.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/