I am trying to read an existing PDF document and modify the document using
PdfStamper. Modification involves inserting hidden text into PDF document
and generate a Tagged PDF file as output. Below is the code used to read in
the PDF and then create the PdfStamper object, then and call setTagged()
method on the associated PdfWriter object.
PdfReader reader = new PdfReader(inputPdfFile.getAbsolutePath());
PdfStamper stamper = new PdfStamper(reader,new
FileOutputStream(outputPdfFile),PdfWriter.VERSION_1_6);
stamper.getWriter().setTagged();
This throws the following exception:
Tagging must be set before opening the document.
[junit] java.lang.IllegalArgumentException: Tagging must be set before
opening the document.
[junit] at
com.lowagie.text.pdf.PdfWriter.setTagged(PdfWriter.java:2115)
Could you say where else can I call setTagged() method when using PdfStamper
class ?
--
View this message in context:
http://www.nabble.com/Generating-Tagges-PDF-file-using-PdfStamper-tf3727815.html#a10433250
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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/