If you want to add text to an existing PDF you can use PdfStamper.
----- Original Message -----
From: "Dilan" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, July 30, 2005 3:56 AM
Subject: [iText-questions] Re : reading a pdf from the db and change it.
Hello,
I’m trying to edit a pdf which is saved in the database, first read it into
a inputstream, then to the pdf reader, I cant get it to read the inputstream
into the pdfreader
InputStream input = new ByteArrayInputStream(af.getImg());
Document document = new Document();
try {
//im getting an error, cannot resolve symbol
// symbol : method PdfReader (java.io.InputStream)
// location: class com.wf.transferform.ViewTransferForm
// PdfReader reader = PdfReader(input);
PdfReader reader = PdfReader(input);
document.open();
document.addTitle("Hello World example");
} catch(DocumentException de) {
System.err.println(de.getMessage());
}
catch(IOException ioe) {
System.err.println(ioe.getMessage());
}
document.close();
response.setContentType("application/pdf");
//out.writeTo(response.getOutputStream());
//response.getOutputStream().flush();
OutputStream out = response.getOutputStream();
while ((length = input.read(buffer)) != -1) {
out.write(buffer, 0, length);
}
input.close();
out.flush();
out.close();
hope some one can help ☺
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions