Ask Your Question

How can I remove header and footer when converting from calc to pdf headless?

asked 2018-01-12 03:12:37 +0200

kosmonaut gravatar image

I'm bulk converting office documents to pdf like so

soffice --headless --convert-to pdf --outdir myfolder mycalc.xlsx

Some documents are including a header and footer on each page like below




file:///home/user/path/to/file/mycalc.xlsx Page 1 of 6 01/08/2018

How can I remove this footer when I do the conversion?

edit retag flag offensive close merge delete


By the way: Use the native OpenDocument formats (.ods for Calc) whereever possible.

Lupp gravatar imageLupp ( 2018-01-12 11:43:29 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-01-12 11:54:08 +0200

Lupp gravatar image

I don't know for sure, but I feel rather sure that there are no parameters modifying the --convert-to parameter to such tiny details. If you actually need to do it automatically, you will need to write some user code, and to organize the process down to the details.
This may require to create a helper document containing the code.
The next question would be then how the helper-code can access the complete command line the helper document was called with.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-01-12 03:12:37 +0200

Seen: 399 times

Last updated: Jan 12 '18