fix(txt2pdf): Correctly handle errors from subprocesses in txt2pdf (closes #4676)(fixes #4656)