diff --git a/.java-version b/.java-version new file mode 100644 index 0000000..6259340 --- /dev/null +++ b/.java-version @@ -0,0 +1 @@ +1.8 diff --git a/source/java/src/org/lucee/extension/pdf/tag/Document.java b/source/java/src/org/lucee/extension/pdf/tag/Document.java index 8958c9b..cf088fd 100755 --- a/source/java/src/org/lucee/extension/pdf/tag/Document.java +++ b/source/java/src/org/lucee/extension/pdf/tag/Document.java @@ -240,6 +240,17 @@ public ApplicationSettings getApplicationSettings() { return applicationSettings; } + /** + * Return the number of the document's explicit (or implicit) engine type. + */ + public int getType() { + if (_document instanceof PD4MLPDFDocument) { + return PDFDocument.TYPE_PD4ML; + } else { + return PDFDocument.TYPE_FS; + } + } + /** * set the value proxyserver Host name or IP address of a proxy server. * diff --git a/source/java/src/org/lucee/extension/pdf/tag/DocumentSection.java b/source/java/src/org/lucee/extension/pdf/tag/DocumentSection.java index a86ef3f..81a352c 100755 --- a/source/java/src/org/lucee/extension/pdf/tag/DocumentSection.java +++ b/source/java/src/org/lucee/extension/pdf/tag/DocumentSection.java @@ -56,7 +56,7 @@ public PDFDocument getPDFDocument() { second = true; if (_document == null) { second = false; - _document = PDFDocument.newInstance(doc.getApplicationSettings().getType()); + _document = PDFDocument.newInstance(doc.getType()); } }