Download it now!
Bug 99621 - Command line --convert to PDF doesn't have an option to include filename/fields in page header
Summary: Command line --convert to PDF doesn't have an option to include filename/fiel...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
Depends on:
Blocks: PDF-Export
  Show dependency treegraph
 
Reported: 2016-05-02 09:03 UTC by Johannes K
Modified: 2017-11-23 13:22 UTC (History)
2 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 Johannes K 2016-05-02 09:03:53 UTC
Discussed this earlier today on IRC: 

The PDF exporter command-line should include an option that adds the current file's name to the header of the exported PDF. 

This is useful when preparing a lot of files for printing, when metadata such as the spreadsheet's data or title is included in the filename. Especially when batch-processing files via the LibreOffice command-line.

It is probably better to instead develop a more generic "header format string" option that allows including custom fields, since that would allow for greater flexibility while still being relatively usable.

An example command I could think of if a "generic" version is more desirable:

`libreoffice --convert-to pdf --convert-head "%{filename} - Page %{currentPage} of %{pageCount}" *.xlsx`

However, a simple implementation could include

`libreoffice --convert-to pdf --convert-filename-head *.xlsx`
Comment 1 Cor Nouws 2016-05-02 09:27:59 UTC
Nice idea, Johannes. Set to New. Thanks for filing.

I rename the summary a little bit. "Should" might easily trigger someone to say "oh, please go ahead, after all it's open source. " And I don't think that is the idea you want to give ;)

Cheers - Cor
Comment 2 Dennis Roczek 2016-05-06 00:21:40 UTC
I was thinking about this request. Yes, I prefer to have such an option by default in LibreOffice. I had already multiple requests in the #libreoffice channel at freenode.

Just for a workaround: there are PDF printers who do that. Configure one additional PDF printer and set it as default. The "print" the file. (see https://help.libreoffice.org/Common/Starting_the_Software_With_Parameters )

Maybe this helps you at least a bit.