title: how to save png format to pdf format using pdfkit in nodejs [code included]
body: <p>I am doing a server side coding and wanted to convert the file extension to pdf extension and it should be saved in S3. Any suggestions will be valuable. I am a beginner in this area, so apologies if the question offends anyone.</p>
  
  <p>uploadFiles: (files, bucketName, path) =>{</p>
  
  <pre><code> return new Promise(async function(resolve, reject) {
     var doc = new PDFDocument()
     var file = files[0];
        let filename = file.originalFilename;
        var file_path =  file.path;
  
        doc.image(file_path, {
         fit: [250, 300],
         align: 'center',
         valign: 'center'
     });
     //doc.y = 300
   //doc.pipe(res)
    //  console.log('img',img);
  
     var path = 'images/'+ file.originalFilename;
  
   console.log( 'path',path);
     var path = await uploadFiles(file, bucketName, path);
       resolve(path);
       //doc.end()
   });
   }
   };
  </code></pre>