veUiConfig
        });
        perspectiveViewer.on("done", async () => {
          const quad = perspectiveViewer.getQuadSelection();
          const points = [];
          quad.forEach(p => {
            points.push({x:p[0],y:p[1]})
          });
          getCroppedImage(points);
          document.getElementById("perspectiveViewer").style.display = "none";
          perspectiveViewer.currentDocument.deleteAllPages();
        });
        captureViewer.openDocument(doc.uid);
        perspectiveViewer.open