How can I stop the usage of the template name as the pdf title of pdfs made from writer document?

When I make a pdf from an odt doc, attach the pdf to an email message, when the receiver opens the pdf, it has the title template-1. Is there a way to stop happening automatically rather than manually changing in each odt doc the description?

My PDFs from unnamed files are titled Untitled 1.pdf - Please describe how you create the PDF (need to assume that you create your PDF from a file called template-1, since the title of the PDF shown in PDF readers is the name of the file).

Yes, the odt file has template-1 as its description in properties. If I remove this, the created pdf take the title of the odt file. If I leave it, the pdf file takes the title template-1 when downloaded by a receiver. How can I remove template-1 as the description of odt documents automatically, rather than having to do it manually for each document?

It seems to be a known issue for quite a while now (PDF Export Takes on Template Name in PDF Tab ). The workaround was to open my template (template manager, right click, “Edit”), go to “File > Properties > Description”, and set “Title” as blank.

You need to do it manually every time…

Solution: Use a better template name and update your current template.

Send it in for a bug fix!

File>Properties is a powerful tool in advanced Writer usage. There is no “anomaly” in using it to generate titles. It is even its primary role. It is not visible in usual Writer documents because you must Insert>Field to see it appear in text. An export filter is perfectly legitimate to use it where it makes sense.

A document inherit in File>Properties what’s there in the instantiated template. Consequently, I don’t consider it a bug. I always give Title an initial value in my template, but they also provide a cover page in their initial contents. This cover page shows the Title in an inserted field so that I have a visual reminder I should update the field.

What may be questionable is the default initialisation when this field is empty at time of saving as template. But, once again, it depends on your workflow.

For ease of update, I always File>Save as when I create a new template, choosing the extension in the save dialog, so that the .ott is stored in one of my user directories (and more than often, even saved as .odt for even easier update). With this procedure, no default value is deposited in the field, though, as I mentioned, most of the time I have my own value there. I copy (not move!) manuallt my template into the LO template directory when I want it to be integrated with Writer. Nothing is changed without my knowing it.

I wouldn’t simply call it a bug, but there is an annoying mixing up of terms and confusion concerning their usage.

  1. There is a property .Title of the document object (the model) itself.
  2. The subordinate object .DocumentProperties containing meta data also has (contains) a property .Title .
  3. For unknown reasons the default suggestion for a name when storing to the file system is the first mentioned .Title property, even if the created file is an exported .pdf , while as the de-facto identifyer passed to the displaying pdf reader the second mentioned .Title is used.
  4. That second Title is shown in the editing dialog for the DocumentProperties under the Tab Description what again is gravely misleading since a string assigned to the property .Description will be treated as the value of a string displayed as Comments: in that dialog.
  5. To make matters worse, the template name of the document is used as default for the second title, although that is also available as an independent property.

You see: Remedy requires changes to long introduced behaviour - what always must be expected to create new problems and misunderstandings.
Fortunately it isn’t difficult at all to change the last mentioned default with the help of a few lines of user code - if you just find such a default that does not collide with something else again. The following example code uses a datetimestamp (like digital cameras mostly do) as the replacing identifier.

Function onStoringOrExportingCopy(pEvent) As Boolean
onStoringOrExportingCopy = False
REM This function assigned to the application event  
REM "Storing or exporting copy of document"
REM should create a MINIMAL and crude solution to the problem.
REM It will not try to restore any previous setting after the export.
Dim doc, dProps As Object
doc = pEvent.Source
dProps = doc.DocumentProperties
With dProps
 If .Title=.TemplateName Then .Title = "TS_"& FORMAT(Now(), "YYYYMMDDHHMMSS")
End With
End Function