Split on QR Browser

This commit is contained in:
Felix Kaspar 2023-10-28 19:48:16 +02:00
parent 877386cdd3
commit a006937e6e
5 changed files with 10121 additions and 10 deletions

10100
public/dep/jsQR.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -110,7 +110,6 @@ export const splitOnly = {
]
}
// Split a document up into multiple documents
export const rotateOnly = {
outputOptions: {
zip: false
@ -124,7 +123,6 @@ export const rotateOnly = {
]
}
// Split a document up into multiple documents
export const imposeOnly = {
outputOptions: {
zip: false
@ -138,7 +136,6 @@ export const imposeOnly = {
]
}
// Split a document up into multiple documents
export const removeBlankPagesOnly = {
outputOptions: {
zip: false
@ -150,4 +147,19 @@ export const removeBlankPagesOnly = {
operations: []
}
]
}
}
export const splitOnQR = {
outputOptions: {
zip: false
},
operations: [
{
type: "splitOn",
values: {
type: "QR_CODE"
},
operations: []
}
]
}

View File

@ -1,7 +1,6 @@
// PDFLib gets importet via index.html script-tag
// PDFLib gets imported via index.html script-tag
// PDFJS as pdfjsLib via index.html script-tag
// TODO: import jsQR
// jsQR via index.html script-tag
import * as pdfcpuWraopper from "./wasm/pdfcpu-wrapper-browser.js";
const OpenCV = { cv: cv } // OPENCV gets importet as cv via index.html script-tag

View File

@ -5,11 +5,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!--TODO: Remove External Dependencies-->
<script src="/dep/pdf-lib.min.js"></script>
<script src="/dep/downloadjs_1.4.7.js"></script>
<script src="/dep/pdf.min.js"></script>
<script src="/dep/jsQR.js"></script>
<script src="/wasm/browserfs.min.js"></script>
<script src="/wasm/opencv/opencv_3_4_custom_O3.js"></script>

View File

@ -40,4 +40,4 @@ import * as Functions from "./functions.js";
download(result.buffer, result.fileName, "application/pdf");
});
});
})(exampleWorkflows.removeBlankPagesOnly);
})(exampleWorkflows.splitOnQR);