diff -Nru libpdfbox2-java-2.0.9/app/pom.xml libpdfbox2-java-2.0.13/app/pom.xml
--- libpdfbox2-java-2.0.9/app/pom.xml 2018-03-20 16:19:48.000000000 +0000
+++ libpdfbox2-java-2.0.13/app/pom.xml 2018-11-28 17:18:34.000000000 +0000
@@ -23,7 +23,7 @@
org.apache.pdfbox
pdfbox-parent
- 2.0.9
+ 2.0.13
../parent/pom.xml
@@ -68,7 +68,7 @@
true
*;scope=provided;inline=org/apache/**|org/bouncycastle/**|META-INF/services/**
${project.url}
- !junit.framework,!junit.textui,javax.*;resolution:=optional,org.apache.avalon.framework.logger;resolution:=optional,org.apache.log;resolution:=optional,org.apache.log4j;resolution:=optional,*
+ !junit.framework,!junit.textui,javax.*;resolution:=optional,org.apache.avalon.framework.logger;resolution:=optional,org.apache.log;resolution:=optional,*
org.apache.pdfbox.tools.PDFBox
diff -Nru libpdfbox2-java-2.0.9/debian/changelog libpdfbox2-java-2.0.13/debian/changelog
--- libpdfbox2-java-2.0.9/debian/changelog 2018-04-15 17:31:40.000000000 +0000
+++ libpdfbox2-java-2.0.13/debian/changelog 2019-02-27 12:49:08.000000000 +0000
@@ -1,3 +1,45 @@
+libpdfbox2-java (2.0.13-2~18.04) bionic; urgency=medium
+
+ * Backport for OpenJDK 11 (dependency of pdfsam). LP: #1814133.
+
+ -- Matthias Klose Wed, 27 Feb 2019 13:49:08 +0100
+
+libpdfbox2-java (2.0.13-2) unstable; urgency=medium
+
+ * Team upload.
+ * Build the tools module
+ * Standards-Version updated to 4.3.0
+ * Use salsa.debian.org Vcs-* URLs
+
+ -- Emmanuel Bourg Thu, 17 Jan 2019 22:32:22 +0100
+
+libpdfbox2-java (2.0.13-1) unstable; urgency=medium
+
+ * New upstream version 2.0.13.
+
+ -- Markus Koschany Sat, 08 Dec 2018 15:50:15 +0100
+
+libpdfbox2-java (2.0.12-1) unstable; urgency=medium
+
+ * New upstream version 2.0.12.
+ - Fix CVE-2018-11797: denial-of-service via specially crafted PDF file.
+ (Closes: #910391)
+ * Declare compliance with Debian Policy 4.2.1.
+
+ -- Markus Koschany Sat, 06 Oct 2018 12:05:00 +0200
+
+libpdfbox2-java (2.0.11-1) unstable; urgency=medium
+
+ * New upstream version 2.0.11.
+
+ -- Markus Koschany Sat, 30 Jun 2018 01:50:14 +0200
+
+libpdfbox2-java (2.0.10-1) unstable; urgency=medium
+
+ * New upstream version 2.0.10.
+
+ -- Markus Koschany Thu, 28 Jun 2018 23:55:29 +0200
+
libpdfbox2-java (2.0.9-1) unstable; urgency=medium
* New upstream version 2.0.9.
diff -Nru libpdfbox2-java-2.0.9/debian/control libpdfbox2-java-2.0.13/debian/control
--- libpdfbox2-java-2.0.9/debian/control 2018-04-15 17:31:40.000000000 +0000
+++ libpdfbox2-java-2.0.13/debian/control 2019-01-17 21:31:30.000000000 +0000
@@ -18,9 +18,9 @@
libmaven-javadoc-plugin-java,
libpdfbox2-java,
maven-debian-helper
-Standards-Version: 4.1.4
-Vcs-Git: https://anonscm.debian.org/git/pkg-java/libpdfbox2-java.git
-Vcs-Browser: https://anonscm.debian.org/git/pkg-java/libpdfbox2-java.git
+Standards-Version: 4.3.0
+Vcs-Git: https://salsa.debian.org/java-team/libpdfbox2-java.git
+Vcs-Browser: https://salsa.debian.org/java-team/libpdfbox2-java
Homepage: http://pdfbox.apache.org
Package: libpdfbox2-java
diff -Nru libpdfbox2-java-2.0.9/debian/libpdfbox2-java.poms libpdfbox2-java-2.0.13/debian/libpdfbox2-java.poms
--- libpdfbox2-java-2.0.9/debian/libpdfbox2-java.poms 2018-04-15 17:31:40.000000000 +0000
+++ libpdfbox2-java-2.0.13/debian/libpdfbox2-java.poms 2019-01-17 21:27:49.000000000 +0000
@@ -34,6 +34,6 @@
preflight-app/pom.xml --ignore
app/pom.xml --ignore
examples/pom.xml --ignore
-tools/pom.xml --ignore
+tools/pom.xml --no-parent --usj-name=pdfbox2-tools --package=libpdfbox2-java --java-lib
debugger/pom.xml --ignore
debugger-app/pom.xml --ignore
diff -Nru libpdfbox2-java-2.0.9/debian/maven.publishedRules libpdfbox2-java-2.0.13/debian/maven.publishedRules
--- libpdfbox2-java-2.0.9/debian/maven.publishedRules 2018-04-15 17:31:40.000000000 +0000
+++ libpdfbox2-java-2.0.13/debian/maven.publishedRules 2019-01-17 21:30:03.000000000 +0000
@@ -2,3 +2,4 @@
org.apache.pdfbox fontbox s/jar/bundle/ s/.*/2.x/ * *
org.apache.pdfbox pdfbox s/jar/bundle/ s/.*/2.x/ * *
org.apache.pdfbox pdfbox-reactor pom s/.*/2.x/ * *
+org.apache.pdfbox pdfbox-tools jar s/.*/2.x/ * *
diff -Nru libpdfbox2-java-2.0.9/debian/maven.rules libpdfbox2-java-2.0.13/debian/maven.rules
--- libpdfbox2-java-2.0.9/debian/maven.rules 2018-04-15 17:31:40.000000000 +0000
+++ libpdfbox2-java-2.0.13/debian/maven.rules 2019-01-17 21:28:36.000000000 +0000
@@ -7,5 +7,7 @@
org.bouncycastle s/bcprov-jdk15on/bcprov/ * s/.*/debian/ * *
org.apache.pdfbox fontbox s/jar/bundle/ s/.*/2.x/ * *
org.apache.pdfbox pdfbox s/jar/bundle/ s/.*/2.x/ * *
+org.apache.pdfbox pdfbox-debugger * s/.*/2.x/ * *
org.apache.pdfbox pdfbox-reactor pom s/.*/2.x/ * *
+org.apache.pdfbox pdfbox-tools * s/.*/2.x/ * *
diff -Nru libpdfbox2-java-2.0.9/debian/patches/disable-debugger.patch libpdfbox2-java-2.0.13/debian/patches/disable-debugger.patch
--- libpdfbox2-java-2.0.9/debian/patches/disable-debugger.patch 1970-01-01 00:00:00.000000000 +0000
+++ libpdfbox2-java-2.0.13/debian/patches/disable-debugger.patch 2019-01-17 21:10:47.000000000 +0000
@@ -0,0 +1,58 @@
+Description: Disable the debugger support in the tools component
+Author: Emmanuel Bourg
+Forwarded: not-needed
+--- a/tools/src/main/java/org/apache/pdfbox/tools/PDFBox.java
++++ b/tools/src/main/java/org/apache/pdfbox/tools/PDFBox.java
+@@ -16,8 +16,6 @@
+ */
+ package org.apache.pdfbox.tools;
+
+-import org.apache.pdfbox.debugger.PDFDebugger;
+-
+ /**
+ * Simple wrapper around all the command line utilities included in PDFBox.
+ * Used as the main class in the runnable standalone PDFBox jar.
+@@ -71,11 +69,6 @@
+ {
+ PrintPDF.main(arguments);
+ }
+- else if (command.equals("PDFDebugger") || command.equals("PDFReader"))
+- {
+- PDFDebugger.main(arguments);
+- exitAfterCallingMain = false;
+- }
+ else if (command.equals("PDFMerger"))
+ {
+ PDFMerger.main(arguments);
+@@ -122,7 +115,6 @@
+ + " ExtractImages\n"
+ + " OverlayPDF\n"
+ + " PrintPDF\n"
+- + " PDFDebugger\n"
+ + " PDFMerger\n"
+ + " PDFReader\n"
+ + " PDFSplit\n"
+--- a/tools/pom.xml
++++ b/tools/pom.xml
+@@ -39,16 +39,16 @@
+
+
+
++ ${project.groupId}
++ pdfbox
++ ${project.version}
++
++
+ org.bouncycastle
+ bcmail-jdk15on
+ true
+
+
+- ${project.groupId}
+- pdfbox-debugger
+- ${project.version}
+-
+-
+ junit
+ junit
+ test
diff -Nru libpdfbox2-java-2.0.9/debian/patches/series libpdfbox2-java-2.0.13/debian/patches/series
--- libpdfbox2-java-2.0.9/debian/patches/series 2018-04-15 17:31:40.000000000 +0000
+++ libpdfbox2-java-2.0.13/debian/patches/series 2019-01-17 21:26:05.000000000 +0000
@@ -1 +1,2 @@
jar-packaging.patch
+disable-debugger.patch
diff -Nru libpdfbox2-java-2.0.9/debian/rules libpdfbox2-java-2.0.13/debian/rules
--- libpdfbox2-java-2.0.9/debian/rules 2018-04-15 17:31:40.000000000 +0000
+++ libpdfbox2-java-2.0.13/debian/rules 2019-01-17 21:30:43.000000000 +0000
@@ -9,6 +9,3 @@
override_dh_installexamples:
dh_installexamples
find $(CURDIR)/debian/libpdfbox2-java-doc/ -type d -empty -delete
-
-get-orig-source:
- uscan --download-current-version --force-download --repack --rename --compression xz
diff -Nru libpdfbox2-java-2.0.9/debian/watch libpdfbox2-java-2.0.13/debian/watch
--- libpdfbox2-java-2.0.9/debian/watch 2018-04-15 17:31:40.000000000 +0000
+++ libpdfbox2-java-2.0.13/debian/watch 2019-01-17 21:31:20.000000000 +0000
@@ -1,12 +1,14 @@
-version=3
+version=4
# http://pdfbox.apache.org/download.html
# points to a page for mirror selection
opts=\
+repack,\
+compression=xz,\
dversionmangle=s/(?:\.|\+)dfsg$//,\
downloadurlmangle=s/pdfbox\/([\d.]+)\//pdfbox\/$1\/pdfbox-$1-src.zip/,\
filenamemangle=s/([\d.]+)\//pdfbox-$1-src.zip/,\
pgpsigurlmangle=s/$/.asc/ \
- http://archive.apache.org/dist/pdfbox/ ([\d.]+)/
+ https://archive.apache.org/dist/pdfbox/ ([\d.]+)/
diff -Nru libpdfbox2-java-2.0.9/debugger/pom.xml libpdfbox2-java-2.0.13/debugger/pom.xml
--- libpdfbox2-java-2.0.9/debugger/pom.xml 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/pom.xml 2018-11-28 17:18:38.000000000 +0000
@@ -23,7 +23,7 @@
org.apache.pdfbox
pdfbox-parent
- 2.0.9
+ 2.0.13
../parent/pom.xml
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/colorpane/CSSeparation.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/colorpane/CSSeparation.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/colorpane/CSSeparation.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/colorpane/CSSeparation.java 2018-11-28 17:18:38.000000000 +0000
@@ -90,7 +90,7 @@
slider.setMajorTickSpacing(50);
slider.setPaintTicks(true);
- Dictionary labelTable = new Hashtable();
+ Dictionary labelTable = new Hashtable();
JLabel lightest = new JLabel("lightest");
lightest.setFont(new Font(Font.MONOSPACED, Font.BOLD, 10));
JLabel darkest = new JLabel("darkest");
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/flagbitspane/FlagBitsPane.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/flagbitspane/FlagBitsPane.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/flagbitspane/FlagBitsPane.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/flagbitspane/FlagBitsPane.java 2018-11-28 17:18:38.000000000 +0000
@@ -20,6 +20,7 @@
import javax.swing.JPanel;
import org.apache.pdfbox.cos.COSDictionary;
import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.pdmodel.PDDocument;
/**
* @author Khyrul Bashar
@@ -29,14 +30,16 @@
public class FlagBitsPane
{
private FlagBitsPaneView view;
+ private final PDDocument document;
/**
* Constructor.
* @param dictionary COSDictionary instance.
* @param flagType COSName instance.
*/
- public FlagBitsPane(final COSDictionary dictionary, COSName flagType)
+ public FlagBitsPane(PDDocument document, final COSDictionary dictionary, COSName flagType)
{
+ this.document = document;
createPane(dictionary, flagType);
}
@@ -79,7 +82,7 @@
}
if (COSName.SIG_FLAGS.equals(flagType))
{
- flag = new SigFlag(dictionary);
+ flag = new SigFlag(document, dictionary);
view = new FlagBitsPaneView(
flag.getFlagType(), flag.getFlagValue(), flag.getFlagBits(), flag.getColumnNames());
}
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/flagbitspane/SigFlag.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/flagbitspane/SigFlag.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/flagbitspane/SigFlag.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/flagbitspane/SigFlag.java 2018-11-28 17:18:38.000000000 +0000
@@ -19,6 +19,7 @@
import org.apache.pdfbox.cos.COSDictionary;
import org.apache.pdfbox.cos.COSName;
+import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm;
/**
@@ -28,16 +29,18 @@
*/
public class SigFlag extends Flag
{
- private final COSDictionary acroformDictionary;
+ private final PDDocument document;
+ private final COSDictionary acroFormDictionary;
/**
* Constructor
*
* @param acroFormDictionary COSDictionary instance.
*/
- SigFlag(COSDictionary acroFormDictionary)
+ SigFlag(PDDocument document, COSDictionary acroFormDictionary)
{
- acroformDictionary = acroFormDictionary;
+ this.document = document;
+ this.acroFormDictionary = acroFormDictionary;
}
@Override
@@ -49,13 +52,13 @@
@Override
String getFlagValue()
{
- return "Flag value: " + acroformDictionary.getInt(COSName.SIG_FLAGS);
+ return "Flag value: " + acroFormDictionary.getInt(COSName.SIG_FLAGS);
}
@Override
Object[][] getFlagBits()
{
- PDAcroForm acroForm = new PDAcroForm(null, acroformDictionary);
+ PDAcroForm acroForm = new PDAcroForm(document, acroFormDictionary);
return new Object[][]{
new Object[]{1, "SignaturesExist", acroForm.isSignaturesExist()},
new Object[]{2, "AppendOnly", acroForm.isAppendOnly()},
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexEditor.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexEditor.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexEditor.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexEditor.java 2018-11-28 17:18:38.000000000 +0000
@@ -43,7 +43,7 @@
/**
* @author Khyrul Bashar
*
- * This class hosts all the UI components of Hex view and cordinate among them.
+ * This class hosts all the UI components of Hex view and coordinates among them.
*/
class HexEditor extends JPanel implements SelectionChangeListener
{
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexModel.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexModel.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexModel.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/hexviewer/HexModel.java 2018-11-28 17:18:38.000000000 +0000
@@ -23,7 +23,7 @@
/**
* @author Khyrul Bashar
*
- * A class that acts as a model for the hex viewer. It holds the data and provide the data as ncessary.
+ * A class that acts as a model for the hex viewer. It holds the data and provide the data as necessary.
* It'll let listen for any underlying data changes.
*/
class HexModel implements HexChangeListener
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/pagepane/PagePane.java 2018-11-28 17:18:38.000000000 +0000
@@ -28,6 +28,8 @@
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
import java.util.concurrent.ExecutionException;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
@@ -44,6 +46,10 @@
import org.apache.pdfbox.rendering.PDFRenderer;
import org.apache.pdfbox.debugger.PDFDebugger;
import org.apache.pdfbox.debugger.ui.HighResolutionImageIcon;
+import org.apache.pdfbox.pdmodel.common.PDRectangle;
+import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationWidget;
+import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm;
+import org.apache.pdfbox.pdmodel.interactive.form.PDField;
/**
* Display the page number and a page rendering.
@@ -61,6 +67,10 @@
private RotationMenu rotationMenu;
private final JLabel statuslabel;
private final PDPage page;
+ private String labelText = "";
+ private final Map rectMap = new HashMap();
+ private final AffineTransform defaultTransform = GraphicsEnvironment.getLocalGraphicsEnvironment().
+ getDefaultScreenDevice().getDefaultConfiguration().getDefaultTransform();
public PagePane(PDDocument document, COSDictionary pageDict, JLabel statuslabel)
{
@@ -69,6 +79,27 @@
this.document = document;
this.statuslabel = statuslabel;
initUI();
+ initRectMap();
+ }
+
+ private void initRectMap()
+ {
+ PDAcroForm acroForm = document.getDocumentCatalog().getAcroForm();
+ if (acroForm == null)
+ {
+ return;
+ }
+ for (PDField field : acroForm.getFieldTree())
+ {
+ String fullyQualifiedName = field.getFullyQualifiedName();
+ for (PDAnnotationWidget widget : field.getWidgets())
+ {
+ if (page.equals(widget.getPage()))
+ {
+ rectMap.put(widget.getRectangle(), fullyQualifiedName);
+ }
+ }
+ }
}
private void initUI()
@@ -185,8 +216,8 @@
float offsetX = page.getCropBox().getLowerLeftX();
float offsetY = page.getCropBox().getLowerLeftY();
float zoomScale = zoomMenu.getPageZoomScale();
- float x = e.getX() / zoomScale;
- float y = e.getY() / zoomScale;
+ float x = e.getX() / zoomScale * (float) defaultTransform.getScaleX();
+ float y = e.getY() / zoomScale * (float) defaultTransform.getScaleY();
int x1, y1;
switch ((RotationMenu.getRotationDegrees() + page.getRotation()) % 360)
{
@@ -208,7 +239,19 @@
y1 = (int) (height - y + offsetY);
break;
}
- statuslabel.setText(x1 + "," + y1);
+ String text = "x: " + x1 + ", y: " + y1;
+
+ // are we in a field widget?
+ for (Map.Entry entry : rectMap.entrySet())
+ {
+ if (entry.getKey().contains(x1, y1))
+ {
+ text += ", field: " + rectMap.get(entry.getKey());
+ break;
+ }
+ }
+
+ statuslabel.setText(text);
}
@Override
@@ -234,7 +277,7 @@
@Override
public void mouseExited(MouseEvent e)
{
- statuslabel.setText("");
+ statuslabel.setText(labelText);
}
/**
@@ -257,14 +300,16 @@
protected BufferedImage doInBackground() throws IOException
{
label.setIcon(null);
- label.setText("Rendering...");
+ labelText = "Rendering...";
+ label.setText(labelText);
PDFRenderer renderer = new PDFRenderer(document);
renderer.setSubsamplingAllowed(allowSubsampling);
long t0 = System.currentTimeMillis();
- statuslabel.setText("Rendering...");
+ statuslabel.setText(labelText);
BufferedImage bim = renderer.renderImage(pageIndex, scale);
float t = (System.currentTimeMillis() - t0) / 1000f;
- statuslabel.setText("Rendered in " + t + " second" + (t > 1 ? "s" : ""));
+ labelText = "Rendered in " + t + " second" + (t > 1 ? "s" : "");
+ statuslabel.setText(labelText);
return ImageUtil.getRotatedImage(bim, rotation);
}
@@ -280,10 +325,8 @@
// a smaller size than the image to compensate that the
// image is scaled up with some screen configurations (e.g. 125% on windows).
// See PDFBOX-3665 for more sample code and discussion.
- AffineTransform tx = GraphicsEnvironment.getLocalGraphicsEnvironment().
- getDefaultScreenDevice().getDefaultConfiguration().getDefaultTransform();
- label.setSize((int) Math.ceil(image.getWidth() / tx.getScaleX()),
- (int) Math.ceil(image.getHeight() / tx.getScaleY()));
+ label.setSize((int) Math.ceil(image.getWidth() / defaultTransform.getScaleX()),
+ (int) Math.ceil(image.getHeight() / defaultTransform.getScaleY()));
label.setIcon(new HighResolutionImageIcon(image, label.getWidth(), label.getHeight()));
label.setText(null);
}
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/PDFDebugger.java 2018-11-28 17:18:38.000000000 +0000
@@ -18,6 +18,7 @@
import java.awt.BorderLayout;
import java.awt.Component;
+import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.FileDialog;
import java.awt.Toolkit;
@@ -42,7 +43,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.util.StringTokenizer;
+import javax.imageio.spi.IIORegistry;
import javax.print.attribute.HashPrintRequestAttributeSet;
import javax.print.attribute.PrintRequestAttributeSet;
import javax.print.attribute.standard.Sides;
@@ -105,11 +106,11 @@
import org.apache.pdfbox.debugger.ui.RotationMenu;
import org.apache.pdfbox.debugger.ui.Tree;
import org.apache.pdfbox.debugger.ui.ZoomMenu;
+import org.apache.pdfbox.filter.FilterFactory;
import org.apache.pdfbox.io.IOUtils;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.common.PDPageLabels;
import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException;
-import org.apache.pdfbox.pdmodel.font.PDFont;
import org.apache.pdfbox.pdmodel.font.PDType1Font;
import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceCMYK;
import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB;
@@ -300,10 +301,20 @@
}
});
+ initGlobalEventHandlers();
+ }
+
+ /**
+ * Initialize application global event handlers. Protected to allow
+ * subclasses to override this method if they don't want the global event
+ * handler overridden.
+ */
+ @SuppressWarnings("WeakerAccess")
+ protected void initGlobalEventHandlers()
+ {
// Mac OS X file open/quit handler
- if (IS_MAC_OS && !isMinJdk9())
+ if (IS_MAC_OS)
{
- //TODO this needs to be rewritten for JDK9, see PDFBOX-4013
try
{
Method osxOpenFiles = getClass().getDeclaredMethod("osxOpenFiles", String.class);
@@ -415,11 +426,8 @@
}
});
- if (!IS_MAC_OS)
- {
- fileMenu.addSeparator();
- fileMenu.add(printMenuItem);
- }
+ fileMenu.addSeparator();
+ fileMenu.add(printMenuItem);
JMenuItem exitMenuItem = new JMenuItem("Exit");
exitMenuItem.setAccelerator(KeyStroke.getKeyStroke("alt F4"));
@@ -630,7 +638,7 @@
openDialog.setVisible(true);
if (openDialog.getFile() != null)
{
- readPDFFile(openDialog.getFile(), "");
+ readPDFFile(new File(openDialog.getDirectory(),openDialog.getFile()), "");
}
}
else
@@ -898,7 +906,9 @@
{
selectedNode = ((MapEntry)selectedNode).getKey();
selectedNode = getUnderneathObject(selectedNode);
- FlagBitsPane flagBitsPane = new FlagBitsPane((COSDictionary) parentNode, (COSName) selectedNode);
+ FlagBitsPane flagBitsPane = new FlagBitsPane(document,
+ (COSDictionary) parentNode,
+ (COSName) selectedNode);
replaceRightComponent(flagBitsPane.getPane());
}
}
@@ -1075,7 +1085,7 @@
return data;
}
- private void exitMenuItemActionPerformed(ActionEvent evt)
+ private void exitMenuItemActionPerformed(ActionEvent ignored)
{
if( document != null )
{
@@ -1093,6 +1103,16 @@
throw new RuntimeException(e);
}
}
+ performApplicationExit();
+ }
+
+ /**
+ * Exit the application after the window is closed. This is protected to let
+ * subclasses override the behavior.
+ */
+ @SuppressWarnings("WeakerAccess")
+ protected void performApplicationExit()
+ {
System.exit(0);
}
@@ -1127,7 +1147,15 @@
}
if (job.printDialog(pras))
{
- job.print(pras);
+ setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ try
+ {
+ job.print(pras);
+ }
+ finally
+ {
+ setCursor(Cursor.getDefaultCursor());
+ }
}
}
catch (PrinterException e)
@@ -1141,23 +1169,7 @@
*/
private void exitForm(WindowEvent evt)
{
- if( document != null )
- {
- try
- {
- document.close();
- if (!currentFilePath.startsWith("http"))
- {
- recentFiles.addFile(currentFilePath);
- }
- recentFiles.close();
- }
- catch( IOException e )
- {
- throw new RuntimeException(e);
- }
- }
- System.exit(0);
+ exitMenuItemActionPerformed(null);
}
/**
@@ -1202,6 +1214,8 @@
// Yes this is always true
PDDeviceCMYK.INSTANCE.toRGB(new float[] { 0, 0, 0, 0} );
PDDeviceRGB.INSTANCE.toRGB(new float[] { 0, 0, 0 } );
+ IIORegistry.getDefaultInstance();
+ FilterFactory.INSTANCE.getFilter(COSName.FLATE_DECODE);
}
// open file, if any
@@ -1249,7 +1263,7 @@
readPDFFile(file, password);
}
- private void readPDFFile(File file, String password) throws IOException
+ private void readPDFFile(final File file, String password) throws IOException
{
if( document != null )
{
@@ -1261,7 +1275,17 @@
}
currentFilePath = file.getPath();
recentFiles.removeFile(file.getPath());
- parseDocument( file, password );
+ DocumentOpener documentOpener = new DocumentOpener(password)
+ {
+ @Override
+ PDDocument open() throws IOException
+ {
+ return PDDocument.load(file, password);
+ }
+ };
+ document = documentOpener.parse();
+ printMenuItem.setEnabled(true);
+ reopenMenuItem.setEnabled(true);
initTree();
@@ -1277,7 +1301,7 @@
addRecentFileItems();
}
- private void readPDFurl(String urlString, String password) throws IOException
+ private void readPDFurl(final String urlString, String password) throws IOException
{
if (document != null)
{
@@ -1288,8 +1312,15 @@
}
}
currentFilePath = urlString;
- URL url = new URL(urlString);
- document = PDDocument.load(url.openStream(), password);
+ DocumentOpener documentOpener = new DocumentOpener(password)
+ {
+ @Override
+ PDDocument open() throws IOException
+ {
+ return PDDocument.load(new URL(urlString).openStream(), password);
+ }
+ };
+ document = documentOpener.parse();
printMenuItem.setEnabled(true);
reopenMenuItem.setEnabled(true);
@@ -1327,45 +1358,65 @@
tree.setSelectionPath(treeStatus.getPathForString("Root"));
}
}
-
+
/**
- * This will parse a document.
- *
- * @param file The file addressing the document.
- *
- * @throws IOException If there is an error parsing the document.
+ * Internal class to avoid double code in password entry loop.
*/
- private void parseDocument( File file, String password )throws IOException
+ abstract class DocumentOpener
{
- while (true)
+ String password;
+
+ DocumentOpener(String password)
{
- try
- {
- document = PDDocument.load(file, password);
- }
- catch (InvalidPasswordException ipe)
+ this.password = password;
+ }
+
+ /**
+ * Override to load the actual input type (File, URL, stream), don't call it directly!
+ *
+ * @return
+ * @throws IOException
+ */
+ abstract PDDocument open() throws IOException;
+
+ /**
+ * Call this!
+ *
+ * @return
+ * @throws IOException
+ */
+ final PDDocument parse() throws IOException
+ {
+ while (true)
{
- // https://stackoverflow.com/questions/8881213/joptionpane-to-get-password
- JPanel panel = new JPanel();
- JLabel label = new JLabel("Password:");
- JPasswordField pass = new JPasswordField(10);
- panel.add(label);
- panel.add(pass);
- String[] options = new String[] {"OK", "Cancel"};
- int option = JOptionPane.showOptionDialog(null, panel, "Enter password",
- JOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE,
- null, options, "");
- if (option == 0)
+ try
+ {
+ return open();
+ }
+ catch (InvalidPasswordException ipe)
{
- password = new String(pass.getPassword());
- continue;
+ // https://stackoverflow.com/questions/8881213/joptionpane-to-get-password
+ JPanel panel = new JPanel();
+ JLabel label = new JLabel("Password:");
+ JPasswordField pass = new JPasswordField(10);
+ panel.add(label);
+ panel.add(pass);
+ String[] options = new String[]
+ {
+ "OK", "Cancel"
+ };
+ int option = JOptionPane.showOptionDialog(null, panel, "Enter password",
+ JOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE,
+ null, options, "");
+ if (option == 0)
+ {
+ password = new String(pass.getPassword());
+ continue;
+ }
+ throw ipe;
}
- throw ipe;
}
- break;
- }
- printMenuItem.setEnabled(true);
- reopenMenuItem.setEnabled(true);
+ }
}
private void addRecentFileItems()
@@ -1446,26 +1497,4 @@
}
return null;
}
-
- private static boolean isMinJdk9()
- {
- // strategy from lucene-solr/lucene/core/src/java/org/apache/lucene/util/Constants.java
- String version = System.getProperty("java.specification.version");
- final StringTokenizer st = new StringTokenizer(version, ".");
- try
- {
- int major = Integer.parseInt(st.nextToken());
- int minor = 0;
- if (st.hasMoreTokens())
- {
- minor = Integer.parseInt(st.nextToken());
- }
- return major > 1 || (major == 1 && minor >= 9);
- }
- catch (NumberFormatException nfe)
- {
- // maybe some new numbering scheme in the 22nd century
- return true;
- }
- }
}
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamPane.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamPane.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamPane.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/StreamPane.java 2018-11-28 17:18:38.000000000 +0000
@@ -26,11 +26,10 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;
+import java.util.Vector;
import java.util.concurrent.ExecutionException;
-import javax.imageio.ImageIO;
import javax.swing.BoxLayout;
import javax.swing.JComboBox;
import javax.swing.JComponent;
@@ -146,8 +145,15 @@
}
tabbedPane = new JTabbedPane();
- tabbedPane.add("Text view", view.getStreamPanel());
- tabbedPane.add("Hex view", hexView.getPane());
+ if (stream.isImage())
+ {
+ tabbedPane.add("Image view", view.getStreamPanel());
+ }
+ else
+ {
+ tabbedPane.add("Text view", view.getStreamPanel());
+ tabbedPane.add("Hex view", hexView.getPane());
+ }
panel.add(tabbedPane);
}
@@ -159,7 +165,7 @@
private JPanel createHeaderPanel(List availableFilters, String i, ActionListener actionListener)
{
- JComboBox filters = new JComboBox(availableFilters.toArray());
+ JComboBox filters = new JComboBox(new Vector(availableFilters));
filters.setSelectedItem(i);
filters.addActionListener(actionListener);
@@ -182,8 +188,13 @@
if (currentFilter.equals(Stream.IMAGE))
{
requestImageShowing();
+ tabbedPane.removeAll();
+ tabbedPane.add("Image view", view.getStreamPanel());
return;
}
+ tabbedPane.removeAll();
+ tabbedPane.add("Text view", view.getStreamPanel());
+ tabbedPane.add("Hex view", hexView.getPane());
requestStreamText(currentFilter);
}
catch (IOException e)
@@ -208,13 +219,6 @@
return;
}
view.showStreamImage(image);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ImageIO.write(image, "jpg", baos);
- baos.flush();
- byte[] bytes = baos.toByteArray();
- baos.close();
- hexView.changeData(bytes);
}
}
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/ui/OSXAdapter.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/ui/OSXAdapter.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/ui/OSXAdapter.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/ui/OSXAdapter.java 2018-11-28 17:18:38.000000000 +0000
@@ -18,7 +18,7 @@
/*
* This file includes code under the following terms:
- *
+ *
* Version: 2.0
*
* Disclaimer: IMPORTANT: This Apple software is supplied to you by
@@ -64,10 +64,14 @@
package org.apache.pdfbox.debugger.ui;
+import java.awt.Desktop;
+import java.io.File;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
+import java.util.StringTokenizer;
+import java.util.List;
/**
* Hooks existing preferences/about/quit functionality from an
@@ -87,10 +91,63 @@
protected String proxySignature;
static Object macOSXApplication;
+
+ private static boolean isMinJdk9()
+ {
+ // strategy from lucene-solr/lucene/core/src/java/org/apache/lucene/util/Constants.java
+ String version = System.getProperty("java.specification.version");
+ final StringTokenizer st = new StringTokenizer(version, ".");
+ try
+ {
+ int major = Integer.parseInt(st.nextToken());
+ int minor = 0;
+ if (st.hasMoreTokens())
+ {
+ minor = Integer.parseInt(st.nextToken());
+ }
+ return major > 1 || (major == 1 && minor >= 9);
+ }
+ catch (NumberFormatException nfe)
+ {
+ // maybe some new numbering scheme in the 22nd century
+ return true;
+ }
+ }
// Pass this method an Object and Method equipped to perform application shutdown logic
// The method passed should return a boolean stating whether or not the quit should occur
- public static void setQuitHandler(Object target, Method quitHandler) {
+ public static void setQuitHandler(final Object target, final Method quitHandler)
+ {
+ if (isMinJdk9())
+ {
+ try
+ {
+ Desktop desktopObject = Desktop.getDesktop();
+ Class> filesHandlerClass = Class.forName("java.awt.desktop.QuitHandler");
+ final Method setQuitHandlerMethod = desktopObject.getClass().getMethod("setQuitHandler", filesHandlerClass);
+ Object osxAdapterProxy = Proxy.newProxyInstance(OSXAdapter.class.getClassLoader(),
+ new Class[] { filesHandlerClass }, new InvocationHandler()
+ {
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args)
+ throws Throwable
+ {
+ if ("handleQuitRequestWith".equals(method.getName()))
+ {
+ // We just call our own quit handler
+ quitHandler.invoke(target);
+ }
+ return null;
+ }
+ });
+ setQuitHandlerMethod.invoke(desktopObject, osxAdapterProxy);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return;
+ }
setHandler(new OSXAdapter("handleQuit", target, quitHandler));
}
@@ -133,10 +190,59 @@
// Pass this method an Object and a Method equipped to handle document events from the Finder
// Documents are registered with the Finder via the CFBundleDocumentTypes dictionary in the
// application bundle's Info.plist
- public static void setFileHandler(Object target, Method fileHandler) {
- setHandler(new OSXAdapter("handleOpenFile", target, fileHandler) {
+ public static void setFileHandler(Object target, Method fileHandler)
+ {
+ if (isMinJdk9())
+ {
+ try
+ {
+ Desktop desktopObject = Desktop.getDesktop();
+ Class> filesHandlerClass = Class.forName("java.awt.desktop.OpenFilesHandler");
+ Method setOpenFileHandlerMethod = desktopObject.getClass().getMethod("setOpenFileHandler", filesHandlerClass);
+ Object osxAdapterProxy = Proxy.newProxyInstance(OSXAdapter.class.getClassLoader(),
+ new Class[]
+ {
+ filesHandlerClass
+ }, new OSXAdapter("openFiles", target, fileHandler)
+ {
+ // Override OSXAdapter.callTarget to send information on the
+ // file to be opened
+ @Override
+ public boolean callTarget(Object openFilesEvent)
+ {
+ if (openFilesEvent != null)
+ {
+ try
+ {
+ Method getFilesMethod = openFilesEvent.getClass().getDeclaredMethod("getFiles",
+ (Class[]) null);
+ @SuppressWarnings("unchecked")
+ List files = (List) getFilesMethod.invoke(openFilesEvent,
+ (Object[]) null);
+ this.targetMethod.invoke(this.targetObject, files.get(0).getAbsolutePath());
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException(ex);
+ }
+ }
+ return true;
+ }
+ });
+ setOpenFileHandlerMethod.invoke(desktopObject, osxAdapterProxy);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return;
+ }
+ /* JDK <= 1.8, using Apple classes */
+ setHandler(new OSXAdapter("handleOpenFile", target, fileHandler)
+ {
// Override OSXAdapter.callTarget to send information on the
// file to be opened
+ @Override
public boolean callTarget(Object appleEvent) {
if (appleEvent != null) {
try {
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PageEntry.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PageEntry.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PageEntry.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PageEntry.java 2018-11-28 17:18:38.000000000 +0000
@@ -18,6 +18,7 @@
package org.apache.pdfbox.debugger.ui;
import org.apache.pdfbox.cos.COSArray;
+import org.apache.pdfbox.cos.COSBase;
import org.apache.pdfbox.cos.COSDictionary;
import org.apache.pdfbox.cos.COSName;
@@ -63,8 +64,18 @@
COSDictionary node = dict;
while (node.containsKey(COSName.PARENT))
{
- COSDictionary parent = (COSDictionary)node.getDictionaryObject(COSName.PARENT);
- COSArray kids = (COSArray)parent.getDictionaryObject(COSName.KIDS);
+ COSBase base = node.getDictionaryObject(COSName.PARENT);
+ if (!(base instanceof COSDictionary))
+ {
+ return "";
+ }
+ COSDictionary parent = (COSDictionary) base;
+ base = parent.getDictionaryObject(COSName.KIDS);
+ if (!(base instanceof COSArray))
+ {
+ return "";
+ }
+ COSArray kids = (COSArray) base;
int idx = kids.indexOfObject(node);
sb.append("/Kids/[").append(idx).append("]");
node = parent;
diff -Nru libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java
--- libpdfbox2-java-2.0.9/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger/src/main/java/org/apache/pdfbox/debugger/ui/PDFTreeCellRenderer.java 2018-11-28 17:18:38.000000000 +0000
@@ -205,13 +205,19 @@
if (dict.containsKey(COSName.TYPE))
{
COSName type = dict.getCOSName(COSName.TYPE);
- sb.append(" /T:").append(type.getName());
+ if (type != null)
+ {
+ sb.append(" /T:").append(type.getName());
+ }
}
-
+
if (dict.containsKey(COSName.SUBTYPE))
{
COSName subtype = dict.getCOSName(COSName.SUBTYPE);
- sb.append(" /S:").append(subtype.getName());
+ if (subtype != null)
+ {
+ sb.append(" /S:").append(subtype.getName());
+ }
}
return sb.toString();
}
diff -Nru libpdfbox2-java-2.0.9/debugger-app/pom.xml libpdfbox2-java-2.0.13/debugger-app/pom.xml
--- libpdfbox2-java-2.0.9/debugger-app/pom.xml 2018-03-20 16:19:42.000000000 +0000
+++ libpdfbox2-java-2.0.13/debugger-app/pom.xml 2018-11-28 17:18:40.000000000 +0000
@@ -23,7 +23,7 @@
org.apache.pdfbox
pdfbox-parent
- 2.0.9
+ 2.0.13
../parent/pom.xml
@@ -68,7 +68,7 @@
true
*;scope=provided;inline=org/apache/**|org/bouncycastle/**|META-INF/services/**
${project.url}
- !junit.framework,!junit.textui,javax.*;resolution:=optional,org.apache.avalon.framework.logger;resolution:=optional,org.apache.log;resolution:=optional,org.apache.log4j;resolution:=optional,*
+ !junit.framework,!junit.textui,javax.*;resolution:=optional,org.apache.avalon.framework.logger;resolution:=optional,org.apache.log;resolution:=optional,*
org.apache.pdfbox.debugger.PDFDebugger
diff -Nru libpdfbox2-java-2.0.9/examples/pom.xml libpdfbox2-java-2.0.13/examples/pom.xml
--- libpdfbox2-java-2.0.9/examples/pom.xml 2018-03-20 16:19:44.000000000 +0000
+++ libpdfbox2-java-2.0.13/examples/pom.xml 2018-11-28 17:18:40.000000000 +0000
@@ -23,7 +23,7 @@
org.apache.pdfbox
pdfbox-parent
- 2.0.9
+ 2.0.13
../parent/pom.xml
@@ -42,6 +42,26 @@
+
+
+
+ [11,)
+
+
+
+ javax.xml.bind
+ jaxb-api
+ provided
+
+
+ javax.activation
+ activation
+ provided
+
+
+
+
+
org.bouncycastle
@@ -77,7 +97,7 @@
org.apache.ant
ant
- 1.9.6
+ 1.10.5
junit
@@ -85,9 +105,15 @@
test
- org.apache.wink
- wink-component-test-support
- 1.4
+ javax.servlet
+ javax.servlet-api
+ 4.0.1
+ test
+
+
+ org.apache.geronimo.specs
+ geronimo-jaxrs_1.1_spec
+ 1.0
test
diff -Nru libpdfbox2-java-2.0.9/examples/src/main/appended-resources/META-INF/LICENSE libpdfbox2-java-2.0.13/examples/src/main/appended-resources/META-INF/LICENSE
--- libpdfbox2-java-2.0.9/examples/src/main/appended-resources/META-INF/LICENSE 2018-03-20 16:19:44.000000000 +0000
+++ libpdfbox2-java-2.0.13/examples/src/main/appended-resources/META-INF/LICENSE 2018-11-28 17:18:40.000000000 +0000
@@ -169,14 +169,111 @@
copyright holder.
The file "sRGB Color Space Profile.icm" is:
-Copyright (c) 1998 Hewlett-Packard Company
-To anyone who acknowledges that the file "sRGB Color Space Profile.icm"
-is provided "AS IS" WITH NO EXPRESS OR IMPLIED WARRANTY:
-permission to use, copy and distribute this file for any purpose is hereby
-granted without fee, provided that the file is not changed including the HP
-copyright notice tag, and that the name of Hewlett-Packard Company not be
-used in advertising or publicity pertaining to distribution of the software
-without specific, written prior permission. Hewlett-Packard Company makes
-no representations about the suitability of this software for any purpose.
+ Copyright (c) 1998 Hewlett-Packard Company
+ To anyone who acknowledges that the file "sRGB Color Space Profile.icm"
+ is provided "AS IS" WITH NO EXPRESS OR IMPLIED WARRANTY:
+ permission to use, copy and distribute this file for any purpose is hereby
+ granted without fee, provided that the file is not changed including the HP
+ copyright notice tag, and that the name of Hewlett-Packard Company not be
+ used in advertising or publicity pertaining to distribution of the software
+ without specific, written prior permission. Hewlett-Packard Company makes
+ no representations about the suitability of this software for any purpose.
+
+Lohit-Bengali font (https://pagure.io/lohit):
+
+ Copyright 2011-13 Lohit Fonts Project contributors
+
+
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
+ This license is copied below, and is also available with a FAQ at:
+ http://scripts.sil.org/OFL
+
+
+ -----------------------------------------------------------
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+ -----------------------------------------------------------
+
+ PREAMBLE
+ The goals of the Open Font License (OFL) are to stimulate worldwide
+ development of collaborative font projects, to support the font creation
+ efforts of academic and linguistic communities, and to provide a free and
+ open framework in which fonts may be shared and improved in partnership
+ with others.
+
+ The OFL allows the licensed fonts to be used, studied, modified and
+ redistributed freely as long as they are not sold by themselves. The
+ fonts, including any derivative works, can be bundled, embedded,
+ redistributed and/or sold with any software provided that any reserved
+ names are not used by derivative works. The fonts and derivatives,
+ however, cannot be released under any other type of license. The
+ requirement for fonts to remain under this license does not apply
+ to any document created using the fonts or their derivatives.
+
+ DEFINITIONS
+ "Font Software" refers to the set of files released by the Copyright
+ Holder(s) under this license and clearly marked as such. This may
+ include source files, build scripts and documentation.
+
+ "Reserved Font Name" refers to any names specified as such after the
+ copyright statement(s).
+
+ "Original Version" refers to the collection of Font Software components as
+ distributed by the Copyright Holder(s).
+
+ "Modified Version" refers to any derivative made by adding to, deleting,
+ or substituting -- in part or in whole -- any of the components of the
+ Original Version, by changing formats or by porting the Font Software to a
+ new environment.
+
+ "Author" refers to any designer, engineer, programmer, technical
+ writer or other person who contributed to the Font Software.
+
+ PERMISSION & CONDITIONS
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
+ redistribute, and sell modified and unmodified copies of the Font
+ Software, subject to the following conditions:
+
+ 1) Neither the Font Software nor any of its individual components,
+ in Original or Modified Versions, may be sold by itself.
+
+ 2) Original or Modified Versions of the Font Software may be bundled,
+ redistributed and/or sold with any software, provided that each copy
+ contains the above copyright notice and this license. These can be
+ included either as stand-alone text files, human-readable headers or
+ in the appropriate machine-readable metadata fields within text or
+ binary files as long as those fields can be easily viewed by the user.
+
+ 3) No Modified Version of the Font Software may use the Reserved Font
+ Name(s) unless explicit written permission is granted by the corresponding
+ Copyright Holder. This restriction only applies to the primary font name as
+ presented to the users.
+
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+ Software shall not be used to promote, endorse or advertise any
+ Modified Version, except to acknowledge the contribution(s) of the
+ Copyright Holder(s) and the Author(s) or with their explicit written
+ permission.
+
+ 5) The Font Software, modified or unmodified, in part or in whole,
+ must be distributed entirely under this license, and must not be
+ distributed under any other license. The requirement for fonts to
+ remain under this license does not apply to any document created
+ using the Font Software.
+
+ TERMINATION
+ This license becomes null and void if any of the above conditions are
+ not met.
+
+ DISCLAIMER
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+ OTHER DEALINGS IN THE FONT SOFTWARE.
diff -Nru libpdfbox2-java-2.0.9/examples/src/main/java/org/apache/pdfbox/examples/ant/package.html libpdfbox2-java-2.0.13/examples/src/main/java/org/apache/pdfbox/examples/ant/package.html
--- libpdfbox2-java-2.0.9/examples/src/main/java/org/apache/pdfbox/examples/ant/package.html 2018-03-20 16:19:44.000000000 +0000
+++ libpdfbox2-java-2.0.13/examples/src/main/java/org/apache/pdfbox/examples/ant/package.html 2018-11-28 17:18:40.000000000 +0000
@@ -21,14 +21,14 @@
ANT tasks that utilize PDFBox features can be found in this package.
-This is an example of using the PDF2Text task:
+This is an example of using the PDF2Text task:
-<taskdef name="pdf2text" classname="org.apache.pdfbox.ant.PDFToTextTask" classpathref="build.classpath" />
+<taskdef name="pdf2text" classname="org.apache.pdfbox.ant.PDFToTextTask" classpathref="build.classpath" />
-<pdf2text>
- <fileset dir="test">
- <include name="**/*.pdf" />
- </fileset>
-</pdf2text>
+<pdf2text>
+ <fileset dir="test">
+ <include name="**/*.pdf" />
+ </fileset>
+</pdf2text>