https://bugs.documentfoundation.org/show_bug.cgi?id=167830

--- Comment #9 from Olivier Hallot <[email protected]> ---
Trying myself to document the command lines examples, I feel the pain on
writing the right CLI on windows 11 PowerShell.

To convert an odt file to PDF page 2 to 5 I was able to use the command below
under cmd.exe:
----------------8<----------------
C:\Users\olivi>"c:\Program Files\LibreOffice\program\soffice.com" --convert-to
pdf:writer_pdf_Export:{\"PageRange\":{\"type\":\"string\",\"value\":\"2-5\"}}
C:\Users\olivi\Downloads\WG2508-IntroStyles.odt
----------------8<----------------

However under powershell, that is another story. The best so far was using 
----------------8<----------------
start-process 'C:\Program Files\LibreOffice\program\soffice' -ArgumentList
"--convert-to
pdf:writer_pdf_Export:{`"PageRange`":{`"type`":`"string`",`"value`":`"2-5`"}}","C:\Users\olivi\Downloads\WG2508-IntroStyles.odt"
----------------8<----------------

but it does not work and it seems the argument list is not parsed correctly.
The  console shows 

----------------8<----------------
Could not find platform independent libraries <prefix>
convert C:\Users\olivi\Downloads\WG2508-IntroStyles.odt as a Writer document ->
C:\Users\olivi\WG2508-IntroStyles.pdf using filter :
writer_pdf_Export:{PageRange:{type:string,value:2-5}}
Overwriting: C:\Users\olivi\WG2508-IntroStyles.pdf
----------------8<----------------

Looks like the double quotes are discarded in the argument list.

note: The backtick (`) for escaping double quotes is dangerous as it also work
as continuation line...

Help welcome in clarifying this PowewrShell issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to