[
https://issues.apache.org/jira/browse/PDFBOX-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David KELLER updated PDFBOX-2124:
---------------------------------
Description:
Dear Pdfbox,
I have just finished a work to integrate pdfbox and zxing to extract barcodes,
and I wanted to give this source code to your fundation.
Program do this :
- extract all scanned images in a PDF,
- apply some homebrew image filters to retrieve areas of interest,
- rotate cropped areas and send them to zxing to find any barcode
- aggregate all results in specific List
Hope it can be useful for Pdfbox or Lucence.
Example :
{noformat}
public static void main(String[] args) throws Exception {
long startTime = System.currentTimeMillis();
System.out.println("PdfBoxBarcodeScannerTest starts...");
String filename = "D:\\test\\mail_with_barcode.pdf";
PdDocumentBarcodeScanner scanner = new
PdDocumentBarcodeScanner(new File(filename));
scanner.scan();
long endTime = System.currentTimeMillis();
System.out.println("pdf scanned in " + (endTime - startTime) +
" ms");
scanner.displayResults();
}
{noformat}
Gives :
PdfBoxBarcodeScannerTest starts...
pdf scanned in 3803 ms
page=0, barcodeFormat=DATA_MATRIX, value=HP14601225523
Best regards
David KELLER
was:
Dear Pdfbox,
I have just finished a work to integrate pdfbox and zxing to extract barcodes,
and I wanted to give this source code to your fundation.
Program do this :
- extract all scanned images in a PDF,
- apply some home made image filters to retrieve areas of interest,
- rotate cropped areas and send them to zxing to find any barcode
- aggregate all results in specific List
Hope it can be useful for Pdfbox or Lucence.
Example :
{noformat}
public static void main(String[] args) throws Exception {
long startTime = System.currentTimeMillis();
System.out.println("PdfBoxBarcodeScannerTest starts...");
String filename = "D:\\test\\mail_with_barcode.pdf";
PdDocumentBarcodeScanner scanner = new
PdDocumentBarcodeScanner(new File(filename));
scanner.scan();
long endTime = System.currentTimeMillis();
System.out.println("pdf scanned in " + (endTime - startTime) +
" ms");
scanner.displayResults();
}
{noformat}
Gives :
PdfBoxBarcodeScannerTest starts...
pdf scanned in 3803 ms
page=0, barcodeFormat=DATA_MATRIX, value=HP14601225523
Best regards
David KELLER
> barcore scanner using pdfbox and zxing
> --------------------------------------
>
> Key: PDFBOX-2124
> URL: https://issues.apache.org/jira/browse/PDFBOX-2124
> Project: PDFBox
> Issue Type: New Feature
> Components: Utilities
> Affects Versions: 2.0.0
> Environment: W8
> Reporter: David KELLER
> Priority: Minor
> Attachments: PdDocumentBarcodeScanner.java,
> PdPageBarcodeScanner.java, mail_with_barcode.pdf
>
>
> Dear Pdfbox,
> I have just finished a work to integrate pdfbox and zxing to extract
> barcodes, and I wanted to give this source code to your fundation.
> Program do this :
> - extract all scanned images in a PDF,
> - apply some homebrew image filters to retrieve areas of interest,
> - rotate cropped areas and send them to zxing to find any barcode
> - aggregate all results in specific List
> Hope it can be useful for Pdfbox or Lucence.
> Example :
> {noformat}
> public static void main(String[] args) throws Exception {
> long startTime = System.currentTimeMillis();
> System.out.println("PdfBoxBarcodeScannerTest starts...");
> String filename = "D:\\test\\mail_with_barcode.pdf";
>
>
> PdDocumentBarcodeScanner scanner = new
> PdDocumentBarcodeScanner(new File(filename));
> scanner.scan();
> long endTime = System.currentTimeMillis();
> System.out.println("pdf scanned in " + (endTime - startTime) +
> " ms");
>
> scanner.displayResults();
> }
> {noformat}
> Gives :
> PdfBoxBarcodeScannerTest starts...
> pdf scanned in 3803 ms
> page=0, barcodeFormat=DATA_MATRIX, value=HP14601225523
> Best regards
> David KELLER
--
This message was sent by Atlassian JIRA
(v6.2#6252)