Re-enable PDF production and correctly handle puma IO streams

[finishes #67272196]

Signed-off-by: Dan Wendorf <github@danwendorf.com>