Aspose.PDF Submit button generates "Expected a name object" error

I am in process of converting Aspose.Pdf.Kit to Aspose.Pdf.Facade (Latest released on 4/1/2014).

I am adding “submit” buttons to every page in a PDF file. When implemented in Pdf.Kit, it worked fine.

But when I changed it to Pdf.Facade, I started getting “Expected a name object” error as shown in the attachment.

I searched for an answer on the forum but the closed thing I got was this
Adobe Reader Error: Expected a name object“, queryArg.GetQueryStringText());
for (int i = 0; i < pageCount; i++)
{
string label = “Submit”;
if (shouldLockForm) label = “Submitted”;

fe.SubmitFlag = SubmitFormFlag.Fdf;
fe.AddSubmitBtn(string.Format("SUBMITFORM{0}”, i + 1), i + 1, label, submissionUrl,
500, 765, 600, 790);
}
}


Thanks,


I have cleared all radio button values before saving and the error doesn’t occur. So what I think is this has something to do with radio buttons.


I tried to “touch” a random radiobutton but I am still getting “Expected a name object”

Hi Sung,


Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for .NET 9.1.0 where I have used one of my sample PDF files and I am unable to notice any problem. When I press the submit button, no error message appears (except a message stating that an error occurred during submit process). Can you please share the source PDF form which you are using so that we can again try replicating the issue at our end. We are sorry for this inconvenience.

[C#]

FormEditor fe = new
FormEditor();<o:p></o:p>

fe.BindPdf("c:/pdftest/PTS_Form_2014_v1.3_clear.pdf");

string submissionUrl = "http://localhost/";

for (int i = 0; i < new PdfFileInfo("c:/pdftest/PTS_Form_2014_v1.3_clear.pdf").NumberOfPages; i++)

{

string label = "Submit";

//if (shouldLockForm) label = "Submitted";

fe.SubmitFlag = SubmitFormFlag.Fdf;

fe.AddSubmitBtn(string.Format("SUBMITFORM_{0}", i + 1), i + 1, label, submissionUrl,

500, 765, 600, 790);

}

fe.Save(“c:/pdftest/SubmitbuttonAdded.pdf”);

Hi Nayyer.


I have added the sample application & PDF form that generates “Expected a name object” error when you press the submit button on the top right. ( I didn’t include the license file in the zip. Let me know where I should email the license file if you need it )

When you clear 2 radiobuttons by clicking on “clear” buttons, you can now submit without error.


Hi Sung,


Thanks for sharing the sample project.

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-36759. 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 Sung,


As per your live chat session, you have upgraded your support subscription to Priority Support(PS) and want to raise current issue priority accordingly. Please make a request for same using your Priority Support user id, so we will tag the issue with it and will raise its priority as well.

Please feel free to contact us for any further assistance.


Best Regards,

The issues you have found earlier (filed as PDFNEWNET-36759) have been fixed in Aspose.Pdf for .NET 9.3.0.

Blog post for this release can be viewed over this link


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.