@@ -149,8 +149,8 @@ To review the detected boundaries on the loaded image(s), we will create a persp
149149 className: " ddv-load-image2 addNewButton" ,
150150 events: {
151151 click: " addNew"
152- }
153- }
152+ },
153+ },
154154 Dynamsoft .DDV .Elements .DeleteCurrent ,
155155 Dynamsoft .DDV .Elements .DeleteAll ,
156156 ],
@@ -333,8 +333,8 @@ Since the workflow in this sample is very simple, only the two events mentioned
333333 type: Dynamsoft.DDV.Elements.PerspectiveAll,
334334 events: {
335335 click: "downloadPDF"
336- }
337- }
336+ },
337+ },
338338 ],
339339 },
340340 Dynamsoft.DDV.Elements.MainView,
@@ -351,8 +351,8 @@ Since the workflow in this sample is very simple, only the two events mentioned
351351 className: "ddv-load-image2 addNewButton",
352352 events: {
353353 click: "addNew"
354- }
355- }
354+ },
355+ },
356356 Dynamsoft.DDV.Elements.DeleteCurrent,
357357 Dynamsoft.DDV.Elements.DeleteAll,
358358 ],
@@ -369,6 +369,13 @@ Since the workflow in this sample is very simple, only the two events mentioned
369369 }
370370 });
371371
372+ // Create a document and open it in the perspectiveViewer
373+ const doc = Dynamsoft.DDV.documentManager.createDocument();
374+ perspectiveViewer.openDocument(doc.uid);
375+
376+ // Create an image input with document boundaries detection
377+ const loadImageInput = createFileInput(perspectiveViewer, router);
378+
372379 // Register an event in ` perspectiveViewer` to add existing image(s)
373380 perspectiveViewer.on("addNew",() => {
374381 delete loadImageInput.files;
0 commit comments