iTextSharp button (pdf) doesn't work on Edge - itext

We developed an Asp.net web application (6-7 years ago), which generates pdf fillable forms dynamically, based on a template using iTextSharp, and display it inside the browser. This pdf fillable form(iTextsharp submitForm) has a submit button(also created with itextSharp-getPushButton). When user clicks on this button, the script behind the button submit(post) the form.
This application was working just fine for years using IE 11 using IE pdf plugin.
Recently, we upgraded to Microsoft Edge, which like Chrome, has its own, built-in pdf viewer, and the button for posting(submitting) the form stopped working. Button is there, on pdf form, but does not do anything when clicked. I found few resources saying this is because Chrome/Edge do not allow script from pdf embedded button to run. If it is not possible to run the script/code from pdf form inside Edge/Chrome, is there another way to accomplish this? We have an option to run Edge in IE mode, but this is not a long term solution.
Any ideas?
Thank you,
Goran

Related

IText Pdf - RadioBox(On/Off) not appearing for some pdf

In our application we are using Itext Pdf 5.5.3 library.
We have checked with some of the pdfs in which Checkboxes displayed correctly(check/uncheck) .
However there are some pdf with RadioBoxes and do not display radiobutton(on/off) correctly.
I also use this link to validate pdfs and java code
String[] values = form.getAppearanceStates("Checkbox");
return null values.
Also tried Itext RUPS and found that pdf which are working shows Form Field Names in RUPS Form Tab. And PDfs which are not working do not display form fields.
I tried generating pdf from word document and it doesn't display form fields in RUP , neither I can check/uncheck checkbox in Adobe Acrobat Reader.
What could be the solution to display radiobutton with check on / off ?
Edit -
I had created sample web application to reproduce the issue.
Please setup attached web application and let me know the fix for the issue.
Please download from this link
You have successfully discovered the difference between interactive PDF forms and "flat" PDF documents that look like a form to the human eye, but that aren't interactive forms.
To make the "flat" forms interactive, you need to open those flat documents in PDF editing software (e.g. Adobe Acrobat) and you need to add a form field manually.
You can ask Acrobat to guess where it should add fields, but Acrobat will be wrong in many cases for obvious reasons. You always need a human if you want it to be done correctly.
As for creating an interactive PDF from Word... Forget about it. Use OpenOffice or LibreOffice.

In Linux: Importing of Existing PDF Forms and Adding Submit Buttons

I'm trying to save post data from a PDF file to my web server. I don't have commonly available Windows tools, because I'm on Linux.
When using Linux software like Scribus, I am not able to successfully import the existing PDFs correctly... these are often critically accurate legal documents, which must appear exactly the way they've been designed.
I've used a web application (PDFecape.com) to add form fields to the PDF... I've autopopulated these fields on the server before showing the user. This application does not allow for a submit button.
I then used "Wine" to run Windows software called Soda PDF to add a submit button and a URL for submission.
It uses Javascript to submit the form, which from what I've read, seems to be the right approach. However, the server is not being pinged by PDFs when the button is pressed.
The URL for submission is a simple PHP script that saves post content as a PDF and sends me an email.
I've tried it in Ubuntu's built in PDF document viewer, Chrome's built in PDF reader, and have download Adobe's Acrobat Reader to try submitting with that as well.
In each case, the server is not being pinged.
Is there another way to add a submit button to this form? Any other ideas?
Thanks,
Jason Silver

Creating a tutorial on a form or report

I want to create a tutorial inside a form showing how to use my database. I created it in PowerPoint and saved it as a PDF. I was wondering if it was possible to attach this PDF in my form. I also saved these slides as images on my computer, tried to attached them to a form and it exceeded 22 inches in lenght. is there any way around this any suggestions perhaps?
You could use javascript and other tools to show the pdf as a slideshow, I recommend that you use this tool its free and you can integrate your slides in a very easy way with javascript.
http://ajaxslideshow.com/show-pdf-slideshow-javascript.html

Is it possible to attach file while filling in Adobe Forms pdf?

I know that forms in .pdf made by Adobe Acrobat can act like questionnaire or application blank for filling input fileds and saving results, but is it possible in a way to add more interactiviry to them
- add file upload or attachment to resulting document?
It's kind of possible.
You'll need to add Javascript code to your documents. The code should show Browse For File dialog and import selected file to the document. Please have a look at Import Named File Attachment script (at the bottom of the page). I doubt that this solution will work in Adobe Reader or alternative PDF viewers, but Acrobat Professional should do the trick.
Another solution is given is this thread on Adobe forums:
...I figured out a roundabout way to attach files in adobe reader (not
the full blow adobe acrobat reader). Via Adobe Acrobat 9 Pro I
created a blank form with the "comment/mark up" tools enabled. Then I
merged that file with the other PDF form that was formatted with
fields, radial buttons etc. I had to create the blank form for the
attachments separately because if I tried to enable the "comment/mark
up' tool on the form with fields and radial buttons it disabled the
fields. ... The comment markup tool then allowed me to attach files
via the "attach file as a comment" option.

open ms doc,docx or image file in browser in c#

I have developed the asp.net mvc application. my one form have the file upload control. so in details view i want to implement the facility to view the uploaded document in browser itself. it should not ask for download and should not open MS office instance to open document. its a user req. It should opens in view mode in browser itself. what code i have to do ? I am using C# as language.
It is not straight forward. For images you can use <img>tag and link to the location in server where you saved the uploaded image. That should work.
However ASFAIK showing the doc/docx things in web page itself is not possible. You will have to employ some third party control to achieve that. Search google to find such controls. May come at a cost.