Skip to content

Commit

Permalink
chore(deps): bump org.apache.pdfbox:pdfbox in /cie-java (#87)
Browse files Browse the repository at this point in the history
Bumps org.apache.pdfbox:pdfbox from 2.0.29 to 3.0.1.

---
updated-dependencies:
- dependency-name: org.apache.pdfbox:pdfbox
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored and M0Rf30 committed Dec 16, 2023
1 parent d895088 commit 15a169b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cie-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies {
implementation 'commons-io:commons-io:2.15.1'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'net.java.dev.jna:jna:5.14.0'
implementation 'org.apache.pdfbox:pdfbox:2.0.29'
implementation 'org.apache.pdfbox:pdfbox:3.0.1'
}

mainClassName = 'it.ipzs.cieid.MainApplicationn'
Expand Down
7 changes: 3 additions & 4 deletions cie-java/src/it/ipzs/cieid/Firma/PdfPreview.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.swing.*;
import org.apache.pdfbox.Loader;
import org.apache.pdfbox.io.RandomAccessReadBufferedFile;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.rendering.PDFRenderer;

Expand Down Expand Up @@ -36,10 +37,8 @@ public PdfPreview(JPanel panelPdfPreview, String pdfFilePath, String signImagePa
imgPanel.add(signImage);
imgPanel.add(imgLabel);

File file = new File(filePath);

try {
PDDocument document = PDDocument.load(file);
PDDocument document = Loader.loadPDF(new RandomAccessReadBufferedFile(filePath));
pdfNumPages = document.getNumberOfPages();
System.out.println("Pdf page: " + pdfNumPages);
PDFRenderer renderer = new PDFRenderer(document);
Expand Down

0 comments on commit 15a169b

Please sign in to comment.