Thursday, 8 June 2017

node base64 encode pdf with signatures

I'm having problem to encode PDF with signatures to base64. I have this code, which is working, but there is no signatures present:

// function to encode file data to base64 encoded string
function base64_encode(file) {
  // read binary data
  var bitmap = fs.readFileSync(file);
  // convert binary data to base64 encoded string
  return new Buffer(bitmap).toString("base64");
}

I get base64 encoded data, but it does not have signatures in it?



via Peter

No comments:

Post a Comment