aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2015-11-10 14:09:25 +0000
committerSimon Steiner <ssteiner@apache.org>2015-11-10 14:09:25 +0000
commit80a3e249593369d9f35df8d8bb218083cdc16ef7 (patch)
treeed2a68b10f65bc6dd6e86253b9318bd9938409b9
parentd3369072b6ae55ce000709f01248c18aa4dee850 (diff)
downloadxmlgraphics-fop-80a3e249593369d9f35df8d8bb218083cdc16ef7.tar.gz
xmlgraphics-fop-80a3e249593369d9f35df8d8bb218083cdc16ef7.zip
FOP-2538: PDF to PDF OOM
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1713641 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/apps/FOUserAgent.java5
-rw-r--r--src/java/org/apache/fop/apps/FopFactory.java7
2 files changed, 12 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/apps/FOUserAgent.java b/src/java/org/apache/fop/apps/FOUserAgent.java
index dca7def7b..9e317f9a3 100644
--- a/src/java/org/apache/fop/apps/FOUserAgent.java
+++ b/src/java/org/apache/fop/apps/FOUserAgent.java
@@ -39,6 +39,7 @@ import org.apache.xmlgraphics.image.loader.ImageContext;
import org.apache.xmlgraphics.image.loader.ImageManager;
import org.apache.xmlgraphics.image.loader.ImageSessionContext;
import org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext;
+import org.apache.xmlgraphics.image.loader.util.SoftMapCache;
import org.apache.xmlgraphics.util.UnitConv;
import org.apache.fop.Version;
@@ -804,4 +805,8 @@ public class FOUserAgent {
public Map<String, String> getHyphenationPatternNames() {
return factory.getHyphenationPatternNames();
}
+
+ public SoftMapCache getPDFObjectCache() {
+ return factory.getPDFObjectCache();
+ }
}
diff --git a/src/java/org/apache/fop/apps/FopFactory.java b/src/java/org/apache/fop/apps/FopFactory.java
index d9c9708eb..50211d3bc 100644
--- a/src/java/org/apache/fop/apps/FopFactory.java
+++ b/src/java/org/apache/fop/apps/FopFactory.java
@@ -37,6 +37,7 @@ import org.apache.commons.logging.LogFactory;
import org.apache.xmlgraphics.image.loader.ImageContext;
import org.apache.xmlgraphics.image.loader.ImageManager;
import org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.FallbackResolver;
+import org.apache.xmlgraphics.image.loader.util.SoftMapCache;
import org.apache.xmlgraphics.util.UnitConv;
import org.apache.fop.apps.io.InternalResourceResolver;
@@ -82,6 +83,8 @@ public final class FopFactory implements ImageContext {
private final ColorSpaceCache colorSpaceCache;
+ private final SoftMapCache pdfObjectCache = new SoftMapCache(true);
+
private final FopFactoryConfig config;
private final InternalResourceResolver resolver;
@@ -433,4 +436,8 @@ public final class FopFactory implements ImageContext {
public ColorSpaceCache getColorSpaceCache() {
return this.colorSpaceCache;
}
+
+ public SoftMapCache getPDFObjectCache() {
+ return pdfObjectCache;
+ }
}