Bug 156272 - PDF Export: Form control for date won't set date format to default format of Writer
Summary: PDF Export: Form control for date won't set date format to default format of ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: implementationError
: 161813 (view as bug list)
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2023-07-13 13:55 UTC by Robert Großkopf
Modified: 2024-11-11 13:31 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Test export the form to pdf - default format of system isn't exported. (9.62 KB, application/vnd.oasis.opendocument.text)
2023-07-13 13:55 UTC, Robert Großkopf
Details
Firefox message field reqires other input format than default one (17.97 KB, image/jpeg)
2024-11-11 13:25 UTC, Roland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2023-07-13 13:55:14 UTC
Created attachment 188350 [details]
Test export the form to pdf - default format of system isn't exported.

Open the attached Document.
It only contains a date control, which is set to Date Format → Standard (short).
Export this document to PDF.
Open this exported *.pdf with a simple text editor (used here: kate)
You could find this 2 rows:

/F<</JS(AFDate_FormatEx\("mm/dd/yy"\);)/S/JavaScript>>
/K<</JS(AFDate_KeystrokeEx\("mm/dd/yy"\);)/S/JavaScript>>

Every pdf-viewer, which reads this JavaScript, will only allow to set the format to "mm/dd/yy". You could test this in Firefox or other viewer, not in Okular, which doesn't read this rows.

You could also read the language, which is the default for Local Settings:

/Lang(de-DE)

But the format has nothing to do with the local setting. Should be "dd.mm.yy", if Standard (short) will work right.

It is impossible to get this format when exporting to *.pdf, because it won't be offered by the data control.

Best solution will be to set the date format to the default format of the system, if default format has been chosen.
Comment 1 Dieter Menne 2023-07-13 16:44:07 UTC
Was found in a discussion between Robert and me.
Comment 2 Robert Großkopf 2023-07-13 17:41:16 UTC
Depending on comment 1 and this thread
https://ask.libreoffice.org/t/beim-export-nach-pdf-wird-das-datumsformat-auf-10-07-23-eingestellt-wie-bekomme-ich-10-07-23/93526

I will set this one to NEW.
Comment 3 Buovjaga 2024-08-21 05:16:59 UTC
*** Bug 161813 has been marked as a duplicate of this bug. ***
Comment 4 Buovjaga 2024-08-21 05:32:22 UTC
Looks like Xisco implemented this for 7.4 in bug 105972. Let's show this to him.

I can only see the dropdown selector in Acrobat Reader, not Firefox or Edge.
Comment 5 Roland 2024-11-11 13:25:45 UTC
Created attachment 197544 [details]
Firefox message field reqires other input format than default one
Comment 6 Roland 2024-11-11 13:31:40 UTC
Comment on attachment 197544 [details]
Firefox message field reqires other input format than default one

This bug is still in version 24.2.6.2.
Firefox message box referres to pdf javascript as it is exported by Writer to PDF form.