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

Free Support Forum - aspose.com

6.2.0 Facades.FormFillField raises exceptions

// pdf is a byte array filled with the bytes of a MemoryStream that was returned from new PdfFileEditor().Concatenate( inputStreams.ToArray(), outputStream ); Which obviously returned successfully, so it must be (and appears to be) a valid PDF.

using( var tmpPdf = new MemoryStream( pdf ) ) {
var bookmarkEditor = new PdfBookmarkEditor();
bookmarkEditor.BindPdf( tmpPdf );

Unhandled Exception: ?.☼: Doesn’t match conditions
at ?.♫.:slight_smile:(String[] , String[] , Boolean )
at ?.←.:slight_smile:.:slight_smile:(:diamonds: , ☼& )
at ?.►.:slight_smile:(:diamonds: , ☼& )
at ?.:slight_smile:…ctor(Stream , String , Boolean )
at ?.?..ctor(Stream )
at ?.§.:slight_smile::slight_smile:(Stream )
at Aspose.Pdf.Document.:slight_smile::slight_smile:(Stream , String )
at Aspose.Pdf.Facades.PdfBookmarkEditor.BindPdf(Stream inputStream)

Why is it acceptable to ship a product with obvious errors?

Hi Sam,

Thanks for using our products.

I have tested the scenario while reading a simple PDF document into Byte array and then have created a MemoryStream object from it. Later on I have used the same MemoryStream object in BindPdf method of PdfBookmarkEditor class and I am unable to notice any issue. It seems to be an issue related to the resultant PDF that you have generated with PdfFileEditor class. Can you please share the resultant PDF so that we can test the scenario at our end. We apologize for your inconvenience.

PS, Before any release is published, we perform a complete unit test run and we try to ensure that all the issues/features that are targeted in a particular release are actually fixed. But occasionally some issues occur due to the scenario in which specific feature is used.

Sorry, the exception I posted was unrelated to the actual exception raised by Facades.Form.

I am getting this exception while using the Facades.Form.FillField(fieldName, fieldValue) method:

System.Web.HttpUnhandledException (0x80004005): Exception of type ‘System.Web.HttpUnhandledException’ was thrown. —> System.ArgumentException: Key path ‘N’ doesn’t correspond appearance dictionary structure.
at Aspose.Pdf.InteractiveFeatures.Annotations.AppearanceDictionary.get_Item(Object key)
at Aspose.Pdf.InteractiveFeatures.Annotations.WidgetAnnotation.(String , Annotation )
at Aspose.Pdf.InteractiveFeatures.Annotations.WidgetAnnotation.(Annotation )
at Aspose.Pdf.InteractiveFeatures.Forms.Field.()
at Aspose.Pdf.InteractiveFeatures.Forms.Field.setValue(String value)
at Aspose.Pdf.InteractiveFeatures.Forms.TextBoxField.set_Value(String value)
at Aspose.Pdf.Facades.Form.FillField(String fieldName, String fieldValue)

The exact code used to produce this worked perfectly with Pdf.Kit.

Hi Sam,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please share your resultant Pdf file (generated by PdfFileEditor) with us. This will help us identify the issue soon.

Thank You & Best Regards,