Can you post the pdf or send it privately to me?
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Scott Dunbar
> Sent: Tuesday, October 16, 2007 7:18 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Issue using
> AcroFields.mergeXfaData and base64 encoded images
>
> Sorry for replying to my own post but the problem was *not* base64
> encoding. The issue was that for some reason the array passed into
> getInstance() was zero bytes in length. I added a quick:
>
> if( imgb.length == 0 )
> return null;
>
> and things work fine for me at least. I'm not sure if I
> understand why
> this is occurring but it works for now.
>
>
>
>
> Scott Dunbar wrote:
> > I've run across an issue using mergeXfaData and images.
> The images in
> > my file are base64 encoded which I believe is standard and
> I end up getting:
> >
> > java.io.IOException: The byte array is not a recognized imageformat.
> > at com.lowagie.text.Image.getInstance(Unknown Source)
> > at com.lowagie.text.pdf.AcroFields.setField(Unknown Source)
> > at com.lowagie.text.pdf.AcroFields.setField(Unknown Source)
> > at
> com.lowagie.text.pdf.AcroFields.mergeXfaData(Unknown Source)
> >
> > In looking at the code for Image.getInstance() it looks like it is
> > trying to do something conceptually similar to the Unix
> "file" command
> > but doesn't handle base64. Is this something I'm doing
> wrong or should
> > I just update the code to handle base64 encoded images (and
> presumably
> > call the method again with the decode byte array)?
> >
> > Thanks for any help.
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/