New issue
Advanced search Search tips

Issue 719339 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

pdf form not submitting XML

Reported by j...@searchix.de, May 8 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Create form with Open-/Libreoffice
2. Export form to PDF with post format setting "XML"
2. Display in web page inline.
3. Fill form and submit
4. check post data on server

What is the expected behavior?
the form should submit data in XMl format to server

What went wrong?
Chrome submits form data in FDF format

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 58.0.3029.96  Channel: stable
OS Version: 3.13.0-117-generic ubuntu
Flash Version: 

I am a developer and I am working on a web application, written in PHP, which should display PDF forms in the Chrome browser inline and the form data should submit back to the server. I have full access to the entire system, which is in my case usually a Linux server.
What works so far is the display of the PDF file and upon filling the form and pressing the submit button the form data gets submitted to the server. This is in Chrome 58.

I have Code on the server, which expects the form data in XML, but Chrome seems to submit the form data only in FDF format, no matter how the form was saved. Usually the possible options are FDF, XML or as regular HTTP POST data. So I would like to have information, if Chrome is even capable of submitting anything else but FDF data. And if this is the case, what is required to accomplish that.
 

Comment 1 by tkent@chromium.org, May 8 2017

Components: -Blink Internals>Plugins>PDF
Labels: Needs-Feedback
Can you show an example of how you're embedding the PDF in your page and a PDF which is submitting incorrectly.

Comment 3 by j...@searchix.de, May 9 2017

It is just embedded as IFrame, but the problem also occurs if the pdf form is opened directly in the browser. I attached what is needed, to replicate the problem.
The file testpdf.pdf inludes 2 text fields and a submit button. The data will be submitted to http://localhost/pdfsubmit.php. I attached the PHP file, which will store the post data in tmp/file if tmp exists and has the write permission set.
If you place the PDF and the PHP in your web root and open the Form in your browser entering http://localhost/testpdf.pdf, fill it and submit, the post data will be stored in tmp/file. It is always posted as FDF no matter how you exported the file from Libre-/Openoffice.

I also attached the ODT where you can change the submission URL to your needs and export the file as PDF from the Libre-/Openoffice.

If you need more information, like how to work with PDF forms in Libre-/Openoffice let me know.
testpdf.pdf
13.8 KB Download
pdfsubmit.php
97 bytes View Download
officeformforpdf.odt
9.9 KB Download
Project Member

Comment 4 by sheriffbot@chromium.org, May 9 2017

Cc: dsinclair@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "dsinclair@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: TE-NeedsTriageHelp

Comment 6 by npm@chromium.org, May 11 2017

Labels: Needs-Feedback
Is this working correctly in any browser? Take a look at the PDF spec[1], the default ExportFormat is FDF, and don't see XML as an option (but maybe I missed something). But XFDF is an option.

[1] http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_reference_1-7.pdf#page=704
It works in the Adobe Acrobat Viewer or Adobe Plugin. Opera is using the same technology as Chrome, if I am not mistaken, and the behaviour is the same. Firefox doesn't seem to support PDF form submissions in the integrated viewer.

With XML I actually meant XPDF. Sorry, if I caused a confusion.

As to the set flag in the PDF file attached above, the line 305 looks like this:

/AA<</D<</Type/Action/S/SubmitForm/F(http://localhost/pdfsubmit.php/)/Flags 32>>>>

So the set flag is "32". According to the specification the format XFDF is the 6th set bit, which is indeed the number 32.

I have also tried a PDF file with the flag "4" set for HTML post data, which corresponds to the 3rd bit, mentioned in the specification. The result is the same, which is that the data gets submitted in FDF format as well. I attached that file to this post.

If you could provide feedback, as to whether formats other than FDF are supported at all, it would already be extremely helpful.


pdfformtmplhtml.pdf
10.3 KB Download

Comment 8 by weili@chromium.org, May 15 2017

Labels: -OS-Linux -Type-Bug -Needs-Feedback -TE-NeedsTriageHelp OS-All Type-Feature
Status: Available (was: Unconfirmed)
AFAIK, only FDF format is supported for now. It would be nice to support other format such as HTML forms.
Project Member

Comment 9 by sheriffbot@chromium.org, May 16 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment