Hi, I have the document with watermark in a PdfStamper object, but not like obtaining the bytes to store it in a field BLOB of an Oracle DB
Thanks
| bruno <[EMAIL PROTECTED]>
07/06/2006 16:34 |
|
Please do not mail me personally.
Jesús Vallejo Ramos wrote:
>
> I have a pdf to which I have added one to him watermark and I need to
> keep it in a field BLOB.
> How can do it?
Let me try to understand the question.
You have created a PDF.
Or you have added watermarks to an existing PDF.
This PDF has more than one page.
Now you want to burst this PDF into different one-page PDFs,
and store every PDF in a separate BLOB in a database.
This is how you would create a PDF containing only the first page
of original.pdf:
PdfReader reader = new PdfReader("original.pdf");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
reader.selectPages("1");
PdfStamper stamper = new PdfStamper(reader, baos);
// you could add the watermark here...
stamper.close();
Now do some database=specific mumbo-jumbo with
baos to store the PDF as a BLOB (read your database
manual to see how it is done).
br,
Bruno
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
