meteor-pdfkit icon indicating copy to clipboard operation
meteor-pdfkit copied to clipboard

Question: get a return of writeSync()

Open Twisterking opened this issue 10 years ago • 1 comments

Hi there! Thanks for the nice package - works like a charm! :-) Since you provide a sync function which write the file (writeSync) I wonder - why is there no return value of this function? How can I know if creating and writing the pdf file was successful so I can move on in my code (in my case: send the pdf via e-mail)?

var write = doc.writeSync(process.env.PWD + '/public/pdf/' + orderid + '_order.pdf');
console.log('writefile return: ' + write);

Writing the file works just fine but write is always undefined.

Twisterking avatar Nov 30 '15 11:11 Twisterking

I think we have to change the package code to fix this. As I'm realy busy right now I will see if someone make a PR. If not I will.

Thanks for reporting @Twisterking :).

pascoual avatar Dec 10 '15 23:12 pascoual