pdfkit breaks the file if process.exit is call after doc.end() This is something I can’t understand and I would like to ask you all, giving this code: