Daemon to convert docs to pdf?

Hi,

How can I use LibreOffice as a service to convert docs to pdf?
I know that there is the headless option but how can I talk to it?
Is it possible to use HTTP to talk with the daemon or maybe a CLI?
Can the server handle multiple requests at the same time or do I need to implement a queue in my app?

Thanks

If you want to take a direct solution - see this Free PDF Printer

I don’t understand how it is related. “The Bullzip PDF Printer works as a Microsoft Windows printer and allows you to write PDF documents from virtually any Microsoft Windows application.”

What do you call a doc? Is it a .doc or is it any document that LO can handle? What’s more, I think you should be more specific about your use case if you want an answer : do you want to run it on a server? Is it for batch conversions? Maybe LO is even not the appropriate solution for what you want.

A doc is any document. LO can convert many types of documents to PDF so it doesn’t change the question. I want to run it on the server, send a request of a document (any type) and get a PDF as a response.

soffice.exe -pt “Name of Bullzip PDF Printer” “Path and Name File1” “Path and Name File2”…

JohnSUN: Doesn’t your solution work only for windows? I need a server on linux that will convert docs and will be able to process several requests at the same time.

It sounds like what you really want is some kind of service that you can install on a server.

To think out loud for a moment…

# apt-get install document-handling-server
Document Handling Server 0.1 Starting up
DHS running on port 2005 (HTTP)

Users on the same subnet could print to the DHS, maybe upload files to it

scp spreadsheet-to-convert.xls dhs@example.net:/var/dhs/incoming/

…and then download the results a while later (although how would the document converter service know what output format you want, if it’s not PDF?..hmm)

scp dhs@example.net:/var/dhs/outgoing/spreadsheet-to-convert.pdf .

Anyhow, I don’t know of anything like that, currently. But it’s an interesting idea.