I'm getting a Document exception on
byte[] data = PDF document loaded from cache
ByteArrayOutputStream os = new ByteArrayOutputStream();
Document document = new Document(PageSize.LETTER);
PdfCopy copy = new PdfCopy(document, os);
PdfReader r = new PdfReader(data);
for (int i = 1; i <= r.getNumberOfPages(); i++) {
PdfImportedPage page = copy.getImportedPage(r, i); // throws up
copy.addPage(page);
}
I know that data[] is okay since I can write it back out to a file and
view it with Acrobat.
I'm fairly sure that this code was working in 1.3 (or 1.3.1?), but it's
barfing on 1.4.2. I think I also tried it with 1.4.4, but with Websphere
who can ever really be certain of anything? :-)
Any pointers?
BTW the website at Univ. of Ghent looks good, but I didn't notice a
'download' link.
Bear
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions