Bug 56887 - PDF Export uses the template name rather than document name for the "PDF Title" field
Summary: PDF Export uses the template name rather than document name for the "PDF Titl...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2012-11-08 18:56 UTC by Jon Grossart
Modified: 2023-11-23 19:10 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Template (8.90 KB, application/vnd.oasis.opendocument.text-template)
2012-11-10 04:26 UTC, Jon Grossart
Details
Test file based on template (9.63 KB, application/vnd.oasis.opendocument.text)
2012-11-10 04:27 UTC, Jon Grossart
Details
PDF with error (15.29 KB, application/pdf)
2012-11-10 04:28 UTC, Jon Grossart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Grossart 2012-11-08 18:56:19 UTC
I was exporting a document based on a template to PDF. It correctly assigned the filename to match the document file name.

When I opened the PDF document, the title of the PDF is reported as the base templates name, rather than the document's file name. Also, that might be a good field to allow the user to customize on creation, as it might be different than that the original file name is anyway.
Comment 1 Joel Madero 2012-11-08 23:04:54 UTC
I cannot reproduce this. It only happens if you don't save the document first (ie. if you're still working off an unsaved document and therefore the document doesn't have a name, only has the name of the template).

Marking as WORKSFORME.

If you are experiencing this even after saving the document as a .odt (based off of the ott template). Reopen as UNCONFIRMED and attach a template that you are hitting this snag with -- a template that we can just open, add some text, save as odt, export as pdf and see that the file name is based on the name of the template.

Many thanks for your patience and support
Comment 2 Jon Grossart 2012-11-10 04:26:02 UTC
Definitely is a problem. It was a document I had been editing for over a week, so it's definitely saved.

Tried it on a my "base" templated, which really just has the margins changed to 0.5" as well as a copy of the basic default document -- happens with both.
Comment 3 Jon Grossart 2012-11-10 04:26:31 UTC
Created attachment 69850 [details]
Template
Comment 4 Jon Grossart 2012-11-10 04:27:14 UTC
Created attachment 69851 [details]
Test file based on template
Comment 5 Jon Grossart 2012-11-10 04:28:00 UTC
Created attachment 69852 [details]
PDF with error

PDF Title is the template name, not the document name.
Comment 6 Jon Grossart 2012-11-19 23:53:26 UTC
So, I tried to reproduce in Ubuntu and found the difference.

In Ubuntu, when you export to PDF, it leaves the "PDF Title" field as empty. So when you open it up in PDF-Xchange, it shows the file name as the title.

When you export on windows, it populates that field in the PDF with the template name rather than leaving it blank.

I would think a better default behavior would be to leave it blank in windows as well.

Of course, the ideal would be to allow the user to give values to these fields when exporting the PDF as well.
Comment 7 bfoman (inactive) 2013-05-13 13:32:05 UTC
Confirmed with:
LO 4.0.2.2
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Open .ott file, go to File>Properties>Description - the Title is taken from the name of ott. Therefore it will be exported as PDF title. If you save the file as odt, the title in properties won't change.
Comment 8 David 2013-05-14 20:26:00 UTC
I asked this question on AskLO precisely because of this problem:

http://ask.libreoffice.org/en/question/17019/how-to-set-the-default-document-property-title-to/

Very much confirmed (I use LO on Linux Mint 13, Lubuntu 12.10, Win XP/SP3, and Win7).
Comment 9 ign_christian 2013-05-16 06:10:19 UTC
reproducible on LO 4.0.3.3 (Win7 Home Premium 32bit), PDF properties viewed by PDF-Xchange
Comment 10 Jon Grossart 2015-02-18 01:10:02 UTC
Still present in 4.4.0.3.

The real problem is that when you save a document as a template, it populates the "Title" field in the Description with the template name. This is probably the bug.

Then when you base a document with that template, it pulls in that metadata, which is probably correct behavior.

When saving as a template, it should probably only populate those field explicitly filled in, so that any children documents don't pull in automatic data.
Comment 11 QA Administrators 2016-02-21 08:38:17 UTC Comment hidden (obsolete)
Comment 12 david 2016-03-14 15:17:44 UTC
I confirm the bug still exists
Libre Office V5.0.5 
Windows 8.1

Did not perform REgression.
However, we have been experiencing this since we started using templates in January of 2015, whatever LO version was current then.
Comment 13 QA Administrators 2018-04-14 02:34:11 UTC Comment hidden (obsolete)
Comment 14 Jon Grossart 2018-04-15 00:38:13 UTC
It seems to be working correctly now in 6.0.3.2, so it got fixed somewhere along the way. Closing.

Version: 6.0.3.2 (x64)
Build ID: 8f48d515416608e3a835360314dac7e47fd0b821
CPU threads: 2; OS: Windows 10.0; UI render: GL; 
Locale: en-US (en_US); Calc: CL
Comment 15 Radish 2023-11-23 19:10:55 UTC
Well I have this problem with this setup:

Version: 7.5.7.1 (X86_64) / LibreOffice Community
Build ID: 47eb0cf7efbacdee9b19ae25d6752381ede23126
CPU threads: 2; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

I am using a template called "Cramond Default" and every time File > Properties... > Description (tab) > Title (field)

Every time the title of the template being used is entered in that field. This is a headache when Exporting as a PDF.

Please fix.