PDF.KIT error

Hey Tom:

As you know we need to insert the signature image into the pdf, we found out pdf.kit failed to insert the image for certain type PDF.

Please use the following PDF as a example and test at your side. You will find out the image will not insert at any page.

Please treat it as emerge issue, it caused ML can not electronic sign the PDF. Please provide a hot fix ASAP.


Thanks and Regards
Dong Zeng
+1 647-277-0489
Toronto- 250 Yonge St.

Hi Tom,Ahmad

We did some more analysis on this issue. We found that, all pdf documents that have this problem were rotated.
Strange this is, aspose, was able to calculate correct coordinates to put a button. However, the signature image was not placed on top of the button. Instead, it was placed at different location and some times it is not visible probably because it close to edge of page?

This issue has caused serious problems for our business. If not solved immediately, could cause trade settlement risks and jeopardize our relationship with our clients.

Can you please setup a call, where we can go over this issue in detail and get some ETA from you on when this could be resolved.

Thanks,
Shail

Tom,

Did you get a chance to look at the issue? Here is some more technical details with the code dealing with signing PDF documents. Please see the code/comments for any clue of bugs?

private bool SignImpl(Signature signature, String signatureId)
{
if( !(signature is PdfSignature) )
{
throw new ArgumentException("Signature is not instance of PdfSignature");
}

MemoryStream tempPdf = new MemoryStream();
MemoryStream signedPdf = new MemoryStream();
FormEditor formEditor = new FormEditor( _pdfDocStream, tempPdf ); //Create a FormEditor based on the current pdf document (current PDF has 270 degree rotation by PdfFileInfo.getPageRotation())

PdfSignature posSig = (PdfSignature) signature;
int page = posSig.Page;
float x = posSig.X;
float y = posSig.Y;
float width = posSig.Width;
float height = posSig.Height;

//logger.Debug("Applying signature to PDF at: {0},{1},{2},{3},{4}", page, x, y, width, height);

//add a button field, need to use the lowleftx,y and upright x,y.
formEditor.AddField(FieldType.PushButton, signatureId, page, x, y, x+width, y+height); //Add a button in current PDF document at the correct coordinates (x,y,width,height we passed in are correct with units in points)

formEditor.Save(); //The button is saved correctly at the correct coordinates with correct orientation. We can click the button on the document.

tempPdf.Seek(0, SeekOrigin.Begin);

// Set the signature image on the button added above...
Form form = new Form(tempPdf, signedPdf); //Create a form based on the temp PDF documents where we had added a button above

form.FillImageField(signatureId, signature.AsStream()); //Fill an signature image on the button (the same signature image works for PDF documents without rotations)

form.Save(); //Our expectation is that the image be filled on the button (same size as the button and same orientation). For some PDF documents with rotations, the image is completely not on the button and not on the page! Even for some rare cases it is there, the image is twisted!


signedPdf.Seek(0, SeekOrigin.Begin);
_pdfDocStream = signedPdf; //We expect the PDF document be added a signature button/image at the right coordinates and orientation.

return true;
}

Thanks,
Frank

Dear Frank and Shail,

We have investigated this issue and found it is related with rotation but it is not easy to resolve. I hope we can fix it in a week. It is logged as PDFKITNET-4524.

<o:p></o:p>

Any update on this? We have another critical bug with your product that was logged by Dong in your forums under:
Please get back to us on both of these items today. We have seen an abnormal number of issues when using your PDF and barcode tools and we need to understand when the trend will stop or if we should start to seek alternative solutions. I would be happy to discuss with your management if needed.
David VanDyke
Program Manager - Documentation Systems
201-671-1221

Hi,

We are still working on PDFKITNET-4524 and we have provided the ETA which is a week later from March 3th. I have set this issue as high prority and we will try our best to resolve it.

As for the problem of <A title=https://forum.aspose.com/t/31741, I found it is replied several hours later. If you still have question please post it there. Aspose.BarCode is developed and supported by another team.

Any updates on the issue PDFKITNET-4524?

This bug has been fixed. Please download the new version 3.0.