hajareshyam / pdf-creator-node

This package is used to generate HTML to PDF in Nodejs
MIT License
238 stars 80 forks source link

pdf is created but how to save into aws not in local #98

Open ritikjs opened 1 year ago

ritikjs commented 1 year ago

i am not able to save pdf o s3 bucket

SamipanB commented 1 year ago
      const generated = await pdf.create(document, options);
      const fileName = "output.pdf";

      const params = {
        Bucket: process.env.BUCKET_NAME,
        Key: fileName,
        Body: generated,
      };

      const data = await s3.upload(params).promise();

This should do the work

martinGM05 commented 6 months ago

Can you show what you have in the document? @SamipanB