Skip to content

Commit ee788d1

Browse files
build
- pdfbox is no longer a transitive dependency to avoid down stream dependency hell issues - pdfbox version updated
1 parent 7af37ec commit ee788d1

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

applications/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies {
1313

1414
api "args4j:args4j:$args4j_version"
1515
implementation("commons-io:commons-io:$commons_io_version")
16+
implementation("org.apache.pdfbox:pdfbox:$pdfbox_version")
1617
}
1718

1819
// Create a jar which contains all the applications

applications/src/main/java/boofcv/app/CameraCalibrationMono.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Peter Abeles. All Rights Reserved.
2+
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
33
*
44
* This file is part of BoofCV (http://boofcv.org).
55
*
@@ -42,11 +42,11 @@
4242
import boofcv.struct.image.GrayF32;
4343
import com.github.sarxos.webcam.Webcam;
4444
import org.apache.commons.io.FilenameUtils;
45-
import org.apache.pdfbox.util.Charsets;
4645

4746
import javax.swing.*;
4847
import java.awt.image.BufferedImage;
4948
import java.io.*;
49+
import java.nio.charset.StandardCharsets;
5050
import java.util.ArrayList;
5151
import java.util.List;
5252
import java.util.Locale;
@@ -571,7 +571,7 @@ public void handleDirectory() {
571571

572572
// Save calibration statistics to disk
573573
if (outputDirectory != null) {
574-
try (var out = new PrintWriter(new File(outputDirectory, "calibration_metrics.txt"), Charsets.UTF_8)) {
574+
try (var out = new PrintWriter(new File(outputDirectory, "calibration_metrics.txt"), StandardCharsets.UTF_8)) {
575575
out.println(metricText);
576576
} catch (IOException e) {
577577
throw new UncheckedIOException(e);

applications/src/main/java/boofcv/app/CameraCalibrationStereo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Peter Abeles. All Rights Reserved.
2+
* Copyright (c) 2025, Peter Abeles. All Rights Reserved.
33
*
44
* This file is part of BoofCV (http://boofcv.org).
55
*
@@ -39,7 +39,6 @@
3939
import boofcv.struct.calib.StereoParameters;
4040
import boofcv.struct.image.GrayF32;
4141
import boofcv.struct.image.ImageDimension;
42-
import org.apache.pdfbox.util.Charsets;
4342
import org.kohsuke.args4j.CmdLineException;
4443
import org.kohsuke.args4j.CmdLineParser;
4544
import org.kohsuke.args4j.Option;
@@ -50,6 +49,7 @@
5049
import java.io.IOException;
5150
import java.io.PrintWriter;
5251
import java.io.UncheckedIOException;
52+
import java.nio.charset.StandardCharsets;
5353
import java.util.ArrayList;
5454
import java.util.List;
5555
import java.util.Objects;
@@ -324,7 +324,7 @@ void process() {
324324
System.out.println(metricText);
325325

326326
if (saveMetrics) {
327-
try (var out = new PrintWriter(new File(outputDir, "calibration_metrics.txt"), Charsets.UTF_8)) {
327+
try (var out = new PrintWriter(new File(outputDir, "calibration_metrics.txt"), StandardCharsets.UTF_8)) {
328328
out.println(metricText);
329329
} catch (IOException e) {
330330
throw new UncheckedIOException(e);

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ project.ext.jetnull_version = '23.0.0'
3737
project.ext.jsr250_version = '1.0'
3838
project.ext.jsr305_version = '3.0.2'
3939
project.ext.trove4j_version = '3.0.3'
40+
project.ext.pdfbox_version = '2.0.34'
4041

4142
if (!project.hasProperty('ossrhUsername')) {
4243
ext.ossrhUsername = "dummy"

integration/boofcv-pdf/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ dependencies {
22
api project(':main:boofcv-io')
33
api project(':main:boofcv-recognition')
44

5-
api group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.24'
5+
implementation("org.apache.pdfbox:pdfbox:$pdfbox_version")
66
}

0 commit comments

Comments
 (0)