Document Generation via Template: embed image data into JSON

Hi, I’m evaluating PDFTron for dynamic document generation: our generated documents must include signature images which are embedded into json stream as arrays of bytes (integers). Is there any way to let the image placeholder take image data directly from json data instead of passing it an url?

Thank you for contacting us about this. It is possible to apply images (such as signatures) from a buffer array as stamp annotations to the documents. After decoding image stream to an array of bytes, you can create an Image object which you can use to create a stamp annotation.

Please see the sample code here on how to create stamp annotations.