Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
import java.io.InputStreamReader;
import java.util.List;

import at.gv.egiz.pdfas.lib.impl.pdfbox2.placeholder.SignatureFieldsAndPlaceHolderExtractor;

import org.apache.pdfbox.Loader;
import org.apache.pdfbox.pdmodel.PDDocument;

//Imports
Expand All @@ -43,6 +42,7 @@
import at.asit.pdfover.gui.workflow.Status;
import at.asit.pdfover.gui.workflow.config.ConfigurationManager;
import at.asit.pdfover.signer.SignaturePosition;
import at.gv.egiz.pdfas.lib.impl.pdfbox3.PDFBoxPlaceholderExtractor;
import at.gv.egiz.pdfas.lib.impl.placeholder.SignaturePlaceholderData;
import lombok.extern.slf4j.Slf4j;

Expand Down Expand Up @@ -127,15 +127,15 @@ public void run() {
// scan for signature placeholders
// - see if we want to scan for placeholders in the settings
if (config.getEnablePlaceholderUsage()) {
try (PDDocument pddocument = PDDocument.load(getStateMachine().status.document)) {
try (PDDocument pddocument = Loader.loadPDF(getStateMachine().status.document)) {
// - scan for placeholders
boolean useSignatureFields = config.getUseSignatureFields();
boolean useMarker = config.getUseMarker();
log.debug("Placeholder usage enabled. Signature fields: {}, QR Markers: {}", useSignatureFields, useMarker);
//first check the signature fields placeholder
if (useSignatureFields) {

List<String> fields = SignatureFieldsAndPlaceHolderExtractor.findEmptySignatureFields(pddocument);
List<String> fields = PDFBoxPlaceholderExtractor.findEmptySignatureFields(pddocument);

if (fields.size() > 0) {
while (true)
Expand Down Expand Up @@ -183,7 +183,7 @@ public void run() {
// second check if qr code placeholder search is enabled
} else if (useMarker) {

SignaturePlaceholderData signaturePlaceholderData = SignatureFieldsAndPlaceHolderExtractor.getNextUnusedSignaturePlaceHolder(pddocument);
SignaturePlaceholderData signaturePlaceholderData = PDFBoxPlaceholderExtractor.getNextUnusedSignaturePlaceholder(pddocument);

if (null != signaturePlaceholderData) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.io.File;
import java.io.IOException;

import org.apache.pdfbox.Loader;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException;
import org.eclipse.swt.SWT;
Expand Down Expand Up @@ -75,7 +76,7 @@ private void openPDFDocument() throws IOException {
PDDocument pdf = null;
try
{
pdf = PDDocument.load(documentPath);
pdf = Loader.loadPDF(documentPath);
if (pdf.getNumberOfPages() > 0)
pdf.getPage(0);
else
Expand Down
12 changes: 6 additions & 6 deletions pdf-over-signer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<relativePath>..</relativePath>
</parent>
<artifactId>pdf-over-signer</artifactId>
<name>PDF-Over PDF-AS 4 Signer</name>
<name>PDF-Over PDF-AS Signer</name>
<properties>
<pdfover-build.root-dir>${project.basedir}/..</pdfover-build.root-dir>
<pdfover-build.pdfas-version>4.4.2</pdfover-build.pdfas-version>
<pdfover-build.pdfas-version>5.0.1-SNAPSHOT</pdfover-build.pdfas-version>
</properties>
<dependencies>
<dependency>
Expand All @@ -25,7 +25,7 @@
</dependency>
<dependency>
<groupId>at.gv.egiz.pdfas</groupId>
<artifactId>pdf-as-pdfbox-2</artifactId>
<artifactId>pdf-as-pdfbox-3</artifactId>
<version>${pdfover-build.pdfas-version}</version>
</dependency>
<dependency>
Expand All @@ -36,17 +36,17 @@
<dependency>
<groupId>iaik</groupId>
<artifactId>iaik_eccelerate</artifactId>
<version>3.01</version>
<version>6.02</version>
</dependency>
<dependency>
<groupId>iaik</groupId>
<artifactId>iaik_cms</artifactId>
<version>2.15</version>
<version>5.1.1</version>
</dependency>
<dependency>
<groupId>iaik</groupId>
<artifactId>iaik_eccelerate_cms</artifactId>
<version>3.01</version>
<version>6.02</version>
</dependency>
<dependency>
<groupId>at.a-sit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
package at.asit.pdfover.signer.pdfas;

// Imports
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.bind.JAXBException;

import at.asit.pdfover.signer.BkuSlConnector;
import at.asit.pdfover.signer.SignatureException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import java.io.ByteArrayOutputStream;
import java.util.UUID;

import javax.activation.DataSource;

import at.asit.pdfover.commons.Constants;
import at.asit.pdfover.commons.Profile;
import at.asit.pdfover.signer.ByteArrayDocumentSource;
Expand Down Expand Up @@ -87,7 +85,7 @@ public static PdfAs4SigningState prepare(PdfAs4SignatureParameter parameter) thr

PdfAs4SigningState state = new PdfAs4SigningState();
ByteArrayOutputStream output = new ByteArrayOutputStream();
DataSource input = new ByteArrayDataSource(parameter.inputDocument.getByteArray());
ByteArrayDataSource input = new ByteArrayDataSource(parameter.inputDocument.getByteArray());
SignParameter param = PdfAsFactory.createSignParameter(config, input, output);
if (sigPos != null) {
param.setSignaturePosition(sigPos);
Expand Down
7 changes: 1 addition & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<java.version>21</java.version>
<maven.compiler.release>21</maven.compiler.release>
<pdfover-build.root-dir>${project.basedir}</pdfover-build.root-dir>
<pdfbox.version>2.0.34</pdfbox.version>
<pdfbox.version>3.0.6</pdfbox.version>
<swt.version>3.134.0</swt.version>
</properties>

Expand Down Expand Up @@ -232,11 +232,6 @@
<artifactId>metadata-extractor</artifactId>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
Expand Down
13 changes: 13 additions & 0 deletions release-instructions/publish.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#!/bin/bash

orig="$PWD"
if [[ "$orig" != /tmp/* ]]; then
tmp=$(mktemp -d)

mvn clean
cp -a . "$tmp/repo"

cd "$tmp/repo"
./release-instructions/publish.sh "$@"

cp -a pdf-over-build "$orig/"
fi

#### CONFIGURE: ######
LOG_DIR="/tmp/pdfover_log"

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>iaik</groupId>
<artifactId>iaik_cms</artifactId>
<version>2.15</version>
<version>5.1.1</version>
<description>POM was created from install:install-file</description>
</project>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>iaik</groupId>
<artifactId>iaik_eccelerate</artifactId>
<version>3.01</version>
<version>6.02</version>
<description>POM was created from install:install-file</description>
</project>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>iaik</groupId>
<artifactId>iaik_eccelerate_cms</artifactId>
<version>3.01</version>
<version>6.02</version>
<description>POM was created from install:install-file</description>
</project>
Loading