From 1fa9a65166acb4077d2b0974ad579dc11d1a92cc Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 10 Feb 2017 14:05:45 +0100 Subject: java: Make PDFDocument a subclass of Document. Requires use of Document.openDocument(path) to open a document. No more new Document(path) since we may need to return a PDFDocument. Create a new blank PDF with new PDFDocument() constructor. --- platform/java/example/Viewer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/java/example/Viewer.java') diff --git a/platform/java/example/Viewer.java b/platform/java/example/Viewer.java index a924cf4b..e5c45be4 100644 --- a/platform/java/example/Viewer.java +++ b/platform/java/example/Viewer.java @@ -452,7 +452,7 @@ public class Viewer extends Frame implements WindowListener, ActionListener, Ite } try { - Document doc = new Document(selectedFile.getAbsolutePath()); + Document doc = Document.openDocument(selectedFile.getAbsolutePath()); Viewer app = new Viewer(doc); app.setVisible(true); return; -- cgit v1.2.3