code: function generateAliasFromImageData(imageData) {
      if (typeof imageData === 'string') {
        return jsPDFAPI.sHashCode(imageData);
      }
  
      if (jsPDFAPI.isArrayBufferView(imageData)) {
        return jsPDFAPI.sHashCode(jsPDFAPI.arrayBufferToBinaryString(imageData));
      }
  
      return null;
    }
docs: Image functionality ported from pdf.js