There is RunThrough
which captures the output and evaluates it. However, I would like the output as String. Is there a direct way without redirecting to temporary files etc.? Here is the code:
pdftohtml = "pdftohtml.exe";
pdf = "test.pdf";
ans = RunThrough[pdftohtml <> " -stdout " <> pdf, ""];
This fails with the error message
Syntax::sntx: Invalid syntax in or before
"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">".
Is there a way to get to the output without evaluating it?
StringJoin@ReadList["!"<>pdftohtml <> " -stdout " <> pdf, Character]
work? $\endgroup$RunProcess[pdftohtml <> " -stdout " <> pdf, "StandardOutput"]
? $\endgroup$RunProcess
may need the list form (see docs)RunProcess[{pdftohtml,"-stdout",pdf},"StandardOutput"]
$\endgroup$StringJoin...
works perfectly. Please make that an answer, and I will gladly upvote & accept... $\endgroup$