<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - when I convert word to pdf, appear a command window, after finished ,the command window disappear."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=143718">143718</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>when I convert word to pdf, appear a command window, after finished ,the command window disappear.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.4.2.2 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86 (IA32)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>675640539@qq.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
when I execute soffice --headless --convert-to pdf, appear a command
window.After finished convert,the command window disappear.I have try other
arguments,like --invisible,--minimized,--invisible,and install other version of
libreoffice, such as 5.4.7.2 release

image:<a href="https://oscimg.oschina.net/oscnet/up-f5bfbe956a1d94815d3409e6b2e6c53c14e.png">https://oscimg.oschina.net/oscnet/up-f5bfbe956a1d94815d3409e6b2e6c53c14e.png</a>

Steps to Reproduce:
1.Execute soffice --headless --convert-to pdf by the javascript in website,a
command window appear.
2.Finished convert,the command window disappear.

Actual Results:
A command window appear.

Expected Results:
Command window not appear.


Reproducible: Always


User Profile Reset: No



Additional Info:
My OS is windows 7,here is my javascript,thanks.

'use strict';

const fs = require('fs');
const path = require('path');
const async = require('async');
const tmp = require('tmp');
const { exec } = require('child_process');

exports.convert = (document, format, filter, callback) => {
    const tempDir = tmp.dirSync({prefix: 'libreofficeConvert_', unsafeCleanup:
true});
    const installDir = tmp.dirSync({prefix: 'soffice', unsafeCleanup: true});
    return async.auto({
        soffice: (callback) => {
            let paths = [];
            switch (process.platform) {
                case 'darwin': paths =
['/Applications/LibreOffice.app/Contents/MacOS/soffice'];
                    break;
                case 'linux': paths = ['/usr/bin/libreoffice',
'/usr/bin/soffice'];
                    break;
                case 'win32': 
                console.log('process.env')
                console.log(process.env['PROGRAMFILES(X86)'])
                console.log('PROGRAMFILES')
                console.log(process.env.PROGRAMFILES)
                paths = [
                    'C:/Program Files/LibreOffice/program/soffice.exe'
                    // path.join(process.env['PROGRAMFILES(X86)'],
'LIBREO~1/program/soffice.exe'),
                    // path.join(process.env['PROGRAMFILES(X86)'],
'LibreOffice/program/soffice.exe'),
                    // path.join(process.env.PROGRAMFILES,
'LibreOffice/program/soffice.exe'),
                ];
                console.log('break')
                console.log(paths)
                    break;
                default:
                    return callback(new Error(`Operating system not yet
supported: ${process.platform}`));
            }

            return async.filter(
                paths,
                (filePath, callback) => fs.access(filePath, err =>
callback(null, !err)),
                (err, res) => {
                    if (res.length === 0) {
                        return callback(new Error('Could not find soffice
binary'));
                    }

                    return callback(null, process.platform === 'win32' ?
`"${res[0]}"` : res[0]);
                }
            );
        },
        saveSource: callback => fs.writeFile(path.join(tempDir.name, 'source'),
document, callback),
        convert: ['soffice', 'saveSource', (results, callback) => {
            let command = `${results.soffice} --headless --invisible
--convert-to ${format} `;
            if (filter !== undefined) {
                command += `:"${filter}"`;
            }
            command += ` --outdir ${tempDir.name} ${path.join(tempDir.name,
'source')}`;

            return exec(command, callback);
        }],
        loadDestination: ['convert', (results, callback) =>
            async.retry({
                times: 3,
                interval: 200
            }, (callback) => fs.readFile(path.join(tempDir.name,
`source.${format}`), callback), callback)
        ]
    }, (err, res) => {
        tempDir.removeCallback();
        installDir.removeCallback();

        if (err) {
            return callback(err);
        }

        return callback(null, res.loadDestination);
    });
};</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>