title: Write output of pdftohtml to stdout
body: <p>I'd like to run <a href="https://linux.die.net/man/1/pdftohtml" rel="nofollow noreferrer">pdftohtml</a> for a pdf file and write its output to /dev/stdout or something that permits me to catch output direct from <code>subprocess</code>.</p>
  <p>My code:</p>
  <pre class="lang-py prettyprint-override"><code>cmd = ['pdftohtml', '-c', '-s', '-i', '-fontfullname', filename, '-stdout', '/dev/stdout']
  
  result = subprocess.run(cmd, stdout=PIPE, stderr=STDOUT, text=True)
  </code></pre>
  <p>The code above exits with code -11.</p>
  <p>I'm running it with Ubuntu 18.04 inside WSL 2.</p>
  <p>I've tried to execute the same command in bash:</p>
  <pre><code>[1]    14041 segmentation fault (core dumped)  pdftohtml -c -s -i -fontfullname  -stdout /dev/stdout
  </code></pre>
  <p>It's also not possible to pass &quot;-&quot; to stdout value.</p>
  <p>What can I do to get html output direct from <code>subprocess.run</code>?</p>
  <p>I know it's possible to pipe <code>cat</code> and output filename to command, but it's not what I looking for.</p>
  <p>The solution must be compatible with WSL2 and python stretch docker image. However, any clarification would be helpful : )</p>