function generateAliasFromImageData(imageData) {
    if (typeof imageData === 'string') {
      return jsPDFAPI.sHashCode(imageData);
    }

    if (jsPDFAPI.isArrayBufferView(imageData)) {
      return jsPDFAPI.sHashCode(jsPDFAPI.arrayBufferToBinaryString(imageData));
    }

    return null;
  }
function generateAliasFromImageData(imageData) {
    if (typeof imageData === 'string') {
      return jsPDFAPI.sHashCode(imageData);
    }

    if (jsPDFAPI.isArrayBufferView(imageData)) {
      return jsPDFAPI.sHashCode(jsPDFAPI.arrayBufferToBinaryString(imageData));
    }

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