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? – yohbs Apr 20 '17 at 14:10RunProcess[pdftohtml <> " -stdout " <> pdf, "StandardOutput"]? – yohbs Apr 20 '17 at 14:16RunProcessmay need the list form (see docs)RunProcess[{pdftohtml,"-stdout",pdf},"StandardOutput"]– george2079 Apr 20 '17 at 20:08StringJoin...works perfectly. Please make that an answer, and I will gladly upvote & accept... – Karsten W. Apr 21 '17 at 12:49