Extracted Signature Images Are in Black and White

Hello,


When I extract signature images from a pdf, the resulting images are in black and white. For example, if the image is blue with transparent background, the result would be a white image with a black background. Same for black signatures where the background becomes black and the signature becomes white. Note that the original signatures are in Png format.

This is the code that I’m using to extract the signatures:

int count = 0;
using (Document pdfDocument = new Document(pdfPath))
{
foreach (Field field in pdfDocument.Form)
{
SignatureField sf = field as SignatureField;
if (sf != null)
{
count++;
String outFile = String.Format("{0}\Signature Image-{1}.png", destinationPath, count);
using (Stream imageStream = sf.ExtractImage())
{
if (imageStream != null)
{
using (System.Drawing.Image image = Bitmap.FromStream(imageStream))
{
image.Save(outFile, ImageFormat.Png);
}
}
}
}
}
}

Is there any way to keep the colors as they were?
Thank you.

Hi Rachelle,


Thanks for using our API’s.

Can you please share your source/input PDF files causing this problem, so that we can test the scenario in our environment. We are sorry for this inconvenience.
Hi Nayyer,
Kindly find attached the pdf used for testing along with the resulting images.
Thank you.

Hi Rachelle,


Thanks for sharing the resource file.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-38886. We
will investigate this issue in details and will keep you updated on the status
of a correction. <o:p></o:p>

We apologize for your inconvenience.

Hi Nayyer,


Any update regarding this issue? An estimation would be very much appreciated.

Thank you.
Hi Rachelle,

Thanks for your inquiry. I am afraid we noticed your reported issue recently and it is pending for investigation, so we can not share an ETA at the moment. We will be in a good position to share an ETA as soon as our team completes its analysis.

Thanks for your patience and cooperation.

Best Regards,

Hi Tilal,


Can you please provide me with an update regarding this issue? It’s becoming critical to us.

Thank you.

Hi Rachelle,


Thanks for your inquiry. I am afraid the reported issue is still not resolved, it is pending for investigation in the queue with other issues, reported earlier. However I have raised the issue priority and requested our product team to investigate and share an ETA at their earliest. We will keep you updated about the issue resolution progress.

Thanks for your patience and cooperation.

Best Regards,

Hi Tilal,

Any update regarding this issue?

Thank you.

@RCS4,
Unfortunately, there is no update on the linked ticket ID PDFNET-38886. It is on the high priority list under the free support model. We will let you know once it is fixed.

@RCS4,
Our product team has plans to resolve and include this fix into the November, 2017 release (version 17.11). We will notify you once it is fixed.

@RCS4

Thanks for your patience.

We are pleased to inform you that earlier reported issue PDFNET-38886, has been resolved in latest version Aspose.Pdf for .NET 17.11. Please try using the latest release version and in case you face any issue, please feel free to contact us.