Hi Team,
Im trying to add a push button into a PDF and then adding javascript to the push button field which open the print pop up on click. But the javascript is not working.
The code which i tried:
Aspose.Pdf.
Document d = new Aspose.Pdf.Document(app_path + "Popup.pdf");Aspose.Pdf.Facades.
FormEditor frm = new Aspose.Pdf.Facades.FormEditor(d);
frm.AddField(Aspose.Pdf.Facades.
FieldType.PushButton, "Print", "Printing", 1, 200, 700, 300, 725);
frm.SetFieldAppearance(
"Print", Aspose.Pdf.InteractiveFeatures.Annotations.AnnotationFlags.Print);
frm.SetFieldScript(
"Print", "window.print();");
frm.Save(ms);
Also find attached the PDF on which i applied this field and javascipt. Kindly help me on this issue.