Bug 154876 - FORMCONTROLS: Radio button reference value (on) not passed exported to PDF
Summary: FORMCONTROLS: Radio button reference value (on) not passed exported to PDF
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.3.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Form-Controls
  Show dependency treegraph
 
Reported: 2023-04-18 05:48 UTC by Steve
Modified: 2023-05-15 23:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Source document created with Writer 7.1.8.1 on Win10 (8.79 KB, application/vnd.oasis.opendocument.text)
2023-04-25 05:02 UTC, Steve
Details
PDF exported from Write 7.1.8.1 (2.74 KB, application/pdf)
2023-04-25 05:03 UTC, Steve
Details
PDF exported from Writer 7.5.2.2 (10.49 KB, application/pdf)
2023-04-25 05:03 UTC, Steve
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve 2023-04-18 05:48:32 UTC
This problem is new since LibreOffice 7.1.8.1, where things worked just fine.

To reproduce:

1. Create a radio button group in a Writer document.
2. Set a button's 'Data' tab 'Reference value (on)' to '5'.
3. Export As PDF (with 'Create PDF Form' ticked).
4. Open the resulting PDF in Acrobat.
5. Right-click the radio button, select 'Properties'.
6. Click the 'Options' tab.
7. Note that the 'Radio Button Choice' field is set to '0'. It should be '5'.

If the identical steps are taken in Writer 7.1.8.1, the value is exported properly.

I also tested 7.4.6 and it exhibited the problem too.
Comment 1 Steve 2023-04-18 05:49:48 UTC
This is on Win10 21H2.
Comment 2 Robert Großkopf 2023-04-18 10:03:38 UTC
Have tried this with OpenSUSE 15.4 and different LO-Versions:
Created a *.odt-document with a group field and three radio buttons.
Set the value for each button.
Set a default value.
Saved and exported to *.pdf.

Done with LO 7.5.2.2 and also with LO 7.0.5.2.

Opened the *.pdf with Okular (pdf viewer under KDE in Linux).
Chosen an entry of the radio buttons.
Both forms will save the right entry.
Extracted the data with pdftk and both forms will show also the same value - not '0'.

Might be a pecial Windows/Acrobat-problem. I couldn't test this here.
Comment 3 Xisco Faulí 2023-04-18 10:31:28 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 4 Steve 2023-04-25 05:02:19 UTC
Created attachment 186900 [details]
Source document created with Writer 7.1.8.1 on Win10
Comment 5 Steve 2023-04-25 05:03:14 UTC
Created attachment 186901 [details]
PDF exported from Write 7.1.8.1
Comment 6 Steve 2023-04-25 05:03:44 UTC
Created attachment 186902 [details]
PDF exported from Writer 7.5.2.2
Comment 7 Steve 2023-04-25 05:04:00 UTC
I created a new document in Write 7.1.8.1 with 2 radio buttons in a group, reference values on 1 & 5, off 0.

I exported a pdf.

I opened the same source document in Write 7.5.2.2 and exported another pdf.

In Acrobat, same results: 7.1.8.1 version has correct values but 7.5.2.2 has zeros.

I used pdftk dump_data_fields on both pdfs and did spot a difference.

7.1.8.1 output:

FieldStateOption: 1
FieldStateOption: 5
FieldStateOption: Off

7.5.2.2 output:

FieldStateOption: 0
FieldStateOption: 1
FieldStateOption: 5

I have attached all 3 files.
Comment 8 Buovjaga 2023-05-10 13:49:06 UTC
Bibisected the change seen with pdftk with linux-64-7.3 to 50fd91de9babf7c043759f13d8064ce5c22f307d
tdf#143612: map SecondaryRefValue in form pdf export
Comment 9 Xisco Faulí 2023-05-15 10:47:14 UTC
Hi Steve,
is the issue also reproducible if the document is created with LibreOffice 7.5 or is it only reproducible for documents created with any version older than 7.2 ?
Comment 10 Steve 2023-05-15 23:24:27 UTC
Hi Xisco

Yes it is reproducible with latest stable build. That's how I discovered it. I knew earlier versions had worked so I went back and checked. The issue seems to be with the export rather than the source file.