Skip to content

Commit

Permalink
Merge pull request #7 from LS31/dev
Browse files Browse the repository at this point in the history
Update to 2.1.0
  • Loading branch information
LS31 authored May 26, 2020
2 parents 1dad8ba + 09f7274 commit e75a85c
Show file tree
Hide file tree
Showing 24 changed files with 960 additions and 837 deletions.
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,33 @@

![QRScan screenshot main screen](qrscan_capture.png)

If you have a large collection of PDF files of scanned documents, QRScan can help you keep track of your documents and set up basic file archiving. QRScan recognizes QR codes in PDF files of scanned documents and then reports these QR codes in a CSV file. QRScan can move and rename the PDF files according to their QR code (with sequential numbering appended as a suffix if PDF files share the same QR code).
If you have a large collection of PDF files of scanned documents, QRScan can help you keep track of your documents and set up basic file archiving. QRScan recognizes QR codes in PDF files of scanned documents and then reports these QR codes in a CSV file. QRScan can move and rename the PDF files according to their QR code.

The QR codes can be stored as a file attribute (for faster future reference). If automatic QR code recognition fails, you can manually add the file attribute to the PDF file.
We used the QRScan tool to send questionnaires labeled with individual QR codes. For the returned questionnaires, we used QRScan to register and to archive the scanned responses.

To be able to incorporate QR codes in the documents you want to print in the first place, QRScan can generate GIF image files with QR codes if you provide a simple text file with the codes you want to be used (with one code at each line).
# Detailed functions
* QRScan can generate GIF image files with QR codes if you provide a simple text file with the codes you want to be used (with one code at each line). You can incorporate these QR codes in any documents (e.g. forms) you want to print (and later scan to PDF and manage with QRScan again). See for example this guide on how to use Microsoft Word's mail merge feature to add the images: [Two ways to batch insert multiple images in a Word document via mail merge](https://www.datanumen.com/blogs/2-ways-batch-insert-multiple-pictures-word-document-via-mail-merge/).
* When renaming, QRScan appends sequential numbers as a suffix if PDF files share the same QR code to prevent clashing file names.
* When scanning, QR codes can be stored as a file attribute for faster future reference.
* If automatic QR code recognition fails, you can manually add the file attribute to the PDF file.

We used the QRScan tool to send questionnaires labeled with individual QR codes. For the returned questionnaires, we used QRScan to register and to archive the scanned responses.
Good QR code recognition has been attained with documents that were scanned at a resolution of 300 DPI.

