Skip to content

Question: get a return of writeSync() #20

@Twisterking

Description

@Twisterking

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions