Hi,

Thanks a lot for your quick answer, and sorry for not being clear at 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.

this kind of pdf String (I think it's what is called the content stream?):
    %PDF-1.4
    %âãÏÓ
    2 0 obj <</Length 74/Filter/FlateDecode>>stream
[...]

>> 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.
Sorry for introducing confusion. I'm just saying I did it on a
"regular" file for some simple tests, outside of the DMS.

>> 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?
Hopefully, things are now clearer!

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

So, I guess my question could be summed up with "is it possible to use
PdfReader from some pdf content stream,
and add a page on that String"?

Thanks again,
Best regards
Stéphane
-------------------------------------------------------------------------
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