From 0baeb8398f5d193ff246907bb3471132a8fb280f Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Sat, 24 Oct 2009 11:42:58 +0000 Subject: Added a note about the new CMYK feature for AFP output. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@829347 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/trunk/output.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/documentation/content/xdocs/trunk/output.xml b/src/documentation/content/xdocs/trunk/output.xml index 0516d05ea..01af40a56 100644 --- a/src/documentation/content/xdocs/trunk/output.xml +++ b/src/documentation/content/xdocs/trunk/output.xml @@ -704,8 +704,15 @@ out = proc.getOutputStream();]]> ]]>

When the native attribute is specified and set to "true", all image resources will be natively injected into the datastream using an object container rather than being converted into an IOCA FS45 image. - Support for native image formats (e.g. JPEG, GIF) is not always available on printer implementations + Support for native image formats (e.g. JPEG, TIFF, GIF) is not always available on printer implementations so by default this configuration option is set to "false".

+

+ Setting cmyk="true" on the images element will enable CMYK + colors. This will only have an effect if the color mode is set to "color". Example: +

+ +]]>
Shading -- cgit v1.2.3 From af822593a3e4b4b2ed008c490612d3b811b32916 Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Sun, 25 Oct 2009 11:04:11 +0000 Subject: Added events to the implementation of the catalog command-line option git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@829532 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/cli/CommandLineOptions.java | 6 ++++- src/java/org/apache/fop/cli/InputHandler.java | 30 +++++++--------------- src/java/org/apache/fop/events/EventFormatter.xml | 2 ++ .../apache/fop/events/ResourceEventProducer.java | 14 ++++++++++ 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/java/org/apache/fop/cli/CommandLineOptions.java b/src/java/org/apache/fop/cli/CommandLineOptions.java index ad854891b..8f396c04a 100644 --- a/src/java/org/apache/fop/cli/CommandLineOptions.java +++ b/src/java/org/apache/fop/cli/CommandLineOptions.java @@ -1025,7 +1025,11 @@ public class CommandLineOptions { case IF_INPUT: return new IFInputHandler(iffile); case XSLT_INPUT: - return new InputHandler(xmlfile, xsltfile, xsltParams, useCatalogResolver); + InputHandler handler = new InputHandler(xmlfile, xsltfile, xsltParams); + if (useCatalogResolver) { + handler.createCatalogResolver(foUserAgent); + } + return handler; case IMAGE_INPUT: return new ImageInputHandler(imagefile, xsltfile, xsltParams); default: diff --git a/src/java/org/apache/fop/cli/InputHandler.java b/src/java/org/apache/fop/cli/InputHandler.java index a1ff1715b..363cd0767 100644 --- a/src/java/org/apache/fop/cli/InputHandler.java +++ b/src/java/org/apache/fop/cli/InputHandler.java @@ -51,6 +51,7 @@ import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; import org.apache.fop.apps.Fop; import org.apache.fop.apps.FopFactory; +import org.apache.fop.events.ResourceEventProducer; import org.apache.fop.render.awt.viewer.Renderable; /** @@ -64,8 +65,8 @@ public class InputHandler implements ErrorListener, Renderable { protected File sourcefile; private File stylesheet; // for XML/XSLT usage private Vector xsltParams; // for XML/XSLT usage - private EntityResolver entityResolver; - private URIResolver uriResolver; + private EntityResolver entityResolver = null; + private URIResolver uriResolver = null; /** the logger */ protected Log log = LogFactory.getLog(InputHandler.class); @@ -84,23 +85,6 @@ public class InputHandler implements ErrorListener, Renderable { xsltParams = params; } - /** - * Constructor for XML->XSLT->FO input - * - * @param xmlfile XML file - * @param xsltfile XSLT file - * @param params Vector of command-line parameters (name, value, - * name, value, ...) for XSL stylesheet, null if none - * @param useCatalogResolver if true, use a catalog resolver - * for XML parsing and XSLT URI resolution - */ - public InputHandler(File xmlfile, File xsltfile, Vector params, boolean useCatalogResolver) { - this(xmlfile, xsltfile, params); - if (useCatalogResolver) { - createCatalogResolver(); - } - } - /** * Constructor for FO input * @param fofile the file to read the FO document. @@ -213,10 +197,12 @@ public class InputHandler implements ErrorListener, Renderable { * Tries the Apache Commons Resolver, and if unsuccessful, * tries the same built into Java 6. */ - private void createCatalogResolver() { + public void createCatalogResolver(FOUserAgent userAgent) { String[] classNames = new String[] { "org.apache.xml.resolver.tools.CatalogResolver", "com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver"}; + ResourceEventProducer eventProducer = + ResourceEventProducer.Provider.get(userAgent.getEventBroadcaster()); Class resolverClass = null; for (int i = 0; i < classNames.length && resolverClass == null; ++i) { try { @@ -226,7 +212,7 @@ public class InputHandler implements ErrorListener, Renderable { } } if (resolverClass == null) { - log.error("Could not find catalog resolver in class path"); + eventProducer.catalogResolverNotFound(this); return; } try { @@ -234,8 +220,10 @@ public class InputHandler implements ErrorListener, Renderable { uriResolver = (URIResolver) resolverClass.newInstance(); } catch (InstantiationException e) { log.error("Error creating the catalog resolver: " + e.getMessage()); + eventProducer.catalogResolverNotCreated(this, e.getMessage()); } catch (IllegalAccessException e) { log.error("Error creating the catalog resolver: " + e.getMessage()); + eventProducer.catalogResolverNotCreated(this, e.getMessage()); } } diff --git a/src/java/org/apache/fop/events/EventFormatter.xml b/src/java/org/apache/fop/events/EventFormatter.xml index 147744a0d..84e3883f8 100644 --- a/src/java/org/apache/fop/events/EventFormatter.xml +++ b/src/java/org/apache/fop/events/EventFormatter.xml @@ -79,6 +79,8 @@ Any reference to it will be considered a reference to the first occurrence in th Some XML content will be ignored. No handler defined for XML with namespace "{namespaceURI}". Error while writing an image to the target file.[ Reason: {e}] Temporary file could not be deleted: {tempFile} + Catalog resolver not found along the classpath + Error creating the catalog resolver: {message} fo:leader is set to "use-content" but has no content.{{locator}} Line {line} of a paragraph overflows the available area by {overflowLength,choice,50000#{overflowLength} millipoints|50000<more than 50 points}.{{locator}} The contents of table-row {row} are taller than they should be (there is a block-progression-dimension or height constraint on the indicated row). Due to its contents the row grows to {effCellBPD} millipoints, but the row shouldn't get any taller than {maxCellBPD} millipoints.{{locator}} diff --git a/src/java/org/apache/fop/events/ResourceEventProducer.java b/src/java/org/apache/fop/events/ResourceEventProducer.java index 607d2fab1..3753e83da 100644 --- a/src/java/org/apache/fop/events/ResourceEventProducer.java +++ b/src/java/org/apache/fop/events/ResourceEventProducer.java @@ -133,4 +133,18 @@ public interface ResourceEventProducer extends EventProducer { */ void cannotDeleteTempFile(Object source, File tempFile); + /** + * Catalog Resolver not found along the class path + * @param source the event source + * @event.severity ERROR + */ + void catalogResolverNotFound(Object source); + + /** + * Catalog Resolver not created, due to InstantiationException or IllegalAccessException + * @param source the event source + * @param message the exception message + * @event.severity ERROR + */ + void catalogResolverNotCreated(Object source, String message); } -- cgit v1.2.3 From 34867412683abe42cca05c217b731cfbae31af4d Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Mon, 26 Oct 2009 12:12:25 +0000 Subject: Removed addition of stretching to footnoteSeparatorLength. That was done to the parameter instead of the field, which actually had no effect on the layout, plus it doesn't make sense. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@829761 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java b/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java index 83dea01bf..cab68a13f 100644 --- a/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java +++ b/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java @@ -117,10 +117,6 @@ class PageBreakingAlgorithm extends BreakingAlgorithm { this.layoutListener = layoutListener; best = new BestPageRecords(); this.footnoteSeparatorLength = (MinOptMax) footnoteSeparatorLength.clone(); - // add some stretch, to avoid a restart for every page containing footnotes - if (footnoteSeparatorLength.min == footnoteSeparatorLength.max) { - footnoteSeparatorLength.max += 10000; - } this.autoHeight = autoHeight; this.favorSinglePart = favorSinglePart; } -- cgit v1.2.3 From effdaf0105f31cf8f604de59f9fb5909ff9a8663 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Mon, 26 Oct 2009 12:31:35 +0000 Subject: Removed obsolete configuration for text output git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@829767 13f79535-47bb-0310-9956-ffa450edef68 --- conf/fop.xconf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/conf/fop.xconf b/conf/fop.xconf index 86b72a811..439636049 100644 --- a/conf/fop.xconf +++ b/conf/fop.xconf @@ -443,10 +443,6 @@ the location of this file. --> - - - - -- cgit v1.2.3 -- cgit v1.2.3