Hi,,

I have followning error message, what is wrong ?
Could you explain me

Thanks
Philippe




java.lang.ArrayIndexOutOfBoundsException


at java.lang.System.arraycopy(Native Method) at java.io.BufferedOutputStream.write(BufferedOutputStream.java:132) at com.lowagie.text.pdf.OutputStreamCounter.write(OutputStreamCounter.ja
va:120)


at com.lowagie.text.pdf.PRStream.toPdf(PRStream.java(Compiled Code)) at com.lowagie.text.pdf.PdfIndirectObject.writeTo(PdfIndirectObject.java
:164)


at com.lowagie.text.pdf.PdfWriter$PdfBody.add(PdfWriter.java:246) at com.lowagie.text.pdf.PdfWriter.addToBody(PdfWriter.java:1352) at com.lowagie.text.pdf.PdfStamperImp.close(PdfStamperImp.java:110) at com.lowagie.text.pdf.PdfStamper.close(PdfStamper.java:117) at com.lowagie.text.pdf.PdfEncryptor.encrypt(PdfEncryptor.java:130) at pdf5.agi1h2.crypt(agi1h2.java:109) at pdf5.agi8.main(agi8.java:336)


PdfReader reader = new PdfReader(fullout.getAbsolutePath());
if(userpassword!=null)
if(userpassword.trim().length()>0)
{
int right=0;
if(mp.getIfPwDPr())
right=PdfWriter.AllowDegradedPrinting; // Impression Basse resolution
if(mp.getIfPwCp()) right=right | PdfWriter.AllowCopy; // Copy
if(mp.getIfPwPr()) right=right | PdfWriter.AllowPrinting; // Impression
if(mp.getIfPwSr()) right=right | PdfWriter.AllowScreenReaders; // Lecture de document
if(mp.getIfPwAss()) right=right | PdfWriter.AllowAssembly; // Assemblage de document
if(mp.getIfPwMc()) right=right | PdfWriter.AllowModifyContents; // Modification du contenu



PdfEncryptor.encrypt(reader, new java.io.FileOutputStream(fullout), PdfWriter.STRENGTH128BITS, userpassword, ownerpassword, right);






-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to