implemented barcode decoder
This commit is contained in:
@@ -7,7 +7,7 @@ import { useFormState } from "react-dom";
|
||||
import { updateOrAddBill } from "../lib/actions/billActions";
|
||||
import Link from "next/link";
|
||||
import { formatYearMonth } from "../lib/format";
|
||||
import { pdf2canvas } from "../lib/pdf/pdf2png";
|
||||
import { findDecodePdf417 } from "../lib/pdf/barcodeDecoder";
|
||||
|
||||
// Next.js does not encode an utf-8 file name correctly when sending a form with a file attachment
|
||||
// This is a workaround for that
|
||||
@@ -40,7 +40,7 @@ export const BillEditForm:FC<BillEditFormProps> = ({ location, bill }) => {
|
||||
}
|
||||
|
||||
const billAttachment_handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||
pdf2canvas(event);
|
||||
findDecodePdf417(event).then(result => console.log(result));
|
||||
}
|
||||
|
||||
return(
|
||||
|
||||
Reference in New Issue
Block a user