We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eae14a2 commit c4c8335Copy full SHA for c4c8335
ocr.html
@@ -310,6 +310,14 @@ <h2>Pages</h2>
310
return altTextarea;
311
}
312
313
+document.addEventListener('paste', (event) => {
314
+ const items = (event.clipboardData || event.originalEvent.clipboardData).items;
315
+ const images = Array.from(items).filter(item => item.type.indexOf('image') !== -1);
316
+ if (images.length) {
317
+ processFile(images[0].getAsFile());
318
+ }
319
+});
320
+
321
async function convertPDFToImages(file) {
322
// returns { numPages, imageIterator }
323
const pdf = await pdfjsLib.getDocument(URL.createObjectURL(file)).promise;
0 commit comments