first version of sample parser.
This commit is contained in:
BIN
resources/public/chefswarehouse.PDF
Normal file
BIN
resources/public/chefswarehouse.PDF
Normal file
Binary file not shown.
BIN
resources/public/cintas.pdf
Normal file
BIN
resources/public/cintas.pdf
Normal file
Binary file not shown.
BIN
resources/public/golden-gate-meats.pdf
Normal file
BIN
resources/public/golden-gate-meats.pdf
Normal file
Binary file not shown.
37
resources/public/index.html
Normal file
37
resources/public/index.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dropzone@5.2.0/dist/dropzone.min.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.1/css/bulma.css" />
|
||||
<style>.dz-error-mark { display:none} .dz-details {display:none}
|
||||
form { border: 3px solid lightgray; padding: 25px; width: 100%;}
|
||||
.dz-success-mark {display:none} </style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" class="container">
|
||||
<h1>Invoice Parsing Demo</h1>
|
||||
<form action="/pdf-upload" id="my-dropzone">
|
||||
<h3>Drop invoice pdfs here</h3>
|
||||
<input type="file" name="file" style="display:none"/>
|
||||
</form>
|
||||
<h2 style="display:none">Found invoices:</h2>
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var myDropzone = new Dropzone("#my-dropzone");
|
||||
myDropzone.on("success", function(file, a) {
|
||||
$("h2").show();
|
||||
JSON.parse(a).map(function(x) {
|
||||
|
||||
$("ul").append($("<li>").text(x));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user