Skip to content

Javascipt: Submit/Export Form action doesn't work in Firefox #13266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
harrysingh1009 opened this issue Apr 19, 2021 · 7 comments
Open

Javascipt: Submit/Export Form action doesn't work in Firefox #13266

harrysingh1009 opened this issue Apr 19, 2021 · 7 comments

Comments

@harrysingh1009
Copy link

Attach (recommended) or Link to PDF file here:
Sample PDF.pdf

Configuration:

  • Web browser and its version: Firefox v88
  • Operating system and its version: Windows 10
  • PDF.js version: Latest
  • Is a browser extension: yes

Steps to reproduce the problem:

  1. Open the PDF file attached to this ticket in Firefox.
  2. Try clicking on the "Submit" or "Export" buttons at the end of the document.

What is the expected behavior? (add screenshot)

Clicking Submit should submit form data to the URL specified. (in this case, google.com)
Clicking export button should pop up a window to ask user to save the file.

What went wrong? (add screenshot)

Clicking them doesn't perform the respective action of Submit or Export.

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

@Snuffleupagus
Copy link
Collaborator

@harrysingh1009
Copy link
Author

@Snuffleupagus Thanks for your response. So, does that mean that the functions/APIs "exportAsXFDF" and "submitForm" have not been implemented yet and I cannot use it?
Or there is a way to implement it from my side?

Thanks

@marco-c
Copy link
Contributor

marco-c commented Apr 20, 2021

@calixteman maybe we should show a message saying something like "This action is not supported"?

@calixteman
Copy link
Contributor

For now there are no plan to support submitForm function since no function involving network are supported.
@marco-c, why not.

@tbruckmaier
Copy link

Is this something on the roadmap? Or is it a design choice to not support network functions?

@calixteman
Copy link
Contributor

We need to see with security team if there are any concerns to implement functions involving network.
For now it has been decided to not implement them.

@dr-death2
Copy link

From my point of view implementing network functions should be a no-go.

PDF should be used for what it was made for: transferring static content between systems. PDF format was bloated in the past with lots of senseless functions like interactivity, dynamic content like flash or video, scripting etc. Like many of Adobes ideas, this introduced lots of security flaws and ruined the usability for the original purpose.

Implementing above mentioned things into PDF aim eventually in making a second, parallel "standard" concurring to the possibilities of HTML. This is a conceptual problem per se.

People who miss interactivity in PDFs, transferring data to externals severs, linking external content, video etc. should answer the question why the do not use HTML for things like that.

In my opinion, for tasks like the above, PDF is the wrong tool. Mozilla should NOT support establishing concurring standards and NOT support using the wrong tools for the wrong task by the price of ruining usability, security and privacy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants