We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IOException: Unsupported image format!: v5.5.0.0 using Form.FillImageField w/ Stream Image

We’re working on an application which will pull PDFs from Amazon S3 and add image data (PNGs), also from S3 to the PDFs. Testing the process we have discovered using the Form.FillImageField method with a stream for the image fails with an IOException of “Unsupported image format!: v5.5.0.0”.

We have also tested the same method with an image on disk and the image is applied correctly.

//// logoImage == memorystream
//// inputPdf == memorystream
//// outputstream == memorystream
logoImage.Seek(0, SeekOrigin.Begin);
var form = new Form(inputPdf, outputPdf);

//// inserted on page 2 of the document
form.FillImageField(“Logo”, logoImage); // throws: Unsupported image format!: v5.5.0.0

form.Save();

While the same code writing the image to disk works:
var tempDirectory = string.Format(
@"{0}{1}",
Path.GetTempPath(),
Guid.NewGuid());

var tempDirectoryInfo = Directory.CreateDirectory(tempDirectory);
var tempFileName = string.Format(
@"{0}{1}",
tempDirectory,
“logo.png”);

File.WriteAllBytes(tempFileName, logoImage.ToArray());

var form = new Form(inputPdf, outputPdf);
//// inserted on page 2 of the document
form.FillImageField(“Logo”, tempFileName);

form.Save();

tempDirectoryInfo.Delete(true);

I’ve attached a C# project to illustrate the issue.

thanks.

Hi Richard,

I have reproduced this problem at my end and logged it as PDFKITNET-27777 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,

Hi Richard,



Our team had looked into the issue logged as PDFKITNET-27777 and I would
like to share with you that the fix for this issue will be available at
the end of June or early July 2011. You’ll be notified via this forum
thread as soon as it is resolved.



We’re sorry for the inconvenience and appreciate your cooperation.

Regards,

The issues you have found earlier (filed as 27777) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.