Browse Source

FOP-2560: PDF to PDF corrupt after reuse of FopFactory

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1723541 13f79535-47bb-0310-9956-ffa450edef68
pull/1/merge
Simon Steiner 8 years ago
parent
commit
bafff08e73

+ 2
- 1
src/java/org/apache/fop/apps/FOUserAgent.java View File

@@ -134,6 +134,7 @@ public class FOUserAgent {
protected String keywords;

private final ImageSessionContext imageSessionContext;
private final SoftMapCache pdfObjectCache = new SoftMapCache(true);

/**
* Main constructor. <b>This constructor should not be called directly. Please use the
@@ -807,6 +808,6 @@ public class FOUserAgent {
}

public SoftMapCache getPDFObjectCache() {
return factory.getPDFObjectCache();
return pdfObjectCache;
}
}

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

@@ -37,7 +37,6 @@ 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;
@@ -83,8 +82,6 @@ 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;
@@ -436,8 +433,4 @@ public final class FopFactory implements ImageContext {
public ColorSpaceCache getColorSpaceCache() {
return this.colorSpaceCache;
}

public SoftMapCache getPDFObjectCache() {
return pdfObjectCache;
}
}

Loading…
Cancel
Save