-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[Acroform] Use the full path to find the node in the XFA datasets where to store the value #16082
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a test-case, to avoid this breaking in the future?
It's a bit hard to have a test. So I see two solutions to have a test use qpdf to have a clear pdf and just check a xml string is included in the file or try to write a pdf by hand. I'm not super excited by the 2nd solution and I'm not sure if we can attach a pdf to the gh issue where encryption has been removed. Do you have any ideas ? |
How about a unit-test then, just so that the new code isn't completely untested? Note that we've got a number of unit-tests specifically for the pdf.js/test/unit/annotation_spec.js Lines 1308 to 1385 in e676c93
|
9b878aa
to
19d0f19
Compare
I managed to write a test but I had to a new function in the api. |
19d0f19
to
2e6a306
Compare
When I wrote the code to save data in the xfa datasets it was with f1040 form in mind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, thanks for adding tests!
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/b108c009fd28d6a/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/2ce9481eb89590f/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/2ce9481eb89590f/output.txt Total script time: 4.63 mins
Image differences available at: http://54.241.84.105:8877/2ce9481eb89590f/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/b108c009fd28d6a/output.txt Total script time: 9.15 mins
Image differences available at: http://54.193.163.58:8877/b108c009fd28d6a/reftest-analyzer.html#web=eq.log |
…re to store the value I noticed several 'Path not found' errors because of a field called #subform[2]. From the XFA specs, the hash is used for a class of elements in the template tree. When we're looking for a node in the datasets tree, it doesn't make sense to search for a class. Hence the path element starting with a hash are just skipped.
2e6a306
to
3a21423
Compare
Strange... |
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/8f9a6e2d949a841/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/5be3c21866bc8a2/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/5be3c21866bc8a2/output.txt Total script time: 26.03 mins
Image differences available at: http://54.241.84.105:8877/5be3c21866bc8a2/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/8f9a6e2d949a841/output.txt Total script time: 32.13 mins
Image differences available at: http://54.193.163.58:8877/8f9a6e2d949a841/reftest-analyzer.html#web=eq.log |
I noticed several 'Path not found' errors because of a field called #subform[2]. From the XFA specs, the hash is used for a class of elements in the template tree. When we're looking for a node in the datasets tree, it doesn't make sense to search for a class. Hence the path element starting with a hash are just skipped.