Convert .docx to .pdf from the command line, headlessly?

Post Reply
drdocument
Posts: 3
Joined: Mon Aug 05, 2019 6:45 pm

Convert .docx to .pdf from the command line, headlessly?

Post by drdocument »

Are there any ways to run TextMaker headlessly to convert .docx files to PDF? I've been using LibreOffice for this and it's quite slow. (I _think_) LibreOffice can also only convert one doc at a time per process. I'm looking to use this to create a micro-service for conversion, for a bit more context. Currently using https://github.com/unoconv/unoconv to do this with LibreOffice.

Thanks!
miguel-c
SoftMaker Team
SoftMaker Team
Posts: 1233
Joined: Wed Jun 05, 2019 12:02 pm

Re: Convert .docx to .pdf from the command line, headlessly?

Post by miguel-c »

Hi, it's possible to convert to PDF using the commands below:
TextMaker:textmaker.exe /pdf:"myinifile.ini"
PlanMaker:planmaker.exe /pdf:"myinifile.ini"
SoftMaker Presentations: presentations.exe /pdf:"myinifile.ini"

See attached PDF with more details.
Attachments
PDFexportINI.pdf
(844.76 KiB) Downloaded 843 times
drdocument
Posts: 3
Joined: Mon Aug 05, 2019 6:45 pm

Re: Convert .docx to .pdf from the command line, headlessly?

Post by drdocument »

Wow, this is fantastic! Thank you for sharing the document.

I tried this on Linux just now and realized I need to turn the forward slashes in to dashes, e.g.

Code: Select all

textmaker18free -pdf:pdfexport.ini
I noticed that this isn't really headless as TextMaker does open a window momentarily to do the conversion. Is it possible to turn that off as well? If not, I think I can work around this with a framebuffer, but I thought I'd ask. :D

Thanks again!
miguel-c
SoftMaker Team
SoftMaker Team
Posts: 1233
Joined: Wed Jun 05, 2019 12:02 pm

Re: Convert .docx to .pdf from the command line, headlessly?

Post by miguel-c »

drdocument wrote: Wed Aug 07, 2019 6:43 pm Wow, this is fantastic! Thank you for sharing the document.

I tried this on Linux just now and realized I need to turn the forward slashes in to dashes, e.g.

Code: Select all

textmaker18free -pdf:pdfexport.ini
I noticed that this isn't really headless as TextMaker does open a window momentarily to do the conversion. Is it possible to turn that off as well? If not, I think I can work around this with a framebuffer, but I thought I'd ask. :D

Thanks again!
Unfortunately it's not possible to turn it off.
drdocument
Posts: 3
Joined: Mon Aug 05, 2019 6:45 pm

Re: Convert .docx to .pdf from the command line, headlessly?

Post by drdocument »

Got it - thanks for getting back to me on that point!
mix7eart
Posts: 2
Joined: Fri Oct 23, 2020 9:05 am

Re: Convert .docx to .pdf from the command line, headlessly?

Post by mix7eart »

Hello,

I can't make it work on MacOS or Linux.

I have tried with many options:

Code: Select all

/Applications/SoftMaker\ FreeOffice\ 2018/TextMaker\ Free\ 2018.app/Contents/MacOS/textmaker -pdf:"test.ini"
opens textmaker but it does nothing

/Applications/SoftMaker\ FreeOffice\ 2018/TextMaker\ Free\ 2018.app/Contents/MacOS/textmaker /pdf:"test.ini"
gives the error "Impossible to open the file /pdf:text.ini" 
Here is my ini file (UTF-8, three first byte are EFBBBF):
test.ini
(89 Bytes) Downloaded 507 times
I have discovered in the german forum that there are over command line options such as `-disableopengl`.
Could you please give us the complete documentation of these options?

Thank you
martin-k
SoftMaker Team
SoftMaker Team
Posts: 3103
Joined: Fri Nov 21, 2003 4:57 pm
Location: Nürnberg, Germany
Contact:

Re: Convert .docx to .pdf from the command line, headlessly?

Post by martin-k »

This feature is available only in SoftMaker Office, not FreeOffice.
Martin Kotulla
SoftMaker Software GmbH
mix7eart
Posts: 2
Joined: Fri Oct 23, 2020 9:05 am

Re: Convert .docx to .pdf from the command line, headlessly?

Post by mix7eart »

Thank you for your fast reply. I will try.

is there a special license available of SoftMaker Office to allow a commercial usage of document conversion on many servers?
martin-k
SoftMaker Team
SoftMaker Team
Posts: 3103
Joined: Fri Nov 21, 2003 4:57 pm
Location: Nürnberg, Germany
Contact:

Re: Convert .docx to .pdf from the command line, headlessly?

Post by martin-k »

You need to contact sales (at) softmaker.com to discuss your requirements.
Martin Kotulla
SoftMaker Software GmbH
Post Reply

Return to “TextMaker 2018 for Windows”