ONLYOFFICE / DesktopEditors

An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
https://www.onlyoffice.com
Other
2.64k stars 311 forks source link

providing a high performance executable file to convert doc to pdf #1576

Closed lqzerogg closed 1 month ago

lqzerogg commented 1 month ago

This issue is unique.

Your idea.

I am keen on harnessing the capabilities of OnlyOffice to produce PDF documents for my clients. Despite an overwhelmingly positive overall experience, I've stumbled upon a performance hurdle when converting .docx files to .pdf on my server, which is noticeably sluggish. Could you offer a high-performance executable file specifically designed for this conversion process? Ideally, this executable should be capable of being invoked by other processes through Inter-Process Communication (IPC), eliminating the need to spawn a new process for every single conversion, thereby enhancing efficiency.

K0R0L commented 1 month ago

Please, use DocumentBuilder for this.

lqzerogg commented 1 month ago

Please, use DocumentBuilder for this.

` // from document builder server var BuildFile = function (inputFilePath, outputFilePath) {

child_process.execFileSync(builderPath, [inputFilePath], { cwd: path.dirname(builderPath) });

try {
    fileSystem.accessSync(outputFilePath, fileSystem.F_OK);
} catch (e) {
    throw "An error has occurred. Result File not found";
}

};`

Okay, so you're suggesting leveraging Document Builder in this manner? It appears I'd have to initiate a separate process for each document conversion. Is it possible to launch a single child process and instruct it to carry out document conversions through Inter-Process Communication (IPC)? I'm dealing with hundreds of requests instantaneously and need to convert several hundred documents each second. Enhancing performance to reduce server resource consumption is crucial for me.