mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.35k stars 9.97k forks source link

Implement printing/saving support for listboxes #12189

Closed timvandermeij closed 2 years ago

timvandermeij commented 4 years ago

The test file at https://github.com/mozilla/pdf.js/blob/master/test/pdfs/annotation-choice-widget.pdf contains listboxes, which are not rendered correctly when printed right now. These kinds of fields are made by https://github.com/mozilla/pdf.js/blob/master/src/display/annotation_layer.js#L672-L678.

/cc @calixteman

calixteman commented 4 years ago

tbh I don't really know how to proceed here. For example with single selection, we can render the list and render the highlighted element but when this one is the last one for example then it won't be rendered... It works like this in evince and pdfium, so if you're ok we can do the same. Could you assign me on this bug ?

timvandermeij commented 4 years ago

I have assigned you to this bug. Fortunately listboxes are not as common as the already implemented widgets. We should try to do what Adobe Reader/Acrobat does since that it our reference implementation and what most users would expect.

blizzardengle commented 3 years ago

I noticed that this was removed from the To do list and the Form fill project board was closed. Searching through the public commits and the pre-release version 2.9.359 it doesn't look like the issue with multi-select (listboxes) was solved.

Is there any update or timeline on getting multi-select working for printing/ saving? The comment addressing the issues can be found in the annotations_layer here: https://github.com/mozilla/pdf.js/blob/d80651e5724686535ac4fbdfac5d5e280a16dbdb/src/display/annotation_layer.js#L1121-L1127

stephanrauh commented 2 years ago

@Snuffleupagus closed #14696 as "duplicate", but I suspect the bug has become worse since February 12, 2021. The code snippet @blizzardengle quotes indicates that printing did work once upon a time, it just reduced the list to the first selected option. Now it doesn't print any option.

calixteman commented 2 years ago

I'll work on that stuff asap.

stephanrauh commented 2 years ago

@calixteman Awesome. Thanks!

stephanrauh commented 2 years ago

@calixteman Thanks!