Skip to content

Commit

Permalink
use RandomAccessReadBufferedFile
Browse files Browse the repository at this point in the history
  • Loading branch information
UrsZeidler committed Nov 12, 2023
1 parent 9131549 commit d4e8d7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions de.urszeidler.fop.help/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Export-Package: org.apache.batik.transcoder,
org.apache.fop.svg,
org.apache.pdfbox,
org.apache.pdfbox.cos,
org.apache.pdfbox.io,
org.apache.pdfbox.multipdf,
org.apache.pdfbox.pdmodel,
org.apache.pdfbox.pdmodel.common,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.HashSet;
import java.util.Map;

import org.apache.pdfbox.io.RandomAccessReadBufferedFile;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.text.PDFTextStripper;
import org.eclipse.core.databinding.DataBindingContext;
Expand Down Expand Up @@ -477,7 +478,7 @@ private PDDocument getpdfDoc(final File file, IProgressMonitor monitor) throws I

monitor.setTaskName("load ..." + file.getName());
try {
pdDocument = org.apache.pdfbox.Loader.loadPDF(file);
pdDocument = org.apache.pdfbox.Loader.loadPDF(new RandomAccessReadBufferedFile(file));
if (pdDocument.isEncrypted()) {
monitor.setTaskName("decrypt ...");
// pdDocument.decrypt("");
Expand Down

0 comments on commit d4e8d7a

Please sign in to comment.