aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-pdfbox-2/src/main/java
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-11-04 13:33:16 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-11-04 13:33:16 +0100
commit9897edea00c46566f5cd077222131c3296291239 (patch)
tree5cbb897e00c84801143031769d546140cf0bddc2 /pdf-as-pdfbox-2/src/main/java
parentd2c8450b2e570c2ef6624b57ef6e048c88e99d37 (diff)
downloadpdf-as-4-9897edea00c46566f5cd077222131c3296291239.tar.gz
pdf-as-4-9897edea00c46566f5cd077222131c3296291239.tar.bz2
pdf-as-4-9897edea00c46566f5cd077222131c3296291239.zip
prepare for memory resource managment
Diffstat (limited to 'pdf-as-pdfbox-2/src/main/java')
-rw-r--r--pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/PDFBOXObject.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/PDFBOXObject.java b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/PDFBOXObject.java
index e380e483..891ebe39 100644
--- a/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/PDFBOXObject.java
+++ b/pdf-as-pdfbox-2/src/main/java/at/gv/egiz/pdfas/lib/impl/pdfbox2/PDFBOXObject.java
@@ -6,6 +6,7 @@ import java.util.Map;
import javax.activation.DataSource;
+import org.apache.pdfbox.io.MemoryUsageSetting;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.font.PDFont;
@@ -52,7 +53,12 @@ public class PDFBOXObject extends PDFObject {
doc = null;
}
}
-
+
+ private MemoryUsageSetting getMemoryUsageSettings() {
+ // TODO: allow fine tuning of memory usage (divided main memory vs file memory)
+ return MemoryUsageSetting.setupMainMemoryOnly();
+ }
+
public void setOriginalDocument(DataSource originalDocument) throws IOException {
this.originalDocument = originalDocument;
if(doc != null) {