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`
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
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.
IMO this should be WONTFIX. This is like *editing* the file on command line when printing, and the command line is intended to *not* change anything when printing, including injection of filename data.