Convert binary array to base64



  • Hello, I want know what library is using Jsreport for load images from disc. Buffer?? Thanks


  • administrators

    hi, (i'm going to assume that the question is about images used by assets)

    the exact mechanism depends on the type of @encoding that you specify when calling an asset. for @encoding=dataURI or @encoding=base64 it is just buffer serialization (buffer.toString('base64')) the only difference is that @encoding=dataURI adds a bit more data to make possible inline an image in the src attribute of an img tag.

    you can check how all of this is done in the assets repository



  • Thanks!!!!!


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.