Browse Source

FOP-2538: PDF to PDF OOM

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1713641 13f79535-47bb-0310-9956-ffa450edef68
pull/39/head
Simon Steiner 8 years ago
parent
commit
ff98547df3

+ 5
- 0
src/java/org/apache/fop/apps/FOUserAgent.java View File

@@ -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();
}
}

+ 7
- 0
src/java/org/apache/fop/apps/FopFactory.java View File

@@ -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;
}
}

Loading…
Cancel
Save