Hello,

I am trying to add some text to an already existing tagged PDF. Adding
text is easy with pdfstamper and getovercontent but I have not been
able to add text in an already existing tag.

This is from an iText sample:

over = stamper.getOverContent(pageNumber);
...
over.beginText();
over.setTextMatrix(100, 790);
over.newlineShowText("My new text");
over.endText();

And this is what I would like to do:

over = stamper.getOverContent(pageNumber);
...
over.beginText();
over.setTextMatrix(100, 790);
over.beginMarkedContentSequence(myTag);
over.newlineShowText("My new text");
over.endMarkedContentSequence();
over.endText();

myTag is a tag that exists in the original PDF file.

I have look at the code and I have not found an easy way to achieve
this. PdfStamperImp extends PdfWriter but the tagged var is always
null because it is not updated when the stamper is created from the
reader. The strustureTree is also empty.

I wonder if when creating the pdfStamperImp object, the tagged boolean
var could be fill as well as the strutureTree.

Does it have sense?  Is there a way to do this thing? Can you point me
in the right direction?

What about pdfCopy? The docs say that text cannot be added/changed
with this class but I have noticed that this class has changed
recently.

Thanks in advance
Jose

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

Reply via email to