# Installation
The [provided executable JAR](https://github.com/LS31/qrscan/releases) is ready to use. The current version is made for Java 13. You need to have a recent Java Virtual Machine ([Java Runtime Environment](https://java.com/en/download/)) installed to execute the JAR file. On Windows, simply double-click the JAR file to execute.

# Good QR code recognition
Good QR code recognition has been attained with documents that were scanned at a resolution of 300 DPI.
The [provided executable JAR](https://github.com/LS31/qrscan/releases) is ready to use. The current version runs with Java 14. You need to have a recent Java Virtual Machine ([Java Runtime Environment](https://java.com/en/download/)) installed to execute the JAR file. On Windows, simply double-click the JAR file to execute.

# Acknowledgements
A big thanks to the following projects: [PDFBox by The Apache Software Foundation](https://pdfbox.apache.org/), [Java Advanced Imaging Image I/O Tools API](https://github.com/jai-imageio/jai-imageio-jpeg2000), and the [ZXing project](https://github.com/zxing).
A big thanks to the following projects: [PDFBox by The Apache Software Foundation](https://pdfbox.apache.org/), [Java Advanced Imaging Image I/O Tools API](https://github.com/jai-imageio/jai-imageio-jpeg2000), and the [ZXing project](https://github.com/zxing).

# Release history
* **1.0.0**
* First release.
* **2.0.0**
* Update to JDK/JRE 13; use Java Platform Module System.
* Minor changes in lay-out.
* **2.1.0**
* Remember previous settings when restarting program.
* Added progress dialog windows.
* Updated logging (and simplified for end user).
* Updated to JDK/JRE 14.
* Updated versions of all dependencies.
42 changes: 26 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>nl.ls31</groupId>
<artifactId>qrscan</artifactId>
<version>2.0.0</version>
<version>2.1.0</version>
<name>QRScan</name>
<url>https://github.com/LS31/qrscan</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>13</maven.compiler.release>
<javafx.version>13</javafx.version>
<maven.compiler.release>14</maven.compiler.release>
<javafx.version>14.0.1</javafx.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jbig2-imageio</artifactId>
<!--groupId>com.levigo.jbig2</groupId>
<artifactId>levigo-jbig2-imageio</artifactId-->
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
Expand Down Expand Up @@ -52,26 +45,43 @@
<artifactId>javase</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>jbig2-imageio</artifactId>
<!--groupId>com.levigo.jbig2</groupId>
<artifactId>levigo-jbig2-imageio</artifactId-->
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.18</version>
<version>2.0.19</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>xmpbox</artifactId>
<version>2.0.18</version>
<version>2.0.19</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-tools</artifactId>
<version>2.0.18</version>
<version>2.0.19</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>fontbox</artifactId>
<version>2.0.18</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>tinylog-api</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>tinylog-impl</artifactId>
<version>2.1.2</version>
</dependency>
</dependencies>

<build>
Expand All @@ -87,7 +97,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
Expand All @@ -112,7 +122,7 @@
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.3</version>
<version>0.0.4</version>
<configuration>
<mainClass>nl.ls31.qrscan.Launcher</mainClass> <!-- launcher is a dirty fix -->
<release>${maven.compiler.release}</release>
Expand Down
Binary file modified qrscan_capture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
requires java.desktop;
requires org.apache.pdfbox;
requires com.google.zxing.javase;
requires org.tinylog.api;
requires java.prefs;

opens nl.ls31.qrscan.ui.view to javafx.fxml;
exports nl.ls31.qrscan;
Expand Down
51 changes: 17 additions & 34 deletions src/main/java/nl/ls31/qrscan/App.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package nl.ls31.qrscan;

import javafx.application.Application;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
Expand All @@ -13,6 +11,7 @@
import nl.ls31.qrscan.ui.model.ScanSettings;
import nl.ls31.qrscan.ui.view.RootController;
import nl.ls31.qrscan.ui.view.ScanController;
import org.tinylog.Logger;

import java.io.IOException;

Expand All @@ -22,25 +21,11 @@
* @author Lars Steggink
*/
public class App extends Application {
final static private String LSEP = System.lineSeparator();

/**
* Starts the application.
*
* @param args unused
*/
public static void main(String[] args) {
launch(args);
}

private Stage primaryStage;
private BorderPane rootLayout;
private ScanSettings scanSettings;
@FXML
private TextArea logArea;
private CreateSettings createSettings;

private ManualTagSettings manualTagSettings;
private final ScanSettings scanSettings;
private final CreateSettings createSettings;
private final ManualTagSettings manualTagSettings;

/**
* Main application.
Expand All @@ -51,6 +36,15 @@ public App() {
this.manualTagSettings = new ManualTagSettings();
}

/**
* Starts the application.
*
* @param args unused
*/
public static void main(String[] args) {
launch(args);
}

/**
* Gets the current create settings.
*
Expand Down Expand Up @@ -87,16 +81,6 @@ public ScanSettings getScanSettings() {
return scanSettings;
}

/**
* Adds a message to the application log. For now, these messages are shown on a new line in the lower 'logging
* panel' of the application.
*
* @param message Log message
*/
public void log(String message) {
logArea.appendText(message + LSEP);
}

/**
* Starts the main application.
*/
Expand All @@ -111,23 +95,22 @@ public void start(Stage primaryStage) {
try {
rootLayout = loader.load();
} catch (IOException e) {
e.printStackTrace();
Logger.error(e, "Root layout not found.");
}
Scene scene = new Scene(rootLayout);
primaryStage.setScene(scene);
primaryStage.show();

logArea = (TextArea) rootLayout.getBottom();
RootController rootController = loader.getController();
rootController.setMainApp(this);
try {
AnchorPane scanView = scanViewLoader.load();
rootLayout.setCenter(scanView);

} catch (IOException e) {
e.printStackTrace();
Logger.error(e, "Scan layout not found.");
}
ScanController scanController = scanViewLoader.getController();
scanController.setMainApp(this);
scanController.updateControlsByModel();
}
}
}
Loading

0 comments on commit e75a85c

Please sign in to comment.