PdfStamper doesn't support tagging. In general, tagging only works in
new documents unless you are prepared to have a lot of work to implement
it.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of dayvidpow
> Sent: Friday, May 11, 2007 3:39 PM
> To: [email protected]
> Subject: [iText-questions] Generating Tagges PDF file using PdfStamper
> 
> 
> 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-PdfStam
> per-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/
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-------------------------------------------------------------------------
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/

Reply via email to