Claas Jäger wrote:
> Thanks for the reply.
>
> 1T3XT info wrote:
>>> Now I am trying to remove th 2 objects from the PDF file using iText. My
>>> problem is that 1.) i am not possible to find these objects using iText
>>> and
>> What if you compare the bytes? You have those bytes in Pattern_only.pdf
>> If the pattern is identical for all PDFs, then you could try to find
>> that pattern in a stream in the other PDFs.
>>
> I will try to analyse the stream contents and to identify the pattern
> that way, thanks for the tip.
>
I tried to get the stream content with code like this:
====================SNIP==========================
int strIdx = -1;
for (int i = 0; i < reader.getXrefSize(); i++)
{
PdfObject pdfobj = reader.getPdfObject(i);
if (pdfobj != null) {
if (pdfobj.isStream()) {
strIdx++;
PdfStream pdfStream = (PdfStream)pdfobj;
FileOutputStream fos = new FileOutputStream(streamFileName);
pdfStream.writeContent(fos);
}
}
}
====================SNIP==========================
But all the output files are empty afterwards. Am i accessing the
streams in a wrong way ?? I do not believe that they are really empty...
Maybe my approach to get the content in the PDF is wrong ? Hints and
pointers greatly appreciated...
--
Mit freundlichen Grüßen / Regards
Claas Jäger
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php