Stéphane Bansard wrote:
> Hi all,
> 
> using a DMS, I can have access to pdf contents of a file (not to the pdf 
> file).

What do you mean by "contents"?
The content stream without the resources?
A raster image of the contents?
The text that should be shown on a page?
You should clarify.

> I want to add a cover page to this file. I can do that on a pdf 
> file, using PdfReader(fileName) and use PdfCopy and PdfStamper.

Can you? That surprises me.
First you say you don't have access to the file,
now you say you can use PdfReader(fileName).
That's confusing.

> But, when it comes to read the pdf contents I have -as String, I cannot 
> do it!

I repeat my question: what do you mean by contents?

> I transformed my String to a Byte Array (using 
> java.String.getBytes()) and read this with PdfReader(byte[]), but the 
> resulting document is always empty (the content is lost).

If by 'contents' you mean the text that should be shown
on a page, you are completely off track. PdfReader needs
a proper PDF file, with a header, a body, a cross reference
table and a trailer.

> I'm just thinking trying to get the bytes from this pdf String content 
> doesn't make sense. Could you tell what to try out?

I have no idea what you are talking about.
You really should clarify.
-- 
This answer is provided by 1T3XT BVBA

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to