function throttledMakePDF(num) {
    let img = document.querySelector(`.square:nth-child(${num + 1})`);
    processImage(img, num);

    if (num < 8 ) {
      requestAnimationFrame(() => throttledMakePDF(num + 1));
    } else {
      closePDF();
    }
  }
/**
    * @desc Throttles makePDF to avoid locking main thread too long
    * @param num int - number of image to be processed (0-8)
  */
@desc Throttles makePDF to avoid locking main thread too long
@param num int - number of image to be processed (0-8)
@desc Throttles makePDF to avoid locking main thread too long @param num int - number of image to be processed ( 0 - 8 )
function throttledMakePDF(num) {
    let img = document.querySelector(`.square:nth-child(${num + 1})`);
    processImage(img, num);
    if (num < 8 ) {
      requestAnimationFrame(() => throttledMakePDF(num + 1));
    } else {
      closePDF();
    }
  }
function throttledMakePDF ( num ) { let img = document . querySelector ( ` ${ num + 1 } ` ) ; processImage ( img , num ) ; if ( num < 8 ) { requestAnimationFrame ( ( ) => throttledMakePDF ( num + 1 ) ) ; } else { closePDF ( ) ; } }
@desc Throttles makePDF to avoid locking main thread too long
 @param num int - number of image to be processed (0-8)
@desc Throttles makePDF to avoid locking main thread too long @param num int - number of image to be processed ( 0 - 8 )