Bug 128042 - PDF export: "View PDF after export" fails if file name contains a dot, cause file extension *.pdf is not added to export file
Summary: PDF export: "View PDF after export" fails if file name contains a dot, cause ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 150603 (view as bug list)
Depends on:
Blocks: PDF-Export-File-Dialog
  Show dependency treegraph
 
Reported: 2019-10-09 09:13 UTC by roumanet
Modified: 2023-02-03 14:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
example when exporting PDF file (4.71 KB, image/png)
2019-10-09 11:36 UTC, roumanet
Details
screenshot (126.09 KB, image/png)
2019-10-10 16:45 UTC, Oliver Brinzing
Details
menu File > export as > export as PDF = options (22.49 KB, image/png)
2019-10-10 18:42 UTC, roumanet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description roumanet 2019-10-09 09:13:58 UTC
The problem occur because the save dialog box for Export PDF don't add .pdf extension.
So Export module try to create a file "API REST with Node.JS" and show error input/output.
Comment 1 roumanet 2019-10-09 11:36:12 UTC
Created attachment 154861 [details]
example when exporting PDF file
Comment 2 Oliver Brinzing 2019-10-09 17:11:10 UTC
(In reply to roumanet from comment #0)
> The problem occur because the save dialog box for Export PDF don't add .pdf
> extension.
> So Export module try to create a file "API REST with Node.JS" and show error
> input/output.

i can not confirm this with:

Version: 6.3.2.2 (x64)
Build-ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: 

"API REST with Node.JS.odt" is exported but named: "API REST with Node.JS" instead of "API REST with Node.JS.pdf".
This behaviour is already reproducible with AOO 4.1.5.
Comment 3 roumanet 2019-10-09 19:59:41 UTC
I'm using 6.3.2.2 too

1) create new dow Writer
2) save as toto.JS.odt
3) menu Export as... > Directly as PDF
4) accept default name (the workaround is simply to add .pdf)
5) error dialog box open with "Error saving the document toto.JS: General Error..."

Always reproductible. Could you test this procedure and modify status of this ticket if needed? Thanks.
Comment 4 roumanet 2019-10-09 20:01:24 UTC
oh... important : I'm under Windows 10.
Comment 5 roumanet 2019-10-09 20:04:46 UTC
(sorry about that, I've just found how to add informations on my configuration, thanks Oliver).
Version: 6.3.2.2 (x64)
Build ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: fr-FR (fr_FR); UI-Language: en-US
Calc: threaded
Comment 6 Oliver Brinzing 2019-10-10 16:45:58 UTC
Created attachment 154905 [details]
screenshot

still can not confirm, no error, pdf is saved with wrong file name extension, makes no difference if i enable/disable "Automatic file name extension"
Comment 7 roumanet 2019-10-10 18:41:46 UTC
Your are right, could you check a last thing?
My configuration for PDF options have "View PDF after export" checked (probably by default, not sure).
If I uncheck it, no error is showned.

By the way, I don't think the right way is to accept that the PDF name could be .JS so even without the error message, the bug still there (because for a "toto.odt" export to PDF would generate "toto.pdf").

So do you have an idea about the title for this bug?
Comment 8 roumanet 2019-10-10 18:42:43 UTC
Created attachment 154907 [details]
menu File > export as > export as PDF = options
Comment 9 Oliver Brinzing 2019-10-11 16:48:27 UTC
(In reply to roumanet from comment #7)
> Your are right, could you check a last thing?
> My configuration for PDF options have "View PDF after export" checked
> (probably by default, not sure).
> If I uncheck it, no error is showned.

now i can confirm, but i think, the root cause is the missing file extension *.pdf.
Comment 10 QA Administrators 2021-10-11 03:31:56 UTC Comment hidden (obsolete)
Comment 11 phv 2021-11-12 21:21:55 UTC
(In reply to Oliver Brinzing from comment #9)

> now i can confirm, but i think, the root cause is the missing file extension
> *.pdf.

I also think that this is what is happening:
- LibreOffice interprets the filename as a filename with a proper extension and therefore does not add the .pdf extension as the software should.
- LibreOffice asks the operating system to start the application associated with this extension.
- If there is no application associated with this extension or the application fails to open the file, LibreOffice returns a notification.

The initial issue is that LibreOffice does not add the .pdf extension, because the software refuses to modify the format. This same behavior is reproduced when saving the document: LibreOffice does not add .odt when the filename already has an extension. The question is whether this behavior is intended. But the error popup would benefit from being more explicit.
Comment 12 Buovjaga 2023-02-03 14:16:27 UTC
*** Bug 150603 has been marked as a duplicate of this bug. ***