Sascha Fuchs wrote:
> Hello
> 
> I need to be able to recover and remove “stamped” items stamped with 
> PdfContentByte over = stamp.getOverContent(actualPage).

<explain>
> To find the created stamps I’ve got the idea to put the strings got by 
> over.toString() into a HashMap, and put that HashMap to info section of 
> pdf document (with stamp.setMoreinfo(mymap) ).
</explain>

> With “watched expression” of Eclipse I discovered the Xref of my object, 
> but I’m not able to get its content for comparing.
> 
> My idea is to iterate with for(int i=0; i< reader.gerXrefSize(); i++) 
> and get the object with reader.getPdfObject(i).
> 
> My questions:
> 
>    1. How can I get the written content/stream from PdfObject equivalent
>       to over.getString()?

Have a look at the example I posted a while ago:
http://www.nabble.com/Re%3A-Coordinates-of-a-PdfTemplate%21-p9451507.html
Especially at these lines:
PRStream template = (PRStream)PdfReader.getPdfObject(xobject);
String oldtemplate = new String(PdfReader.getStreamBytes(template));

>    2. Is there a restriction of pdf info section (size or special character)

Personally I don't like the idea of adding n'importe quoi
to the Info dictionary. Also I really don't understand the
sentence I have put between <explain> tags. You say:
"To find ..., I do ...", but the first part of your sentence
has nothing to do with the second part. It's as if you would
say: "To find my watch, I brush my teeth."

>    3. Do you admit my idea of method of resolution?

Instead of iterating over all the objects in the XRef table,
it might be better to just look at the XObject referred to
in the page dictionaries (for inspiration: have a look at
the example I just mentioned).

br,
Bruno

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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