Bug 159119 - Convert docx file to pdf using libreoffice, checkbox and drop-down selection contents are lost
Summary: Convert docx file to pdf using libreoffice, checkbox and drop-down selection ...
Status: RESOLVED DUPLICATE of bug 159452
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.9.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-11 03:26 UTC by pengyk
Modified: 2024-01-31 12:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pengyk 2024-01-11 03:26:21 UTC
Description:
When using the following command to convert to a pdf file, the contents of the checkbox and drop-down selection are lost.
soffice --headless --convert-to pdf:writer_pdf_Export --outdir xx\office xx\aa.docx

Do I need to provide the original documents? There are no pictures to upload, and the description may not be clear.
https://github.com/pac-madarame/Public_file

Steps to Reproduce:
1.soffice --headless --convert-to pdf:writer_pdf_Export --outdir xx\office xx\origin_document.docx
2.open the pdf file
3.

Actual Results:
The contents of the checkbox and drop-down selection are lost.

Expected Results:
I hope that the exported pdf will be the same as the one opened with libreoffice.


Reproducible: Always


User Profile Reset: No

Additional Info:
LibreOffice 7.5.9.2 cdeefe45c17511d326101eed8008ac4092f278a9
Comment 2 pengyk 2024-01-12 02:23:18 UTC
(In reply to m_a_riosv from comment #1)
> Test with this option to enable form fields.
> 
> https://help.libreoffice.org/latest/he/text/shared/guide/pdf_params.
> html?&DbPAR=SHARED&System=WIN#:~:
> text=specifies%20whether%20form%20fields%20are%20exported%20as%20widgets%20or
> %20only%20their%20fixed%20print%20representation%20is%20exported.

Sorry, there are still problems when using the following command to convert. Please see the pictures in the link below
https://github.com/pac-madarame/Public_file/blob/main/question_describe.png
Is there something wrong with the command used?

soffice --convert-to pdf:writer_pdf_Export:{"ExportFormFields":{"type":"boolean","value":"false"}} --outdir xx\office  xx\origin_document.docx
soffice --convert-to pdf:writer_pdf_Export:{"ExportFormFields":{"type":"boolean","value":"true"}} --outdir xx\office  xx\origin_document.docx
soffice --convert-to pdf:draw_pdf_Export:{"ExportFormFields":{"type":"boolean","value":"true"}} --outdir xx\office  xx\origin_document.docx
soffice --convert-to pdf:draw_pdf_Export:{"ExportFormFields":{"type":"boolean","value":"false"}} --outdir xx\office  xx\origin_document.docx
Comment 3 QA Administrators 2024-01-12 03:13:20 UTC Comment hidden (obsolete)
Comment 4 m_a_riosv 2024-01-12 16:16:35 UTC
Sorry, I'm used to working with CLI.

Have you tried opening with LO and export to PDF, to see if it works as expected?, to know with what options it works fine.

There is another one that can affect:
https://help.libreoffice.org/latest/he/text/shared/guide/pdf_params.html?&DbPAR=SHARED&System=WIN#:~:text=specifies%20whether%20multiple%20form%20fields%20exported%20are%20allowed%20to%20have%20the%20same%20field%20name.
Comment 5 pengyk 2024-01-15 01:27:55 UTC
(In reply to m_a_riosv from comment #4)
> Sorry, I'm used to working with CLI.
> 
> Have you tried opening with LO and export to PDF, to see if it works as
> expected?, to know with what options it works fine.
> 

Thank you,I have tried using libreoffice to open the word document and the preview is normal, but exporting it directly to PDF, no matter what options are used, it seems that the export cannot be displayed normally.


There is still a problem when exporting pdf using the following parameters. Is it possible that this is a bug?
When exporting pdf using version 7.3.2, the display is normal, but the checkbox is invalid.

> There is another one that can affect:
> https://help.libreoffice.org/latest/he/text/shared/guide/pdf_params.
> html?&DbPAR=SHARED&System=WIN#:~:
> text=specifies%20whether%20multiple%20form%20fields%20exported%20are%20allowe
> d%20to%20have%20the%20same%20field%20name.
Comment 6 m_a_riosv 2024-01-15 15:33:33 UTC
Don't export directly, instead use Menu/File/Export as/Export as PDF, when you can modify the options to test.
Comment 7 Timur 2024-01-31 12:56:04 UTC
3 issues here:
- headless export form: given advice (does not belong here, but thanks Miguel)
- export checkboxes was just fixed in bug 159452, so I duplicate
- export dropdown, if still NOK, please search and if does not exist report separately - but attach here minimal sample (not on external page), just with English and Asian dropdowns (no other text)

*** This bug has been marked as a duplicate of bug 159452 ***