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

Free Support Forum - aspose.com

NormalIcon and AlternateIcon

Hello I am creating a PDF application and I need the ability to have a button show up like text for instance the button on the pdf would look exactly like this


So it wont look like a button it would look like a label. Next, when the user clicks on the button “Unfav.” It draws an ellipses around the button text.

I have tried and failed at using ButtonField.AlternativeIcon and ButtonFieldNormalIcon as the XForm it uses is a sealed class. Please help as soon as possible.

I am using the .NET version of AsposePDF.


Would you kindly share your complete sample code snippet that you have tried so far along with generated and expected output PDF documents. We will test the scenario in our environment and address it accordingly.

ButtonField bf = new ButtonField(doc, new Rectangle(600, 1200, 625, 1190);
bf.NormalIcon = ? // wants XForm which is sealed class
bf.AlternateIcon = ? // wants XForm which is sealed class
doc.form.add(bf, 1);

circle_button.pdf (18.4 KB)

attached is a pdf made with a different platform with the expected behavior. You will have to download and open in adobe reader. It will not work in chrome and our users will be using adobe reader.

Best Regards,


We need to investigate whether these sealed classes can be exposed for usage or note. We will also investigate if there is another workaround to achieve your original requirements using the API. For the purpose, an investigation ticket as PDFNET-48654 has been logged in our issue tracking system. We will further look into its details and keep you informed about its resolution status. Please be patient and give us some time.

We are sorry for the inconvenience.

Thanks a lot asad. I look forward to hearing back from you. We have a dead line coming soon but I respect and acknowledge the time needed to research. Thank you.


Thanks for your feedback.

We will look into the logged ticket on first come first serve basis and will inform you as soon as it is resolved.