Skip to content

Commit 1e7ec4e

Browse files
authored
Merge pull request #80 from dynamsoft-docs/preview
Preview
2 parents 4b073db + f50ac49 commit 1e7ec4e

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

codegallery/usecase/detect-boundaries-on-existing-images.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)