Hello,
I got this following method;
InputStream input = null;
try {
input = new BufferedInputStream(new
FileInputStream("/template- authority.pdf"));
} catch (IOException e) {
logger.error("Error opening file region", e);
}
ByteArrayOutputStream bout = new ByteArrayOutputStream();
try {
PdfReader reader = new PdfReader(input);
PdfStamper stamper = new PdfStamper(reader,bout);
ByteArrayOutputStream pdfStream = new
ByteArrayOutputStream();
AcroFields aform = stamper.getAcroFields();
..
stamper.close();
} catch (Exception e) {
logger.error("Error opening file region", e);
}
int length = 0;
byte[] bytes = new byte[(int)length];
try {
bytes = bout.toByteArray();
bout.close();
input.close();
} catch (IOException e) {
logger.error("Error reading bytes", e);
}
return bytes;
This open up a input stream and a pdf file, then set up and do some changes
and send to output stream, I was wondering, how can I add extra pages to
this open file? I have read through the TwoOnOne example, it create a new
Document() do this, how can I do in my case?
For example, if I open two input streams, for each document, input1 and
input2 as two document, how can I combine them as two pages, and send to
output stream? Please help :)
Dilan
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions