code: public static void setSizeOfScanningRectangleInPx(Intent intent, int width, int height) {
      intent.putExtra(Intents.Scan.WIDTH, width);
      intent.putExtra(Intents.Scan.HEIGHT, height);
    }
docs: Set optional parameters to specify the width and height of the scanning rectangle in pixels
  to {@code Intent}.
  @param intent Target intent.
  @param width Width of scanning rectangle in pixels.
  @param height Height of scanning rectangle in pixels.