Fixed a issue while trying to read a temp generated PDF file and returning it.

Signed-off-by: Sebastián J. Seba <ssebastianj@gmail.com>