Bug 144056 - Add command line option to skip header and footer when exporting (to all if possible or to PDF)
Summary: Add command line option to skip header and footer when exporting (to all if p...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Commandline Calc-Header-Footer
  Show dependency treegraph
 
Reported: 2021-08-24 14:37 UTC by venkat.kambhampati
Modified: 2021-08-30 14:54 UTC (History)
1 user (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 venkat.kambhampati 2021-08-24 14:37:36 UTC
Description:
HI,
When I am trying to convert .csv file to pdf , using the below command, soffice.exe is adding the input file name as a heading to the output file.
soffice.exe --convert-to pdf statusreport.csv --headless
Is there a way to avoid soffice.exe to add the input file name to the output file heading?

In our case the input file name is a GUID. So a GUID as heading in the output file is not acceptable for our customer.
Hence kindly request you to show us an alternative way to avoid this.

Steps to Reproduce:
1.Run this command with any CSV file: soffice.exe --convert-to pdf inputfile.csv --headless
2.The converted output file is appended with input filename as heading
3.

Actual Results:
The output file with heading

Expected Results:
Output file without heading


Reproducible: Always


User Profile Reset: No



Additional Info:
I could not find any help on this topic. Kindly help.
Comment 1 venkat.kambhampati 2021-08-24 14:46:55 UTC
This behavior is not observed with other libre office file types like .odt
Comment 2 Michael Warner 2021-08-29 13:34:04 UTC
I don't know if it is possible to filter out the file name when it is generated. But in case that is not an option, you might be able to use pdfbox to remove it from the PDF.
Comment 3 venkat.kambhampati 2021-08-30 04:49:57 UTC
Thank you Michael for the suggestion, I will try if pdfbox can solve the issue or not for our product.

Thanks,
Venkat
Comment 4 Timur 2021-08-30 07:06:01 UTC
There are 3 ways to resolve this: 
1. as suggested, automating header removal, which is a workaround;
2. adding option to PDF at least or any export not to use header and footer;
3. turning off header in Calc by default, which is bug 99296.

This request will be resolved with 99296 so it could be a duplicate in this particular case, but I'll set New general enhancement for option 2 and rename.
Comment 5 venkat.kambhampati 2021-08-30 13:37:10 UTC
Hi Timur,
Thank you so much for the response. I have gone through the bug #99296. I understand that bug 99296 talks about disabling the header/footer by default. I think that in the bug they were talking about the internal sheet name getting added as header. But in our case the file name of the CSV file is getting added as header. 

And also when I have opened the .csv file using OpenOffice Calc(calclo.dll) v6.4.5.2 , the default header is "Sheet1" , when I tried to delete(selected "none") as header in the Edit -> Header/Footer settings and saved the file with "Keep current format" pop up dialog option selected, and reopened the file, I can see that earlier settings are not getting saved.

Kindly note that in my case CSV file name is coming as header and not internal sheet name. So does Bug# 99296 handle this issue? Kindly advice.

Thank you,
Venkat
Comment 6 Timur 2021-08-30 14:26:29 UTC
If header is turned off, headless convert doesn't show it also.
It means that it can be turned off for ODS but not for CSV.
Comment 7 venkat.kambhampati 2021-08-30 14:54:49 UTC Comment hidden (no-value)