Standardize PDF paper size using soffice

asked 2020-03-12 18:56:34 +0200

Brightmatter gravatar image

updated 2020-07-10 11:35:32 +0200

Alex Kemp gravatar image
soffice --headless "-env:UserInstallation=file:///tmp/LibreOffice_Conversion_${USER}" --convert-to pdf:writer_pdf_Export --outdir \tmp \tmp\fileName.extension

I am using the following command to help move a variety of PDF styles and/or formats into a format that US government agencies will accept. The only current roadblock is the need for A4 paper sizes. I was thinking this might work "--printer PaperSize=8.5x11" or this "--printer PaperSize=A4", but it does not seem to. I can see command parameters here: https://www.systutorials.com/docs/lin... but it does not seem to include "PaperSize".

Is there a better, more official site for obtaining all the command parameters?

Is there a means of setting the PDF page size using soffice at all?

Is there a means of setting the PDF page size via another tool?

Is there a means of setting the PDF page size using Java?

System Info: OS: "Alpine Linux: v3.4 :: Arch: x86_64" Libre: 5.1.4.2-r0

edit retag flag offensive close merge delete

Comments

1

Unless I'm wrong, export to PDF uses the page size defined in the document. Consequently, to change stationery format, you need to change the page size in all page styles. I don't think this can be done from command line.

ajlittoz gravatar imageajlittoz ( 2020-03-12 20:17:37 +0200 )edit

@ajlittoz: you are absolutely right.

Mike Kaganski gravatar imageMike Kaganski ( 2020-03-12 22:09:46 +0200 )edit