in reply to Capturing program output

You don't. You send svg2pdf exactly what it expects, and input filename and an output filename; you can't circumvent this