aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Adams <gadams@apache.org>2016-03-03 09:40:50 +0000
committerGlenn Adams <gadams@apache.org>2016-03-03 09:40:50 +0000
commit82804d6ffcb68841cd7adf9740469f3a79c372c8 (patch)
tree56071c99c43908ca5966b5b5f9ae86cc7218b792
parentd1b8e7a211319a30f88b2c9258dda8a04ce6d4fc (diff)
parentcc5867eabd94721c89e436d5339c7b8e496775af (diff)
downloadxmlgraphics-fop-82804d6ffcb68841cd7adf9740469f3a79c372c8.tar.gz
xmlgraphics-fop-82804d6ffcb68841cd7adf9740469f3a79c372c8.zip
Merge from ^/xmlgraphics/fop/trunk.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/maven@1733431 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--NOTICE2
-rw-r--r--README17
-rw-r--r--build.xml4
-rw-r--r--lib/xmlgraphics-commons-svn-trunk.jarbin648602 -> 648695 bytes
-rw-r--r--src/java/org/apache/fop/apps/FOUserAgent.java3
-rw-r--r--src/java/org/apache/fop/apps/FopFactory.java7
-rw-r--r--src/java/org/apache/fop/area/BodyRegion.java9
-rw-r--r--src/java/org/apache/fop/area/MainReference.java6
-rw-r--r--src/java/org/apache/fop/fo/FONode.java73
-rw-r--r--src/java/org/apache/fop/fo/FObj.java82
-rw-r--r--src/java/org/apache/fop/fo/FObjMixed.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/AbstractGraphics.java10
-rw-r--r--src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java28
-rw-r--r--src/java/org/apache/fop/fo/pagination/Declarations.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageSequence.java10
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java18
-rw-r--r--src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java17
-rw-r--r--src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java5
-rw-r--r--src/java/org/apache/fop/fo/pagination/Root.java10
-rw-r--r--src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java5
-rw-r--r--src/java/org/apache/fop/fo/pagination/SubSequenceSpecifier.java5
-rw-r--r--src/java/org/apache/fop/layoutmgr/AbstractBreaker.java226
-rw-r--r--src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java8
-rw-r--r--src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java17
-rw-r--r--src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.xml2
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageBreaker.java128
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java8
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageProvider.java35
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java10
-rw-r--r--src/java/org/apache/fop/layoutmgr/table/TableContentPosition.java4
-rw-r--r--src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java2
-rw-r--r--src/java/org/apache/fop/pdf/PDFPattern.java2
-rw-r--r--src/java/org/apache/fop/render/intermediate/IFParser.java2
-rw-r--r--src/java/org/apache/fop/render/pcl/Java2DRendererOption.java3
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java2
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLGenerator.java398
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLImageHandlerGraphics2D.java2
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLImageHandlerRenderedImage.java2
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLPainter.java14
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLRendererConfig.java11
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java4
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLRenderingUtil.java19
-rw-r--r--src/java/org/apache/fop/render/ps/Gradient.java85
-rw-r--r--status.xml2512
-rw-r--r--test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java6
-rw-r--r--test/java/org/apache/fop/pdf/PDFAttachmentTestCase.java61
-rw-r--r--test/java/org/apache/fop/render/pcl/PCLPainterTestCase.java60
-rw-r--r--test/layoutengine/standard-testcases/basic_link_to_last_page.xml2
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_columns.xml69
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_last-page_1.xml58
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_last-page_2.xml54
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_last-page_3.xml55
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_last-page_4.xml56
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_last-page_5.xml99
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_last-page_6.xml64
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_last-page_7.xml154
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_last-page_8.xml70
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_last-page_9.xml70
-rw-r--r--test/layoutengine/standard-testcases/flow_changing-ipd_no-last-page.xml81
-rw-r--r--xmlgraphics-fop-pom-template.pom2
60 files changed, 1991 insertions, 2781 deletions
diff --git a/NOTICE b/NOTICE
index ccd444ffb..2fb1d9fda 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
Apache FOP
-Copyright 1999-2015 The Apache Software Foundation
+Copyright 1999-2016 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
diff --git a/README b/README
index 4151d8bac..13c050bdc 100644
--- a/README
+++ b/README
@@ -93,6 +93,23 @@ http://xmlgraphics.apache.org/fop/stable/running.html
RELEASE NOTES
==============================================================================
+Version 2.1
+===========
+
+Major Changes in Version 2.1
+----------------------------
+
+* Add PreloaderRawPNG to handle images ImageIO cant
+* Support Barcode4J page number
+* Support CMYK JPEG in AFP
+* Support IPD change on last page
+* Support PDF/UA
+* Support TrueType fonts in PCL
+* Support Truetype for AFP
+* Support for PDF/A-3
+
+This release also contains a number of bug fixes.
+
Version 2.0
===========
diff --git a/build.xml b/build.xml
index 0deab0899..cfaa22316 100644
--- a/build.xml
+++ b/build.xml
@@ -151,7 +151,7 @@ list of possible build targets.
<property name="name" value="fop"/>
<property name="NAME" value="FOP"/>
<property name="version" value="svn-trunk"/>
- <property name="year" value="1999-2015"/>
+ <property name="year" value="1999-2016"/>
<property name="javac.debug" value="on"/>
<property name="javac.optimize" value="off"/>
<property name="javac.deprecation" value="on"/>
@@ -160,7 +160,7 @@ list of possible build targets.
<property name="javac.fork" value="no"/>
<property name="junit.fork" value="yes"/>
<property name="junit.haltonfailure" value="off"/>
- <property name="junit.maxmemory" value="256m"/>
+ <property name="junit.maxmemory" value="1024m"/>
<property name="junit.printsummary" value="off"/>
<property name="junit.formatter.brief" value="on"/>
<property name="javadoc.packages" value="org.apache.fop.*"/>
diff --git a/lib/xmlgraphics-commons-svn-trunk.jar b/lib/xmlgraphics-commons-svn-trunk.jar
index 4400ba6ef..5a29ef84c 100644
--- a/lib/xmlgraphics-commons-svn-trunk.jar
+++ b/lib/xmlgraphics-commons-svn-trunk.jar
Binary files differ
diff --git a/src/java/org/apache/fop/apps/FOUserAgent.java b/src/java/org/apache/fop/apps/FOUserAgent.java
index 9e317f9a3..6434ce36e 100644
--- a/src/java/org/apache/fop/apps/FOUserAgent.java
+++ b/src/java/org/apache/fop/apps/FOUserAgent.java
@@ -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;
}
}
diff --git a/src/java/org/apache/fop/apps/FopFactory.java b/src/java/org/apache/fop/apps/FopFactory.java
index 50211d3bc..d9c9708eb 100644
--- a/src/java/org/apache/fop/apps/FopFactory.java
+++ b/src/java/org/apache/fop/apps/FopFactory.java
@@ -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;
- }
}
diff --git a/src/java/org/apache/fop/area/BodyRegion.java b/src/java/org/apache/fop/area/BodyRegion.java
index 89bb206f2..df7e914b7 100644
--- a/src/java/org/apache/fop/area/BodyRegion.java
+++ b/src/java/org/apache/fop/area/BodyRegion.java
@@ -81,6 +81,15 @@ public class BodyRegion extends RegionReference {
return this.columnGap;
}
+ int getContentIPD() {
+ RegionViewport rv = getRegionViewport();
+ return getIPD() - rv.getBorderAndPaddingWidthStart() - rv.getBorderAndPaddingWidthEnd();
+ }
+
+ public int getColumnIPD() {
+ return (getContentIPD() - (columnCount - 1) * columnGap) / columnCount;
+ }
+
/**
* Get the main reference area.
*
diff --git a/src/java/org/apache/fop/area/MainReference.java b/src/java/org/apache/fop/area/MainReference.java
index efc16515d..9778db87f 100644
--- a/src/java/org/apache/fop/area/MainReference.java
+++ b/src/java/org/apache/fop/area/MainReference.java
@@ -59,12 +59,8 @@ public class MainReference extends Area {
//Remove the current one if it is empty
spanAreas.remove(spanAreas.size() - 1);
}
- RegionViewport rv = parent.getRegionViewport();
- int ipdWidth = parent.getIPD()
- - rv.getBorderAndPaddingWidthStart() - rv.getBorderAndPaddingWidthEnd();
-
Span newSpan = new Span(((spanAll) ? 1 : getColumnCount()),
- getColumnGap(), ipdWidth);
+ getColumnGap(), parent.getContentIPD());
spanAreas.add(newSpan);
return getCurrentSpan();
}
diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java
index c2c9940ca..f5eb8854e 100644
--- a/src/java/org/apache/fop/fo/FONode.java
+++ b/src/java/org/apache/fop/fo/FONode.java
@@ -20,7 +20,6 @@
package org.apache.fop.fo;
// Java
-import java.util.Iterator;
import java.util.ListIterator;
import java.util.Map;
import java.util.Stack;
@@ -321,9 +320,9 @@ public abstract class FONode implements Cloneable {
* has been reached.
* The default implementation simply calls {@link #finalizeNode()}, without
* sending any event to the {@link FOEventHandler}.
- * <br/><i>Note: the recommended way to override this method in subclasses is</i>
- * <br/><br/><code>super.endOfNode(); // invoke finalizeNode()
- * <br/>getFOEventHandler().endXXX(); // send endOfNode() notification</code>
+ * <p><i>Note: the recommended way to override this method in subclasses is</i></p>
+ * <p><code>super.endOfNode(); // invoke finalizeNode()</code></p>
+ * <p><code>getFOEventHandler().endXXX(); // send endOfNode() notification</code></p>
*
* @throws FOPException if there's a problem during processing
*/
@@ -622,7 +621,7 @@ public abstract class FONode implements Cloneable {
*
* @param propertyName the name of the property.
* @param propertyValue the value of the property.
- * * @param e optional property parsing exception.
+ * @param e optional property parsing exception.
* @throws ValidationException the validation error provoked by the method call
*/
protected void invalidPropertyValueError(String propertyName, String propertyValue, Exception e)
@@ -936,7 +935,7 @@ public abstract class FONode implements Cloneable {
* @param ranges a stack of delimited text ranges
* @return the (possibly) updated stack of delimited text ranges
*/
- public Stack collectDelimitedTextRanges(Stack<DelimitedTextRange> ranges) {
+ public Stack<DelimitedTextRange> collectDelimitedTextRanges(Stack<DelimitedTextRange> ranges) {
// if boundary before, then push new range
if (isRangeBoundaryBefore()) {
maybeNewRange(ranges);
@@ -965,9 +964,11 @@ public abstract class FONode implements Cloneable {
* @param currentRange the current range or null (if none)
* @return the (possibly) updated stack of delimited text ranges
*/
- protected Stack collectDelimitedTextRanges(Stack<DelimitedTextRange> ranges, DelimitedTextRange currentRange) {
- for (Iterator it = getChildNodes(); (it != null) && it.hasNext();) {
- ranges = ((FONode) it.next()).collectDelimitedTextRanges(ranges);
+ protected Stack<DelimitedTextRange> collectDelimitedTextRanges(
+ Stack<DelimitedTextRange> ranges, DelimitedTextRange currentRange) {
+
+ for (FONodeIterator it = getChildNodes(); (it != null) && it.hasNext();) {
+ ranges = it.next().collectDelimitedTextRanges(ranges);
}
return ranges;
}
@@ -1011,33 +1012,55 @@ public abstract class FONode implements Cloneable {
}
/**
- * Base iterator interface over a FO's children
+ * Base iterator interface over a FO's children, offering three methods on top of the base interface
+ * methods {@see java.util.ListIterator}.
*/
- public interface FONodeIterator extends ListIterator {
+ public interface FONodeIterator extends ListIterator<FONode> {
+
+ /** @return the next node */
+ FONode next();
+
+ /** @return the previous node */
+ FONode previous();
/**
- * Returns the parent node for this iterator's list
- * of child nodes
+ * Replace the node at the current index with the given <code>newNode</code>.
*
- * @return the parent node
+ * @param newNode the new node
*/
- FObj parentNode();
+ void set(FONode newNode);
/**
- * Convenience method with return type of FONode
- * (semantically equivalent to: <code>(FONode) next();</code>)
+ * Add the given <code>newNode</code> at the current position.
*
- * @return the next node (if any), as a type FONode
+ * @param newNode the new node
+ */
+ void add(FONode newNode);
+
+ /** @return <code>true</code> if there is a next node, <code>false</code> otherwise */
+ boolean hasNext();
+
+ /** @return <code>true</code> if there is a previous node, <code>false</code> otherwise */
+ boolean hasPrevious();
+
+ /** @return the current index */
+ int nextIndex();
+
+ /** @return the previous index */
+ int previousIndex();
+
+ /**
+ * Removes the node at the current position.
*/
- FONode nextNode();
+ void remove();
/**
- * Convenience method with return type of FONode
- * (semantically equivalent to: <code>(FONode) previous();</code>)
+ * Returns the parent node for this iterator's list
+ * of child nodes
*
- * @return the previous node (if any), as a type FONode
+ * @return the parent node
*/
- FONode previousNode();
+ FObj parent();
/**
* Returns the first node in the list, and decreases the index,
@@ -1046,7 +1069,7 @@ public abstract class FONode implements Cloneable {
*
* @return the first node in the list
*/
- FONode firstNode();
+ FONode first();
/**
* Returns the last node in the list, and advances the
@@ -1055,7 +1078,7 @@ public abstract class FONode implements Cloneable {
*
* @return the last node in the list
*/
- FONode lastNode();
+ FONode last();
}
diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java
index a649bfe6f..ce983dfb2 100644
--- a/src/java/org/apache/fop/fo/FObj.java
+++ b/src/java/org/apache/fop/fo/FObj.java
@@ -21,9 +21,7 @@ package org.apache.fop.fo;
import java.util.Collections;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
-import java.util.ListIterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
@@ -37,7 +35,6 @@ import org.apache.xmlgraphics.util.QName;
import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.extensions.ExtensionAttachment;
import org.apache.fop.fo.flow.Marker;
-import org.apache.fop.fo.flow.table.TableCell;
import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.PropertyMaker;
@@ -198,7 +195,7 @@ public abstract class FObj extends FONode implements Constants {
*/
private void checkId(String id) throws ValidationException {
if (!inMarker() && !id.equals("")) {
- Set idrefs = getBuilderContext().getIDReferences();
+ Set<String> idrefs = getBuilderContext().getIDReferences();
if (!idrefs.contains(id)) {
idrefs.add(id);
} else {
@@ -270,7 +267,7 @@ public abstract class FObj extends FONode implements Constants {
if (firstChild != null) {
firstChild.siblings[0] = null;
}
- } else {
+ } else if (child.siblings != null) {
FONode prevChild = child.siblings[0];
prevChild.siblings[1] = nextChild;
if (nextChild != null) {
@@ -328,7 +325,7 @@ public abstract class FObj extends FONode implements Constants {
* at the passed-in node (= first call to iterator.next() will
* return childNode)
* @param childNode First node in the iterator
- * @return A ListIterator or null if childNode isn't a child of
+ * @return A FONodeIterator or null if childNode isn't a child of
* this FObj.
*/
public FONodeIterator getChildNodes(FONode childNode) {
@@ -338,7 +335,7 @@ public abstract class FObj extends FONode implements Constants {
return it;
} else {
while (it.hasNext()
- && it.nextNode().siblings[1] != childNode) {
+ && it.next().siblings[1] != childNode) {
//nop
}
if (it.hasNext()) {
@@ -373,8 +370,8 @@ public abstract class FObj extends FONode implements Constants {
String mcname = marker.getMarkerClassName();
if (firstChild != null) {
// check for empty childNodes
- for (Iterator iter = getChildNodes(); iter.hasNext();) {
- FONode node = (FONode) iter.next();
+ for (FONodeIterator iter = getChildNodes(); iter.hasNext();) {
+ FONode node = iter.next();
if (node instanceof FObj
|| (node instanceof FOText
&& ((FOText) node).willCreateArea())) {
@@ -414,7 +411,7 @@ public abstract class FObj extends FONode implements Constants {
/** {@inheritDoc} */
protected String getContextInfoAlt() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (getLocalName() != null) {
sb.append(getName());
sb.append(", ");
@@ -444,13 +441,13 @@ public abstract class FObj extends FONode implements Constants {
if (getLocator() != null) {
return super.gatherContextInfo();
} else {
- ListIterator iter = getChildNodes();
+ FONodeIterator iter = getChildNodes();
if (iter == null) {
return null;
}
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
while (iter.hasNext()) {
- FONode node = (FONode) iter.next();
+ FONode node = iter.next();
String s = node.gatherContextInfo();
if (s != null) {
if (sb.length() > 0) {
@@ -466,7 +463,7 @@ public abstract class FObj extends FONode implements Constants {
/**
* Convenience method for validity checking. Checks if the
* incoming node is a member of the "%block;" parameter entity
- * as defined in Sect. 6.2 of the XSL 1.0 & 1.1 Recommendations
+ * as defined in Sect. 6.2 of the XSL 1.0 &amp; 1.1 Recommendations
*
* @param nsURI namespace URI of incoming node
* @param lName local name (i.e., no prefix) of incoming node
@@ -486,7 +483,7 @@ public abstract class FObj extends FONode implements Constants {
/**
* Convenience method for validity checking. Checks if the
* incoming node is a member of the "%inline;" parameter entity
- * as defined in Sect. 6.2 of the XSL 1.0 & 1.1 Recommendations
+ * as defined in Sect. 6.2 of the XSL 1.0 &amp; 1.1 Recommendations
*
* @param nsURI namespace URI of incoming node
* @param lName local name (i.e., no prefix) of incoming node
@@ -528,7 +525,7 @@ public abstract class FObj extends FONode implements Constants {
/**
* Convenience method for validity checking. Checks if the
* incoming node is a member of the neutral item list
- * as defined in Sect. 6.2 of the XSL 1.0 & 1.1 Recommendations
+ * as defined in Sect. 6.2 of the XSL 1.0 &amp; 1.1 Recommendations
* @param nsURI namespace URI of incoming node
* @param lName local name (i.e., no prefix) of incoming node
* @return true if a member, false if not
@@ -554,11 +551,6 @@ public abstract class FObj extends FONode implements Constants {
int found = 1;
FONode temp = getParent();
while (temp != null) {
- if (temp instanceof TableCell && (ancestorID == FO_TABLE_HEADER || ancestorID == FO_TABLE_FOOTER)) {
- // note that if the retrieve-table-marker is not in a table-header/footer an exception is
- // thrown, so no need to reset this flag in that case
- ((TableCell) temp).flagAsHavingRetrieveTableMarker();
- }
if (temp.getNameId() == ancestorID) {
return found;
}
@@ -619,16 +611,16 @@ public abstract class FObj extends FONode implements Constants {
* @param bidiLevel a non-negative bidi embedding level
*/
public void setBidiLevel(int bidiLevel) {
+
assert bidiLevel >= 0;
- if (bidiLevel >= 0) {
- if ((this.bidiLevel < 0) || (bidiLevel < this.bidiLevel)) {
- this.bidiLevel = bidiLevel;
- if ((parent != null) && !isBidiPropagationBoundary()) {
- FObj foParent = (FObj) parent;
- int parentBidiLevel = foParent.getBidiLevel();
- if ((parentBidiLevel < 0) || (bidiLevel < parentBidiLevel)) {
- foParent.setBidiLevel(bidiLevel);
- }
+
+ if ((this.bidiLevel < 0) || (bidiLevel < this.bidiLevel)) {
+ this.bidiLevel = bidiLevel;
+ if ((parent != null) && !isBidiPropagationBoundary()) {
+ FObj foParent = (FObj) parent;
+ int parentBidiLevel = foParent.getBidiLevel();
+ if ((parentBidiLevel < 0) || (bidiLevel < parentBidiLevel)) {
+ foParent.setBidiLevel(bidiLevel);
}
}
}
@@ -765,12 +757,12 @@ public abstract class FObj extends FONode implements Constants {
}
/** {@inheritDoc} */
- public FObj parentNode() {
+ public FObj parent() {
return parentNode;
}
/** {@inheritDoc} */
- public Object next() {
+ public FONode next() {
if (currentNode != null) {
if (currentIndex != 0) {
if (currentNode.siblings != null
@@ -789,7 +781,7 @@ public abstract class FObj extends FONode implements Constants {
}
/** {@inheritDoc} */
- public Object previous() {
+ public FONode previous() {
if (currentNode.siblings != null
&& currentNode.siblings[0] != null) {
currentIndex--;
@@ -802,9 +794,8 @@ public abstract class FObj extends FONode implements Constants {
}
/** {@inheritDoc} */
- public void set(Object o) {
+ public void set(FONode newNode) {
if ((flags & F_SET_ALLOWED) == F_SET_ALLOWED) {
- FONode newNode = (FONode) o;
if (currentNode == parentNode.firstChild) {
parentNode.firstChild = newNode;
} else {
@@ -823,8 +814,7 @@ public abstract class FObj extends FONode implements Constants {
}
/** {@inheritDoc} */
- public void add(Object o) {
- FONode newNode = (FONode) o;
+ public void add(FONode newNode) {
if (currentIndex == -1) {
if (currentNode != null) {
FONode.attachSiblings(newNode, currentNode);
@@ -838,9 +828,9 @@ public abstract class FObj extends FONode implements Constants {
} else {
if (currentNode.siblings != null
&& currentNode.siblings[1] != null) {
- FONode.attachSiblings((FONode) o, currentNode.siblings[1]);
+ FONode.attachSiblings(newNode, currentNode.siblings[1]);
}
- FONode.attachSiblings(currentNode, (FONode) o);
+ FONode.attachSiblings(currentNode, newNode);
if (currentNode == parentNode.lastChild) {
parentNode.lastChild = newNode;
}
@@ -894,7 +884,7 @@ public abstract class FObj extends FONode implements Constants {
}
/** {@inheritDoc} */
- public FONode lastNode() {
+ public FONode last() {
while (currentNode != null
&& currentNode.siblings != null
&& currentNode.siblings[1] != null) {
@@ -905,20 +895,10 @@ public abstract class FObj extends FONode implements Constants {
}
/** {@inheritDoc} */
- public FONode firstNode() {
+ public FONode first() {
currentNode = parentNode.firstChild;
currentIndex = 0;
return currentNode;
}
-
- /** {@inheritDoc} */
- public FONode nextNode() {
- return (FONode) next();
- }
-
- /** {@inheritDoc} */
- public FONode previousNode() {
- return (FONode) previous();
- }
}
}
diff --git a/src/java/org/apache/fop/fo/FObjMixed.java b/src/java/org/apache/fop/fo/FObjMixed.java
index f66b095b1..6d712c9ce 100644
--- a/src/java/org/apache/fop/fo/FObjMixed.java
+++ b/src/java/org/apache/fop/fo/FObjMixed.java
@@ -149,7 +149,7 @@ public abstract class FObjMixed extends FObj {
= this.getChildNodes(this.currentTextNode);
FONode node;
while (nodeIter.hasNext()) {
- node = nodeIter.nextNode();
+ node = nodeIter.next();
assert (node instanceof FOText
|| node.getNameId() == FO_CHARACTER);
if (node.getNameId() == FO_CHARACTER) {
diff --git a/src/java/org/apache/fop/fo/flow/AbstractGraphics.java b/src/java/org/apache/fop/fo/flow/AbstractGraphics.java
index 34bf83fb4..9f56abb43 100644
--- a/src/java/org/apache/fop/fo/flow/AbstractGraphics.java
+++ b/src/java/org/apache/fop/fo/flow/AbstractGraphics.java
@@ -61,7 +61,6 @@ public abstract class AbstractGraphics extends FObj
private int displayAlign;
private int dominantBaseline;
private Length height;
- private String id;
private LengthRangeProperty inlineProgressionDimension;
private KeepProperty keepWithNext;
private KeepProperty keepWithPrevious;
@@ -92,6 +91,7 @@ public abstract class AbstractGraphics extends FObj
/** {@inheritDoc} */
public void bind(PropertyList pList) throws FOPException {
+ super.bind(pList);
commonAccessibility = CommonAccessibility.getInstance(pList);
commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
@@ -104,7 +104,6 @@ public abstract class AbstractGraphics extends FObj
displayAlign = pList.get(PR_DISPLAY_ALIGN).getEnum();
dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
height = pList.get(PR_HEIGHT).getLength();
- id = pList.get(PR_ID).getString();
inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
@@ -126,13 +125,6 @@ public abstract class AbstractGraphics extends FObj
return commonAccessibility;
}
- /**
- * @return the "id" property.
- */
- public String getId() {
- return id;
- }
-
/** @return the {@link CommonBorderPaddingBackground} */
public CommonBorderPaddingBackground getCommonBorderPaddingBackground() {
return commonBorderPaddingBackground;
diff --git a/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java b/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java
index 57ae9e7bb..8340736c7 100644
--- a/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java
+++ b/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java
@@ -25,6 +25,7 @@ import org.xml.sax.Locator;
import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.PropertyList;
+import org.apache.fop.fo.flow.table.TableCell;
/**
* Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_retrieve-table-marker">
@@ -81,6 +82,33 @@ public class RetrieveTableMarker extends AbstractRetrieveMarker {
}
/**
+ * Overridden to flag the ancestor table-cell.
+ *
+ * @param ancestorID ID of node name to check for (e.g., FO_ROOT)
+ * @return number of levels above FO where ancestor exists,
+ * -1 if not found
+ */
+ @Override
+ protected int findAncestor(int ancestorID) {
+ int found = 1;
+ FONode temp = getParent();
+ while (temp != null) {
+ if (temp instanceof TableCell
+ && (ancestorID == FO_TABLE_HEADER || ancestorID == FO_TABLE_FOOTER)) {
+ // note that if the retrieve-table-marker is not in a table-header/footer an exception is
+ // thrown, so no need to reset this flag in that case
+ ((TableCell) temp).flagAsHavingRetrieveTableMarker();
+ }
+ if (temp.getNameId() == ancestorID) {
+ return found;
+ }
+ found += 1;
+ temp = temp.getParent();
+ }
+ return -1;
+ }
+
+ /**
* Return the value for the <code>retrieve-position-within-table</code>
* property
* @return the value for retrieve-position-within-table; one of
diff --git a/src/java/org/apache/fop/fo/pagination/Declarations.java b/src/java/org/apache/fop/fo/pagination/Declarations.java
index 33c688921..be1ec13e2 100644
--- a/src/java/org/apache/fop/fo/pagination/Declarations.java
+++ b/src/java/org/apache/fop/fo/pagination/Declarations.java
@@ -78,7 +78,7 @@ public class Declarations extends FObj {
public void endOfNode() throws FOPException {
if (firstChild != null) {
for (FONodeIterator iter = getChildNodes(); iter.hasNext();) {
- FONode node = iter.nextNode();
+ FONode node = iter.next();
if (node.getName().equals("fo:color-profile")) {
ColorProfile cp = (ColorProfile)node;
if (!"".equals(cp.getColorProfileName())) {
diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java
index 6afd15e81..a1a966e90 100644
--- a/src/java/org/apache/fop/fo/pagination/PageSequence.java
+++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java
@@ -454,4 +454,14 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra
this.flowMap.clear();
}
+ public SimplePageMaster getLastSimplePageMaster(int page, boolean isFirstPage, boolean isBlank) {
+ boolean isOddPage = ((page % 2) != 0); // please findbugs...
+ log.debug("getNextSimplePageMaster(page=" + page + " isOdd=" + isOddPage + " isFirst="
+ + isFirstPage + " isLast=true" + " isBlank=" + isBlank + ")");
+ if (pageSequenceMaster == null) {
+ return simplePageMaster;
+ }
+ return pageSequenceMaster.getLastSimplePageMaster(isOddPage, isFirstPage, isBlank, getMainFlow()
+ .getFlowName());
+ }
}
diff --git a/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java b/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
index 86d5ff663..f218e43b4 100644
--- a/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
+++ b/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java
@@ -254,6 +254,24 @@ public class PageSequenceMaster extends FObj {
return FO_PAGE_SEQUENCE_MASTER;
}
+ public SimplePageMaster getLastSimplePageMaster(boolean isOddPage, boolean isFirstPage, boolean isBlank,
+ String flowName) {
+ if (currentSubSequence == null) {
+ currentSubSequence = getNextSubSequence();
+ if (currentSubSequence == null) {
+ blockLevelEventProducer.missingSubsequencesInPageSequenceMaster(this, masterName,
+ getLocator());
+ }
+ if (currentSubSequence.isInfinite() && !currentSubSequence.canProcess(flowName)) {
+ throw new PageProductionException(
+ "The current sub-sequence will not terminate whilst processing the main flow");
+ }
+ }
+
+ SimplePageMaster pageMaster = currentSubSequence.getLastPageMaster(isOddPage, isFirstPage, isBlank,
+ blockLevelEventProducer);
+ return pageMaster;
+ }
}
diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
index dc69c600d..2914fb9a8 100644
--- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
+++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
@@ -31,6 +31,7 @@ import org.apache.fop.fo.FObj;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.ValidationException;
import org.apache.fop.fo.properties.Property;
+import org.apache.fop.layoutmgr.BlockLevelEventProducer;
/**
* Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_repeatable-page-master-alternatives">
@@ -136,6 +137,22 @@ public class RepeatablePageMasterAlternatives extends FObj
return null;
}
+ public SimplePageMaster getLastPageMaster(boolean isOddPage, boolean isFirstPage, boolean isBlankPage,
+ BlockLevelEventProducer blockLevelEventProducer) {
+ for (ConditionalPageMasterReference cpmr : conditionalPageMasterRefs) {
+ if (cpmr.isValid(isOddPage, isFirstPage, true, isBlankPage)) {
+ return cpmr.getMaster();
+ }
+ }
+ blockLevelEventProducer.lastPageMasterReferenceMissing(this, getLocator());
+ for (ConditionalPageMasterReference cpmr : conditionalPageMasterRefs) {
+ if (cpmr.isValid(isOddPage, isFirstPage, false, isBlankPage)) {
+ return cpmr.getMaster();
+ }
+ }
+ throw new PageProductionException("Last page master not found: oddpage=" + isOddPage
+ + " firstpage=" + isFirstPage + " blankpage=" + isBlankPage);
+ }
/**
* Adds a new conditional page master reference.
diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
index f6d41ce8b..5e43c02b1 100644
--- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
+++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java
@@ -101,6 +101,11 @@ public class RepeatablePageMasterReference extends FObj
return master;
}
+ public SimplePageMaster getLastPageMaster(boolean isOddPage, boolean isFirstPage, boolean isEmptyPage,
+ BlockLevelEventProducer blockLevelEventProducer) {
+ return getNextPageMaster(isOddPage, isFirstPage, true, isEmptyPage);
+ }
+
/**
* Get the value of the <code>maximum-repeats</code> property.
* @return the "maximum-repeats" property
diff --git a/src/java/org/apache/fop/fo/pagination/Root.java b/src/java/org/apache/fop/fo/pagination/Root.java
index cb433a064..51309a65d 100644
--- a/src/java/org/apache/fop/fo/pagination/Root.java
+++ b/src/java/org/apache/fop/fo/pagination/Root.java
@@ -75,6 +75,16 @@ public class Root extends FObj implements CommonAccessibilityHolder {
*/
private FOEventHandler foEventHandler;
+ private PageSequence lastSeq;
+
+ public void setLastSeq(PageSequence seq) {
+ lastSeq = seq;
+ }
+
+ public PageSequence getLastSeq() {
+ return lastSeq;
+ }
+
/**
* Base constructor
*
diff --git a/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java b/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java
index ed0c041dd..2600909cb 100644
--- a/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java
+++ b/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java
@@ -100,6 +100,11 @@ public class SinglePageMasterReference extends FObj
}
}
+ public SimplePageMaster getLastPageMaster(boolean isOddPage, boolean isFirstPage, boolean isBlankPage,
+ BlockLevelEventProducer blockLevelEventProducer) {
+ return getNextPageMaster(isOddPage, isFirstPage, true, isBlankPage);
+ }
+
/** {@inheritDoc} */
public void reset() {
this.state = FIRST;
diff --git a/src/java/org/apache/fop/fo/pagination/SubSequenceSpecifier.java b/src/java/org/apache/fop/fo/pagination/SubSequenceSpecifier.java
index 271d80a95..0905ee8a8 100644
--- a/src/java/org/apache/fop/fo/pagination/SubSequenceSpecifier.java
+++ b/src/java/org/apache/fop/fo/pagination/SubSequenceSpecifier.java
@@ -20,6 +20,7 @@
package org.apache.fop.fo.pagination;
import org.apache.fop.fo.ValidationException;
+import org.apache.fop.layoutmgr.BlockLevelEventProducer;
/**
* Classes that implement this interface can be added to a {@link PageSequenceMaster},
@@ -43,6 +44,10 @@ public interface SubSequenceSpecifier {
boolean isBlankPage)
throws PageProductionException;
+ SimplePageMaster getLastPageMaster(boolean isOddPage, boolean isFirstPage, boolean isBlankPage,
+ BlockLevelEventProducer blockLevelEventProducer)
+ throws PageProductionException;
+
/**
* Called before a new page sequence is rendered so subsequences can reset
* any state they keep during the formatting process.
diff --git a/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java b/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
index e1c6b3a74..d0594ce8a 100644
--- a/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
+++ b/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
@@ -42,6 +42,10 @@ public abstract class AbstractBreaker {
/** logging instance */
protected static final Log log = LogFactory.getLog(AbstractBreaker.class);
+ private LayoutManager originalRestartAtLM;
+ private Position positionAtBreak;
+ private List firstElementsForRestart;
+
/**
* A page break position.
*/
@@ -408,17 +412,36 @@ public abstract class AbstractBreaker {
alg.setConstantLineWidth(flowBPD);
int optimalPageCount = alg.findBreakingPoints(blockList, 1, true,
BreakingAlgorithm.ALL_BREAKS);
-
+ boolean ipdChangesOnNextPage = (alg.getIPDdifference() != 0);
+ boolean onLastPageAndIPDChanges = false;
+ if (!ipdChangesOnNextPage) {
+ onLastPageAndIPDChanges = (lastPageHasIPDChange() && !thereIsANonRestartableLM(alg)
+ && (shouldRedoLayout() || (wasLayoutRedone() && optimalPageCount > 1)));
+ }
if (alg.handlingFloat()) {
nextSequenceStartsOn = handleFloatLayout(alg, optimalPageCount, blockList, childLC);
- } else if (Math.abs(alg.getIPDdifference()) > 1) {
- addAreas(alg, optimalPageCount, blockList, blockList);
- // *** redo Phase 1 ***
- log.trace("IPD changes after page " + optimalPageCount);
+ } else if (ipdChangesOnNextPage || onLastPageAndIPDChanges) {
+ boolean visitedBefore = false;
+ if (onLastPageAndIPDChanges) {
+ visitedBefore = wasLayoutRedone();
+ prepareToRedoLayout(alg, optimalPageCount, blockList, blockList);
+ }
+
+ firstElementsForRestart = null;
+ LayoutManager restartAtLM = getRestartAtLM(alg, ipdChangesOnNextPage, onLastPageAndIPDChanges,
+ visitedBefore, blockList, 1);
+ if (restartAtLM == null) {
+ firstElementsForRestart = null;
+ restartAtLM = getRestartAtLM(alg, ipdChangesOnNextPage, onLastPageAndIPDChanges,
+ visitedBefore, blockList, 0);
+ }
+ if (ipdChangesOnNextPage) {
+ addAreas(alg, optimalPageCount, blockList, blockList);
+ }
blockLists.clear();
- nextSequenceStartsOn = getNextBlockListChangedIPD(childLC, alg,
- blockList);
blockListIndex = -1;
+ nextSequenceStartsOn = getNextBlockList(childLC, Constants.EN_COLUMN, positionAtBreak,
+ restartAtLM, firstElementsForRestart);
} else {
log.debug("PLM> optimalPageCount= " + optimalPageCount
+ " pageBreaks.size()= " + alg.getPageBreaks().size());
@@ -433,6 +456,92 @@ public abstract class AbstractBreaker {
blockLists = null;
}
+ private LayoutManager getRestartAtLM(PageBreakingAlgorithm alg, boolean ipdChangesOnNextPage,
+ boolean onLastPageAndIPDChanges, boolean visitedBefore,
+ BlockSequence blockList, int start) {
+ KnuthNode optimalBreak = ipdChangesOnNextPage ? alg.getBestNodeBeforeIPDChange() : alg
+ .getBestNodeForLastPage();
+ if (onLastPageAndIPDChanges && visitedBefore && this.originalRestartAtLM == null) {
+ optimalBreak = null;
+ }
+
+ int positionIndex = (optimalBreak != null) ? optimalBreak.position : start;
+ KnuthElement elementAtBreak = alg.getElement(positionIndex);
+ if (elementAtBreak.getPosition() == null) {
+ elementAtBreak = alg.getElement(0);
+ }
+ positionAtBreak = elementAtBreak.getPosition();
+ /* Retrieve the original position wrapped into this space position */
+ positionAtBreak = positionAtBreak.getPosition();
+ if (ipdChangesOnNextPage || (positionAtBreak != null && positionAtBreak.getIndex() > -1)) {
+ firstElementsForRestart = Collections.EMPTY_LIST;
+ if (ipdChangesOnNextPage) {
+ if (containsNonRestartableLM(positionAtBreak)) {
+ if (alg.getIPDdifference() > 0) {
+ EventBroadcaster eventBroadcaster = getCurrentChildLM().getFObj()
+ .getUserAgent().getEventBroadcaster();
+ BlockLevelEventProducer eventProducer = BlockLevelEventProducer.Provider
+ .get(eventBroadcaster);
+ eventProducer.nonRestartableContentFlowingToNarrowerPage(this);
+ }
+ firstElementsForRestart = new LinkedList();
+ boolean boxFound = false;
+ Iterator iter = blockList.listIterator(positionIndex + 1);
+ Position position = null;
+ while (iter.hasNext()
+ && (position == null || containsNonRestartableLM(position))) {
+ positionIndex++;
+ KnuthElement element = (KnuthElement) iter.next();
+ position = element.getPosition();
+ if (element.isBox()) {
+ boxFound = true;
+ firstElementsForRestart.add(element);
+ } else if (boxFound) {
+ firstElementsForRestart.add(element);
+ }
+ }
+ if (position instanceof SpaceResolver.SpaceHandlingBreakPosition) {
+ /* Retrieve the original position wrapped into this space position */
+ positionAtBreak = position.getPosition();
+ } else {
+ positionAtBreak = null;
+ }
+ }
+ }
+ }
+ LayoutManager restartAtLM = null;
+ if (ipdChangesOnNextPage || !(positionAtBreak != null && positionAtBreak.getIndex() > -1)) {
+ if (positionAtBreak != null && positionAtBreak.getIndex() == -1) {
+ Position position;
+ Iterator iter = blockList.listIterator(positionIndex + 1);
+ do {
+ KnuthElement nextElement = (KnuthElement) iter.next();
+ position = nextElement.getPosition();
+ } while (position == null
+ || position instanceof SpaceResolver.SpaceHandlingPosition
+ || position instanceof SpaceResolver.SpaceHandlingBreakPosition
+ && position.getPosition().getIndex() == -1);
+ LayoutManager surroundingLM = positionAtBreak.getLM();
+ while (position.getLM() != surroundingLM) {
+ position = position.getPosition();
+ }
+ restartAtLM = position.getPosition().getLM();
+ }
+ if (onLastPageAndIPDChanges && restartAtLM != null) {
+ if (originalRestartAtLM == null) {
+ originalRestartAtLM = restartAtLM;
+ } else {
+ restartAtLM = originalRestartAtLM;
+ }
+ firstElementsForRestart = Collections.EMPTY_LIST;
+ }
+ }
+ if (onLastPageAndIPDChanges && !visitedBefore && positionAtBreak.getPosition() != null) {
+ restartAtLM = positionAtBreak.getPosition().getLM();
+ }
+ return restartAtLM;
+ }
+
/**
* Returns {@code true} if the given position or one of its descendants
* corresponds to a non-restartable LM.
@@ -709,84 +818,39 @@ public abstract class AbstractBreaker {
return nextSequenceStartsOn;
}
- /**
- * @param childLC LayoutContext to use
- * @param alg the pagebreaking algorithm
- * @param effectiveList the list of Knuth elements to be reused
- * @return the page on which the next content should appear after a hard break
- */
- private int getNextBlockListChangedIPD(LayoutContext childLC, PageBreakingAlgorithm alg,
- BlockSequence effectiveList) {
- int nextSequenceStartsOn;
- KnuthNode optimalBreak = alg.getBestNodeBeforeIPDChange();
- int positionIndex = optimalBreak.position;
- log.trace("IPD changes at index " + positionIndex);
- KnuthElement elementAtBreak = alg.getElement(positionIndex);
- Position positionAtBreak = elementAtBreak.getPosition();
- if (!(positionAtBreak instanceof SpaceResolver.SpaceHandlingBreakPosition)) {
- throw new UnsupportedOperationException(
- "Don't know how to restart at position " + positionAtBreak);
- }
- /* Retrieve the original position wrapped into this space position */
- positionAtBreak = positionAtBreak.getPosition();
- LayoutManager restartAtLM = null;
- List<KnuthElement> firstElements = Collections.emptyList();
- if (containsNonRestartableLM(positionAtBreak)) {
- if (alg.getIPDdifference() > 0) {
- EventBroadcaster eventBroadcaster = getCurrentChildLM().getFObj()
- .getUserAgent().getEventBroadcaster();
- BlockLevelEventProducer eventProducer
- = BlockLevelEventProducer.Provider.get(eventBroadcaster);
- eventProducer.nonRestartableContentFlowingToNarrowerPage(this);
- }
- firstElements = new LinkedList<KnuthElement>();
- boolean boxFound = false;
- Iterator<KnuthElement> iter = effectiveList.listIterator(positionIndex + 1);
- Position position = null;
- while (iter.hasNext()
- && (position == null || containsNonRestartableLM(position))) {
- positionIndex++;
- KnuthElement element = iter.next();
- position = element.getPosition();
- if (element.isBox()) {
- boxFound = true;
- firstElements.add(element);
- } else if (boxFound) {
- firstElements.add(element);
- }
- }
- if (position instanceof SpaceResolver.SpaceHandlingBreakPosition) {
- /* Retrieve the original position wrapped into this space position */
- positionAtBreak = position.getPosition();
- } else {
- positionAtBreak = null;
+ protected boolean shouldRedoLayout() {
+ return false;
+ }
+
+ protected void prepareToRedoLayout(PageBreakingAlgorithm alg, int partCount,
+ BlockSequence originalList, BlockSequence effectiveList) {
+ return;
+ }
+
+ protected boolean wasLayoutRedone() {
+ return false;
+ }
+
+ private boolean thereIsANonRestartableLM(PageBreakingAlgorithm alg) {
+ KnuthNode optimalBreak = alg.getBestNodeForLastPage();
+ if (optimalBreak != null) {
+ int positionIndex = optimalBreak.position;
+ KnuthElement elementAtBreak = alg.getElement(positionIndex);
+ Position positionAtBreak = elementAtBreak.getPosition();
+ if (!(positionAtBreak instanceof SpaceResolver.SpaceHandlingBreakPosition)) {
+ return false;
}
- }
- if (positionAtBreak != null && positionAtBreak.getIndex() == -1) {
- /*
- * This is an indication that we are between two blocks
- * (possibly surrounded by another block), not inside a
- * paragraph.
- */
- Position position;
- Iterator<KnuthElement> iter = effectiveList.listIterator(positionIndex + 1);
- do {
- KnuthElement nextElement = iter.next();
- position = nextElement.getPosition();
- } while (position == null
- || position instanceof SpaceResolver.SpaceHandlingPosition
- || position instanceof SpaceResolver.SpaceHandlingBreakPosition
- && position.getPosition().getIndex() == -1);
- LayoutManager surroundingLM = positionAtBreak.getLM();
- while (position.getLM() != surroundingLM) {
- position = position.getPosition();
+ /* Retrieve the original position wrapped into this space position */
+ positionAtBreak = positionAtBreak.getPosition();
+ if (positionAtBreak != null && containsNonRestartableLM(positionAtBreak)) {
+ return true;
}
- restartAtLM = position.getPosition().getLM();
}
+ return false;
+ }
- nextSequenceStartsOn = getNextBlockList(childLC, Constants.EN_COLUMN,
- positionAtBreak, restartAtLM, firstElements);
- return nextSequenceStartsOn;
+ protected boolean lastPageHasIPDChange() {
+ return false;
}
protected int handleFloatLayout(PageBreakingAlgorithm alg, int optimalPageCount, BlockSequence blockList,
diff --git a/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java
index 7faa0565e..8435ad093 100644
--- a/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java
@@ -383,6 +383,11 @@ public abstract class AbstractPageSequenceLayoutManager extends AbstractLayoutMa
if (curPage != null) {
finishPage();
}
+
+ while (forcePageCount != Constants.EN_NO_FORCE && getCurrentPageNum() < getLastPageNumber()) {
+ curPage = makeNewPage(true);
+ finishPage();
+ }
}
/** {@inheritDoc} */
@@ -390,4 +395,7 @@ public abstract class AbstractPageSequenceLayoutManager extends AbstractLayoutMa
throw new IllegalStateException();
}
+ protected int getLastPageNumber() {
+ return currentPageNum;
+ }
}
diff --git a/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java b/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java
index 6a407f266..d043456be 100644
--- a/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java
+++ b/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java
@@ -202,4 +202,21 @@ public interface BlockLevelEventProducer extends EventProducer {
* @event.severity WARN
*/
void nonRestartableContentFlowingToNarrowerPage(Object source);
+
+ /**
+ * A feasible layout has reached the given number of parts (columns or pages).
+ *
+ * @param source the event source
+ * @param partCount the number of parts that the layout has reached
+ * @event.severity INFO
+ */
+ void layoutHasReachedParts(Object source, int partCount);
+
+ /**
+ * Last page master reference missing.
+ *
+ * @param source the event source
+ * @event.severity WARN
+ */
+ void lastPageMasterReferenceMissing(Object source, Locator loc);
}
diff --git a/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.xml b/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.xml
index 6eb772db1..de040bdfe 100644
--- a/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.xml
+++ b/src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.xml
@@ -31,4 +31,6 @@
<message key="missingSubsequencesInPageSequenceMaster">No subsequences in page-sequence-master "{pageSequenceMasterName}".{{locator}}</message>
<message key="noMatchingPageMaster">No simple-page-master matching "{pageMasterName}" in page-sequence-master "{pageSequenceMasterName}".{{locator}}</message>
<message key="nonRestartableContentFlowingToNarrowerPage">Content that cannot handle IPD changes is flowing to a narrower page. Part of it may be clipped by the page border.</message>
+ <message key="layoutHasReachedParts">A layout has reached {partCount} part(s).</message>
+ <message key="lastPageMasterReferenceMissing">page-position="last" master reference missing.{{locator}}</message>
</catalogue>
diff --git a/src/java/org/apache/fop/layoutmgr/PageBreaker.java b/src/java/org/apache/fop/layoutmgr/PageBreaker.java
index ba676ab89..8cc9db790 100644
--- a/src/java/org/apache/fop/layoutmgr/PageBreaker.java
+++ b/src/java/org/apache/fop/layoutmgr/PageBreaker.java
@@ -51,6 +51,8 @@ public class PageBreaker extends AbstractBreaker {
private PageProvider pageProvider;
private Block separatorArea;
private boolean spanAllActive;
+ private boolean layoutRedone;
+ private int previousIndex;
private boolean handlingStartOfFloat;
private boolean handlingEndOfFloat;
private int floatHeight;
@@ -161,7 +163,7 @@ public class PageBreaker extends AbstractBreaker {
/** {@inheritDoc} */
protected int getNextBlockList(LayoutContext childLC, int nextSequenceStartsOn,
Position positionAtIPDChange, LayoutManager restartLM, List firstElements) {
- if (!handlingFloat()) {
+ if (!layoutRedone && !handlingFloat()) {
if (!firstPart) {
// if this is the first page that will be created by
// the current BlockSequence, it could have a break
@@ -330,21 +332,55 @@ public class PageBreaker extends AbstractBreaker {
return;
}
- boolean lastPageMasterDefined = pslm.getPageSequence().hasPagePositionLast()
- || pslm.getPageSequence().hasPagePositionOnly() && pslm.isOnFirstPage(partCount - 1);
- if (!hasMoreContent()) {
- //last part is reached
- if (lastPageMasterDefined) {
- //last-page condition
- redoLayout(alg, partCount, originalList, effectiveList);
- return;
- }
+ if (shouldRedoLayout(partCount)) {
+ redoLayout(alg, partCount, originalList, effectiveList);
+ return;
}
//nothing special: just add the areas now
addAreas(alg, partCount, originalList, effectiveList);
}
+ protected void prepareToRedoLayout(PageBreakingAlgorithm alg, int partCount,
+ BlockSequence originalList,
+ BlockSequence effectiveList) {
+ int newStartPos = 0;
+ int restartPoint = pageProvider.getStartingPartIndexForLastPage(partCount);
+ if (restartPoint > 0 && !layoutRedone) {
+ // Add definitive areas for the parts before the
+ // restarting point
+ addAreas(alg, restartPoint, originalList, effectiveList);
+ // Get page break from which we restart
+ PageBreakPosition pbp = alg.getPageBreaks().get(restartPoint - 1);
+ newStartPos = alg.par.getFirstBoxIndex(pbp.getLeafPos() + 1);
+ // Handle page break right here to avoid any side-effects
+ if (newStartPos > 0) {
+ handleBreakTrait(Constants.EN_PAGE);
+ }
+ }
+ pageBreakHandled = true;
+ // Update so the available BPD is reported correctly
+ int currentPageNum = pslm.getCurrentPageNum();
+ int currentColumn = pslm.getCurrentPV().getCurrentSpan().getCurrentFlowIndex();
+ pageProvider.setStartOfNextElementList(currentPageNum, currentColumn, spanAllActive);
+
+ // Make sure we only add the areas we haven't added already
+ effectiveList.ignoreAtStart = newStartPos;
+ if (!layoutRedone) {
+ // Handle special page-master for last page
+ setLastPageIndex(currentPageNum);
+// BodyRegion lastBody = pageProvider.getPage(false, currentPageNum).getPageViewport().getBodyRegion();
+ pslm.setCurrentPage(pageProvider.getPage(false, currentPageNum));
+ previousIndex = pageProvider.getIndexOfCachedLastPage();
+ } else {
+ setLastPageIndex(currentPageNum + 1);
+// pslm.setCurrentPage(previousPage);
+ pageProvider.discardCacheStartingWith(previousIndex);
+ pslm.setCurrentPage(pageProvider.getPage(false, currentPageNum));
+ }
+ layoutRedone = true;
+ }
+
/**
* Restart the algorithm at the break corresponding to the given partCount. Used to
* re-do the part after the last break in case of either column-balancing or a last
@@ -565,6 +601,7 @@ public class PageBreaker extends AbstractBreaker {
return;
case Constants.EN_COLUMN:
case Constants.EN_AUTO:
+ case Constants.EN_PAGE:
case -1:
PageViewport pv = curPage.getPageViewport();
@@ -580,26 +617,35 @@ public class PageBreaker extends AbstractBreaker {
log.trace("Forcing new page with span");
curPage = pslm.makeNewPage(false);
curPage.getPageViewport().createSpan(true);
- } else if (pv.getCurrentSpan().hasMoreFlows()) {
- log.trace("Moving to next flow");
- pv.getCurrentSpan().moveToNextFlow();
} else {
- log.trace("Making new page");
- /*curPage = */pslm.makeNewPage(false);
+ if (breakVal == Constants.EN_PAGE) {
+ handleBreakBeforeFollowingPage(breakVal);
+ } else {
+ if (pv.getCurrentSpan().hasMoreFlows()) {
+ log.trace("Moving to next flow");
+ pv.getCurrentSpan().moveToNextFlow();
+ } else {
+ log.trace("Making new page");
+ pslm.makeNewPage(false);
+ }
+ }
}
return;
- case Constants.EN_PAGE:
default:
- log.debug("handling break-before after page " + pslm.getCurrentPageNum()
- + " breakVal=" + getBreakClassName(breakVal));
- if (needBlankPageBeforeNew(breakVal)) {
- log.trace("Inserting blank page");
- /*curPage = */pslm.makeNewPage(true);
- }
- if (needNewPage(breakVal)) {
- log.trace("Making new page");
- /*curPage = */pslm.makeNewPage(false);
- }
+ handleBreakBeforeFollowingPage(breakVal);
+ }
+ }
+
+ private void handleBreakBeforeFollowingPage(int breakVal) {
+ log.debug("handling break-before after page " + pslm.getCurrentPageNum() + " breakVal="
+ + getBreakClassName(breakVal));
+ if (needBlankPageBeforeNew(breakVal)) {
+ log.trace("Inserting blank page");
+ /* curPage = */pslm.makeNewPage(true);
+ }
+ if (needNewPage(breakVal)) {
+ log.trace("Making new page");
+ /* curPage = */pslm.makeNewPage(false);
}
}
@@ -641,6 +687,36 @@ public class PageBreaker extends AbstractBreaker {
}
}
+ protected boolean shouldRedoLayout() {
+ return shouldRedoLayout(-1);
+ }
+
+ protected boolean shouldRedoLayout(int partCount) {
+ boolean lastPageMasterDefined = pslm.getPageSequence().hasPagePositionLast();
+ if (!lastPageMasterDefined && partCount != -1) {
+ lastPageMasterDefined = pslm.getPageSequence().hasPagePositionOnly() && pslm.isOnFirstPage(partCount - 1);
+ }
+ return (!hasMoreContent() && lastPageMasterDefined && !layoutRedone);
+ }
+
+ protected boolean wasLayoutRedone() {
+ return layoutRedone;
+ }
+
+ protected boolean lastPageHasIPDChange() {
+ boolean lastPageMasterDefined = pslm.getPageSequence().hasPagePositionLast();
+ boolean onlyPageMasterDefined = pslm.getPageSequence().hasPagePositionOnly();
+ if (lastPageMasterDefined && !onlyPageMasterDefined) {
+ // code not very robust and unable to handle situations were only and last are defined
+ int currentIPD = this.pageProvider.getCurrentIPD();
+ int lastPageIPD = this.pageProvider.getLastPageIPD();
+ if (lastPageIPD != -1 && currentIPD != lastPageIPD) {
+ return true;
+ }
+ }
+ return false;
+ }
+
protected boolean handlingStartOfFloat() {
return handlingStartOfFloat;
}
diff --git a/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java b/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
index 9327f8f8c..b72124c77 100644
--- a/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
+++ b/src/java/org/apache/fop/layoutmgr/PageBreakingAlgorithm.java
@@ -95,6 +95,7 @@ class PageBreakingAlgorithm extends BreakingAlgorithm {
private int ipdDifference;
private KnuthNode bestNodeForIPDChange;
+ public KnuthNode bestNodeForLastPage;
//Used to keep track of switches in keep-context
private int currentKeepContext = Constants.EN_AUTO;
@@ -1258,6 +1259,9 @@ class PageBreakingAlgorithm extends BreakingAlgorithm {
* the IPD change. No need to do any special handling.
*/
ipdDifference = 0;
+ } else if (line > 0 /*&& (bestNodeForLastPage == null
+ || node.totalDemerits < bestNodeForLastPage.totalDemerits)*/) {
+ bestNodeForLastPage = node;
}
super.addNode(line, node);
}
@@ -1274,6 +1278,10 @@ class PageBreakingAlgorithm extends BreakingAlgorithm {
return pageProvider.compareIPDs(line);
}
+ KnuthNode getBestNodeForLastPage() {
+ return bestNodeForLastPage;
+ }
+
protected boolean handlingFloat() {
return (handlingStartOfFloat || handlingEndOfFloat);
}
diff --git a/src/java/org/apache/fop/layoutmgr/PageProvider.java b/src/java/org/apache/fop/layoutmgr/PageProvider.java
index 142f7ad72..ca41c8c1e 100644
--- a/src/java/org/apache/fop/layoutmgr/PageProvider.java
+++ b/src/java/org/apache/fop/layoutmgr/PageProvider.java
@@ -201,8 +201,8 @@ public class PageProvider implements Constants {
return 0;
} else {
Page nextPage = getPage(false, column.pageIndex + 1, RELTO_CURRENT_ELEMENT_LIST);
- return column.page.getPageViewport().getBodyRegion().getIPD()
- - nextPage.getPageViewport().getBodyRegion().getIPD();
+ return column.page.getPageViewport().getBodyRegion().getColumnIPD()
+ - nextPage.getPageViewport().getBodyRegion().getColumnIPD();
}
}
@@ -332,7 +332,7 @@ public class PageProvider implements Constants {
return page;
}
- private void discardCacheStartingWith(int index) {
+ protected void discardCacheStartingWith(int index) {
while (index < cachedPages.size()) {
this.cachedPages.remove(cachedPages.size() - 1);
if (!pageSeq.goToPreviousSimplePageMaster()) {
@@ -352,9 +352,38 @@ public class PageProvider implements Constants {
page.getPageViewport().setForeignAttributes(spm.getForeignAttributes());
page.getPageViewport().setWritingModeTraits(pageSeq);
cachedPages.add(page);
+ if (isLastPage) {
+ pageSeq.getRoot().setLastSeq(pageSeq);
+ } else if (!isFirstPage) {
+ pageSeq.getRoot().setLastSeq(null);
+ }
return page;
}
+ public int getIndexOfCachedLastPage() {
+ return indexOfCachedLastPage;
+ }
+
+ public int getLastPageIndex() {
+ return lastPageIndex;
+ }
+
+ public int getLastPageIPD() {
+ int index = this.cachedPages.size();
+ boolean isFirstPage = (startPageOfPageSequence == index);
+ SimplePageMaster spm = pageSeq.getLastSimplePageMaster(index, isFirstPage, false);
+ Page page = new Page(spm, index, "", false, false);
+ if (pageSeq.getRoot().getLastSeq() != null && pageSeq.getRoot().getLastSeq() != pageSeq) {
+ return -1;
+ }
+ return page.getPageViewport().getBodyRegion().getColumnIPD();
+ }
+
+ public int getCurrentIPD() {
+ return getPageFromColumnIndex(startColumnOfCurrentElementList).getPageViewport().getBodyRegion()
+ .getColumnIPD();
+ }
+
/**
* Indicates whether the column/page at the given index is on the first page of the page sequence.
*
diff --git a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
index 2e2bd0a22..0ee7121af 100644
--- a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
@@ -254,6 +254,16 @@ public class PageSequenceLayoutManager extends AbstractPageSequenceLayoutManager
return pageProvider.isOnFirstPage(partIndex);
}
+ protected int getLastPageNumber() {
+ return pageProvider.getLastPageIndex();
+ }
+
+ protected int getWidthOfCurrentPage() {
+ if (curPage != null) {
+ return (int) curPage.getPageViewport().getViewArea().getWidth();
+ }
+ return 0;
+ }
/**
* Registers the given footnotes so that they can be added to the current page, before any other footnote.
*
diff --git a/src/java/org/apache/fop/layoutmgr/table/TableContentPosition.java b/src/java/org/apache/fop/layoutmgr/table/TableContentPosition.java
index 457cfaef3..e6dc5b22d 100644
--- a/src/java/org/apache/fop/layoutmgr/table/TableContentPosition.java
+++ b/src/java/org/apache/fop/layoutmgr/table/TableContentPosition.java
@@ -124,4 +124,8 @@ class TableContentPosition extends Position {
sb.append(")");
return sb.toString();
}
+
+ public Position getPosition() {
+ return this;
+ }
}
diff --git a/src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java b/src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java
index 342a2f33c..c51c86997 100644
--- a/src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java
+++ b/src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java
@@ -68,7 +68,7 @@ public class TableRowIterator {
List rowGroupsList = new LinkedList();
// TODO this is ugly
for (FONodeIterator iter = table.getChildNodes(); iter.hasNext();) {
- FONode node = iter.nextNode();
+ FONode node = iter.next();
if (node instanceof TableBody) {
rowGroupsList.addAll(((TableBody) node).getRowGroups());
}
diff --git a/src/java/org/apache/fop/pdf/PDFPattern.java b/src/java/org/apache/fop/pdf/PDFPattern.java
index 7acffa0c9..6602f544d 100644
--- a/src/java/org/apache/fop/pdf/PDFPattern.java
+++ b/src/java/org/apache/fop/pdf/PDFPattern.java
@@ -321,7 +321,7 @@ public class PDFPattern extends PDFPathPaint {
if (pdfStream != null) {
length += pdfStream.outputStreamData(encodedStream, stream);
}
-
+ patternDataStream = null;
return length;
}
diff --git a/src/java/org/apache/fop/render/intermediate/IFParser.java b/src/java/org/apache/fop/render/intermediate/IFParser.java
index 235e051f9..8d562e465 100644
--- a/src/java/org/apache/fop/render/intermediate/IFParser.java
+++ b/src/java/org/apache/fop/render/intermediate/IFParser.java
@@ -523,7 +523,7 @@ public class IFParser implements IFConstants {
establishForeignAttributes(foreignAttributes);
documentHandler.startPage(index, name, pageMasterName,
new Dimension(width, height));
- documentHandler.getContext().setPageNumber(Integer.parseInt(name));
+ documentHandler.getContext().setPageNumber(index + 1);
resetForeignAttributes();
}
diff --git a/src/java/org/apache/fop/render/pcl/Java2DRendererOption.java b/src/java/org/apache/fop/render/pcl/Java2DRendererOption.java
index cb23f7191..9ec0b779b 100644
--- a/src/java/org/apache/fop/render/pcl/Java2DRendererOption.java
+++ b/src/java/org/apache/fop/render/pcl/Java2DRendererOption.java
@@ -27,7 +27,8 @@ public enum Java2DRendererOption implements RendererConfigOption {
RENDERING_MODE("rendering", PCLRenderingMode.class),
TEXT_RENDERING("text-rendering", Boolean.class),
- DISABLE_PJL("disable-pjl", Boolean.class);
+ DISABLE_PJL("disable-pjl", Boolean.class),
+ MODE_COLOR("color", Boolean.class);
private final String name;
diff --git a/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java b/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
index 1991295bd..66655a721 100644
--- a/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
+++ b/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
@@ -274,7 +274,7 @@ public class PCLDocumentHandler extends AbstractBinaryWritingIFDocumentHandler
try {
Rectangle printArea = this.currentPageDefinition.getLogicalPageRect();
gen.setCursorPos(0, 0);
- gen.paintBitmap(this.currentImage, printArea.getSize(), true);
+ gen.paintBitmap(this.currentImage, printArea.getSize(), true, pclUtil);
} catch (IOException ioe) {
throw new IFException("I/O error while encoding page image", ioe);
} finally {
diff --git a/src/java/org/apache/fop/render/pcl/PCLGenerator.java b/src/java/org/apache/fop/render/pcl/PCLGenerator.java
index 67d37fbb5..589779ad9 100644
--- a/src/java/org/apache/fop/render/pcl/PCLGenerator.java
+++ b/src/java/org/apache/fop/render/pcl/PCLGenerator.java
@@ -21,12 +21,19 @@ package org.apache.fop.render.pcl;
import java.awt.Color;
import java.awt.Dimension;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
import java.awt.image.DataBuffer;
import java.awt.image.DataBufferByte;
+import java.awt.image.DataBufferInt;
+import java.awt.image.DirectColorModel;
import java.awt.image.IndexColorModel;
import java.awt.image.MultiPixelPackedSampleModel;
import java.awt.image.Raster;
import java.awt.image.RenderedImage;
+import java.awt.image.SinglePixelPackedSampleModel;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
@@ -380,7 +387,7 @@ public class PCLGenerator {
* @param col the fill color
* @throws IOException In case of an I/O error
*/
- protected void fillRect(int w, int h, Color col) throws IOException {
+ protected void fillRect(int w, int h, Color col, boolean colorEnabled) throws IOException {
if ((w == 0) || (h == 0)) {
return;
}
@@ -399,12 +406,19 @@ public class PCLGenerator {
writeCommand("*c" + lineshade + "G");
writeCommand("*c2P"); //Shaded fill
} else {
- defineGrayscalePattern(col, 32, DitherUtil.DITHER_MATRIX_4X4);
+ if (colorEnabled) {
+ selectColor(col);
+ writeCommand("*c" + formatDouble4(w / 100.0) + "h"
+ + formatDouble4(h / 100.0) + "V");
+ writeCommand("*c0P"); //Solid fill
+ } else {
+ defineGrayscalePattern(col, 32, DitherUtil.DITHER_MATRIX_4X4);
- writeCommand("*c" + formatDouble4(w / 100.0) + "h"
- + formatDouble4(h / 100.0) + "V");
- writeCommand("*c32G");
- writeCommand("*c4P"); //User-defined pattern
+ writeCommand("*c" + formatDouble4(w / 100.0) + "h"
+ + formatDouble4(h / 100.0) + "V");
+ writeCommand("*c32G");
+ writeCommand("*c4P"); //User-defined pattern
+ }
}
// Reset pattern transparency mode.
setPatternTransparencyMode(true);
@@ -530,6 +544,13 @@ public class PCLGenerator {
}
}
+ public void selectColor(Color col) throws IOException {
+ writeCommand("*v6W");
+ writeBytes(new byte[]{0, 1, 1, 8, 8, 8});
+ writeCommand(String.format("*v%da%db%dc0I", col.getRed(), col.getGreen(), col.getBlue()));
+ writeCommand("*v0S");
+ }
+
/**
* Select the current pattern
* @param patternID the pattern ID (<ESC>*c#G command)
@@ -696,13 +717,15 @@ public class PCLGenerator {
* @param sourceTransparency true if the background should not be erased
* @throws IOException In case of an I/O error
*/
- public void paintBitmap(RenderedImage img, Dimension targetDim, boolean sourceTransparency)
- throws IOException {
+ public void paintBitmap(RenderedImage img, Dimension targetDim, boolean sourceTransparency,
+ PCLRenderingUtil pclUtil) throws IOException {
+ final boolean printerSupportsColor = pclUtil.isColorEnabled();
+ boolean monochrome = isMonochromeImage(img);
double targetHResolution = img.getWidth() / UnitConv.mpt2in(targetDim.width);
double targetVResolution = img.getHeight() / UnitConv.mpt2in(targetDim.height);
double targetResolution = Math.max(targetHResolution, targetVResolution);
int resolution = (int)Math.round(targetResolution);
- int effResolution = calculatePCLResolution(resolution, true);
+ int effResolution = calculatePCLResolution(resolution, !(printerSupportsColor && !monochrome));
Dimension orgDim = new Dimension(img.getWidth(), img.getHeight());
Dimension effDim;
if (targetResolution == effResolution) {
@@ -713,27 +736,30 @@ public class PCLGenerator {
(int)Math.ceil(UnitConv.mpt2px(targetDim.height, effResolution)));
}
boolean scaled = !orgDim.equals(effDim);
-
- boolean monochrome = isMonochromeImage(img);
if (!monochrome) {
- //Transparency mask disabled. Doesn't work reliably
- /*
- final boolean transparencyDisabled = true;
- RenderedImage mask = (transparencyDisabled ? null : getMask(img, effDim));
- if (mask != null) {
- pushCursorPos();
- selectCurrentPattern(0, 1); //Solid white
- setTransparencyMode(true, true);
- paintMonochromeBitmap(mask, effResolution);
- popCursorPos();
- }
- */
+ if (printerSupportsColor) {
+ selectCurrentPattern(0, 0); //Solid black
+ renderImageAsColor(img, effResolution);
+ } else {
+ //Transparency mask disabled. Doesn't work reliably
+ /*
+ final boolean transparencyDisabled = true;
+ RenderedImage mask = (transparencyDisabled ? null : getMask(img, effDim));
+ if (mask != null) {
+ pushCursorPos();
+ selectCurrentPattern(0, 1); //Solid white
+ setTransparencyMode(true, true);
+ paintMonochromeBitmap(mask, effResolution);
+ popCursorPos();
+ }
+ */
- RenderedImage red = BitmapImageUtil.convertToMonochrome(
- img, effDim, this.ditheringQuality);
- selectCurrentPattern(0, 0); //Solid black
- setTransparencyMode(sourceTransparency /*|| mask != null*/, true);
- paintMonochromeBitmap(red, effResolution);
+ RenderedImage red = BitmapImageUtil.convertToMonochrome(
+ img, effDim, this.ditheringQuality);
+ selectCurrentPattern(0, 0); //Solid black
+ setTransparencyMode(sourceTransparency /*|| mask != null*/, true);
+ paintMonochromeBitmap(red, effResolution);
+ }
} else {
RenderedImage effImg = img;
if (scaled) {
@@ -755,6 +781,90 @@ public class PCLGenerator {
return (int)greyVal;
}
+ private void renderImageAsColor(RenderedImage imgOrg, int dpi) throws IOException {
+ BufferedImage img = new BufferedImage(imgOrg.getWidth(), imgOrg.getHeight(), BufferedImage.TYPE_INT_RGB);
+ Graphics2D g = img.createGraphics();
+ g.setColor(Color.WHITE);
+ g.fillRect(0, 0, imgOrg.getWidth(), imgOrg.getHeight());
+ g.drawImage((Image) imgOrg, 0, 0, null);
+
+ if (!isValidPCLResolution(dpi)) {
+ throw new IllegalArgumentException("Invalid PCL resolution: " + dpi);
+ }
+ int w = img.getWidth();
+ ColorModel cm = img.getColorModel();
+ if (cm instanceof DirectColorModel) {
+ writeCommand("*v6W"); // ImagingMode
+ out.write(new byte[]{0, 3, 0, 8, 8, 8});
+ } else {
+ IndexColorModel icm = (IndexColorModel)cm;
+ writeCommand("*v6W"); // ImagingMode
+ out.write(new byte[]{0, 1, (byte)icm.getMapSize(), 8, 8, 8});
+
+ byte[] reds = new byte[256];
+ byte[] greens = new byte[256];
+ byte[] blues = new byte[256];
+
+ icm.getReds(reds);
+ icm.getGreens(greens);
+ icm.getBlues(blues);
+ for (int i = 0; i < icm.getMapSize(); i++) {
+ writeCommand("*v" + (reds[i] & 0xFF) + "A"); //ColorComponentOne
+ writeCommand("*v" + (greens[i] & 0xFF) + "B"); //ColorComponentTwo
+ writeCommand("*v" + (blues[i] & 0xFF) + "C"); //ColorComponentThree
+ writeCommand("*v" + i + "I"); //AssignColorIndex
+ }
+ }
+ setRasterGraphicsResolution(dpi);
+ writeCommand("*r0f" + img.getHeight() + "t" + (w) + "S");
+ writeCommand("*r1A");
+
+ Raster raster = img.getData();
+
+ ColorEncoder encoder = new ColorEncoder(img);
+ // Transfer graphics data
+ if (cm.getTransferType() == DataBuffer.TYPE_BYTE) {
+ DataBufferByte dataBuffer = (DataBufferByte)raster.getDataBuffer();
+ if (img.getSampleModel() instanceof MultiPixelPackedSampleModel && dataBuffer.getNumBanks() == 1) {
+ byte[] buf = dataBuffer.getData();
+ MultiPixelPackedSampleModel sampleModel = (MultiPixelPackedSampleModel)img.getSampleModel();
+ int scanlineStride = sampleModel.getScanlineStride();
+ int idx = 0;
+ for (int y = 0, maxy = img.getHeight(); y < maxy; y++) {
+ for (int x = 0; x < scanlineStride; x++) {
+ encoder.add8Bits(buf[idx]);
+ idx++;
+ }
+ encoder.endLine();
+ }
+ } else {
+ throw new IOException("Unsupported image");
+ }
+ } else if (cm.getTransferType() == DataBuffer.TYPE_INT) {
+ DataBufferInt dataBuffer = (DataBufferInt)raster.getDataBuffer();
+ if (img.getSampleModel() instanceof SinglePixelPackedSampleModel && dataBuffer.getNumBanks() == 1) {
+ int[] buf = dataBuffer.getData();
+ SinglePixelPackedSampleModel sampleModel = (SinglePixelPackedSampleModel)img.getSampleModel();
+ int scanlineStride = sampleModel.getScanlineStride();
+ int idx = 0;
+ for (int y = 0, maxy = img.getHeight(); y < maxy; y++) {
+ for (int x = 0; x < scanlineStride; x++) {
+ encoder.add8Bits((byte)(buf[idx] >> 16));
+ encoder.add8Bits((byte)(buf[idx] >> 8));
+ encoder.add8Bits((byte)(buf[idx] >> 0));
+ idx++;
+ }
+ encoder.endLine();
+ }
+ } else {
+ throw new IOException("Unsupported image");
+ }
+ } else {
+ throw new IOException("Unsupported image");
+ }
+ // End raster graphics
+ writeCommand("*rB");
+ }
/**
* Paint a bitmap at the current cursor position. The bitmap must be a monochrome
* (1-bit) bitmap image.
@@ -921,4 +1031,236 @@ public class PCLGenerator {
}
+ private class ColorEncoder {
+ private int imgw;
+ private int bytewidth;
+ private byte ib; //current image bits
+
+ private int currentIndex;
+ private int len;
+ private int shiftBit = 0x80;
+ private int whiteLines;
+ final byte[] zeros;
+ final byte[] buff1;
+ final byte[] buff2;
+ final byte[] encodedRun;
+ final byte[] encodedTagged;
+ final byte[] encodedDelta;
+ byte[] seed;
+ byte[] current;
+ int compression;
+ int seedLen;
+
+ public ColorEncoder(RenderedImage img) {
+ imgw = img.getWidth();
+ bytewidth = imgw * 3 + 1;
+
+ zeros = new byte[bytewidth];
+ buff1 = new byte[bytewidth];
+ buff2 = new byte[bytewidth];
+ encodedRun = new byte[bytewidth];
+ encodedTagged = new byte[bytewidth];
+ encodedDelta = new byte[bytewidth];
+
+ seed = buff1;
+ current = buff2;
+
+ seedLen = 0;
+ compression = (-1);
+ System.arraycopy(zeros, 0, seed, 0, zeros.length);
+
+ }
+
+ private int runCompression(byte[] buff, int len) {
+ int bytes = 0;
+
+ try {
+ for (int i = 0; i < len;) {
+ int sameCount;
+ byte seed = current[i++];
+
+ for (sameCount = 1; i < len && current[i] == seed; i++) {
+ sameCount++;
+ }
+
+ for (; sameCount > 256; sameCount -= 256) {
+ buff[bytes++] = (byte)255;
+ buff[bytes++] = seed;
+ }
+ if (sameCount > 0) {
+ buff[bytes++] = (byte)(sameCount - 1);
+ buff[bytes++] = seed;
+ }
+
+ }
+ } catch (ArrayIndexOutOfBoundsException e) {
+ return len + 1;
+ }
+ return bytes;
+ }
+
+ private int deltaCompression(byte[] seed, byte[] buff, int len) {
+ int bytes = 0;
+
+ try {
+ for (int i = 0; i < len;) {
+ int sameCount;
+ int diffCount;
+
+ for (sameCount = 0; i < len && current[i] == seed[i]; i++) {
+ sameCount++;
+ }
+ for (diffCount = 0; i < len && current[i] != seed[i]; i++) {
+ diffCount++;
+ }
+
+ for (; diffCount != 0;) {
+ int diffToWrite = (diffCount > 8) ? 8 : diffCount;
+ int sameToWrite = (sameCount > 31) ? 31 : sameCount;
+
+ buff[bytes++] = (byte)(((diffToWrite - 1) << 5) | sameToWrite);
+ sameCount -= sameToWrite;
+ if (sameToWrite == 31) {
+ for (; sameCount >= 255; sameCount -= 255) {
+ buff[bytes++] = (byte)255;
+ }
+ buff[bytes++] = (byte)sameCount;
+ sameCount = 0;
+ }
+
+ System.arraycopy(current, i - diffCount, buff, bytes, diffToWrite);
+ bytes += diffToWrite;
+
+ diffCount -= diffToWrite;
+ }
+ }
+ } catch (ArrayIndexOutOfBoundsException e) {
+ return len + 1;
+ }
+ return bytes;
+ }
+
+ private int tiffCompression(byte[] encodedTagged, int len) {
+ int literalCount = 0;
+ int bytes = 0;
+
+ try {
+ for (int from = 0; from < len;) {
+ int repeatLength;
+ int repeatValue = current[from];
+
+ for (repeatLength = 1; repeatLength < 128
+ && from + repeatLength < len
+ && current[from + repeatLength] == repeatValue;) {
+ repeatLength++;
+ }
+
+ if (literalCount == 128 || (repeatLength > 2 && literalCount > 0)) {
+ encodedTagged[bytes++] = (byte)(literalCount - 1);
+ System.arraycopy(current, from - literalCount, encodedTagged, bytes, literalCount);
+ bytes += literalCount;
+ literalCount = 0;
+ }
+ if (repeatLength > 2) {
+ encodedTagged[bytes++] = (byte)(1 - repeatLength);
+ encodedTagged[bytes++] = current[from];
+ from += repeatLength;
+ } else {
+ literalCount++;
+ from++;
+ }
+ }
+ if (literalCount > 0) {
+ encodedTagged[bytes++] = (byte)(literalCount - 1);
+ System.arraycopy(current, (3 * len) - literalCount, encodedTagged, bytes, literalCount);
+ bytes += literalCount;
+ }
+ } catch (ArrayIndexOutOfBoundsException e) {
+ return len + 1;
+ }
+ return bytes;
+ }
+
+ public void addBit(boolean bit) {
+ //Set image bit for black
+ if (bit) {
+ ib |= shiftBit;
+ }
+ shiftBit >>= 1;
+ if (shiftBit == 0) {
+ add8Bits(ib);
+ shiftBit = 0x80;
+ ib = 0;
+ }
+ }
+
+ public void add8Bits(byte b) {
+ current[currentIndex++] = b;
+ if (b != 0) {
+ len = currentIndex;
+ }
+ }
+
+ public void endLine() throws IOException {
+ if (len == 0) {
+ whiteLines++;
+ } else {
+ if (whiteLines > 0) {
+ writeCommand("*b" + whiteLines + "Y");
+ whiteLines = 0;
+ }
+
+ int unencodedCount = len;
+ int runCount = runCompression(encodedRun, len);
+ int tiffCount = tiffCompression(encodedTagged, len);
+ int deltaCount = deltaCompression(seed, encodedDelta, Math.max(len, seedLen));
+
+ int bestCount = Math.min(unencodedCount, Math.min(runCount, Math.min(tiffCount, deltaCount)));
+ int bestCompression;
+
+ if (bestCount == unencodedCount) {
+ bestCompression = 0;
+ } else if (bestCount == runCount) {
+ bestCompression = 1;
+ } else if (bestCount == tiffCount) {
+ bestCompression = 2;
+ } else {
+ bestCompression = 3;
+ }
+
+ if (compression != bestCompression) {
+ compression = bestCompression;
+ writeCommand("*b" + compression + "M");
+ }
+
+ if (bestCompression == 0) {
+ writeCommand("*b" + unencodedCount + "W");
+ out.write(current, 0, unencodedCount);
+ } else if (bestCompression == 1) {
+ writeCommand("*b" + runCount + "W");
+ out.write(encodedRun, 0, runCount);
+ } else if (bestCompression == 2) {
+ writeCommand("*b" + tiffCount + "W");
+ out.write(encodedTagged, 0, tiffCount);
+ } else if (bestCompression == 3) {
+ writeCommand("*b" + deltaCount + "W");
+ out.write(encodedDelta, 0, deltaCount);
+ }
+
+ if (current == buff1) {
+ seed = buff1;
+ current = buff2;
+ } else {
+ seed = buff2;
+ current = buff1;
+ }
+ seedLen = len;
+ }
+ shiftBit = 0x80;
+ ib = 0;
+ len = 0;
+ currentIndex = 0;
+ }
+ }
+
}
diff --git a/src/java/org/apache/fop/render/pcl/PCLImageHandlerGraphics2D.java b/src/java/org/apache/fop/render/pcl/PCLImageHandlerGraphics2D.java
index 014bc47a1..66336955e 100644
--- a/src/java/org/apache/fop/render/pcl/PCLImageHandlerGraphics2D.java
+++ b/src/java/org/apache/fop/render/pcl/PCLImageHandlerGraphics2D.java
@@ -139,7 +139,7 @@ public class PCLImageHandlerGraphics2D implements ImageHandler {
}
gen.paintBitmap(imgRend.getRenderedImage(), new Dimension(pos.width, pos.height),
- pclContext.isSourceTransparencyEnabled());
+ pclContext.isSourceTransparencyEnabled(), pclContext.getPCLUtil());
}
}
diff --git a/src/java/org/apache/fop/render/pcl/PCLImageHandlerRenderedImage.java b/src/java/org/apache/fop/render/pcl/PCLImageHandlerRenderedImage.java
index ebfb1829a..aabb9c5ac 100644
--- a/src/java/org/apache/fop/render/pcl/PCLImageHandlerRenderedImage.java
+++ b/src/java/org/apache/fop/render/pcl/PCLImageHandlerRenderedImage.java
@@ -66,7 +66,7 @@ public class PCLImageHandlerRenderedImage implements ImageHandler {
Point2D transPoint = pclContext.transformedPoint(pos.x, pos.y);
gen.setCursorPos(transPoint.getX(), transPoint.getY());
gen.paintBitmap(ri, new Dimension(pos.width, pos.height),
- pclContext.isSourceTransparencyEnabled());
+ pclContext.isSourceTransparencyEnabled(), pclContext.getPCLUtil());
}
/** {@inheritDoc} */
diff --git a/src/java/org/apache/fop/render/pcl/PCLPainter.java b/src/java/org/apache/fop/render/pcl/PCLPainter.java
index 69465a7fd..65e996d08 100644
--- a/src/java/org/apache/fop/render/pcl/PCLPainter.java
+++ b/src/java/org/apache/fop/render/pcl/PCLPainter.java
@@ -211,7 +211,7 @@ public class PCLPainter extends AbstractIFPainter<PCLDocumentHandler> implements
}
try {
setCursorPos(rect.x, rect.y);
- gen.fillRect(rect.width, rect.height, fillColor);
+ gen.fillRect(rect.width, rect.height, fillColor, getPCLUtil().isColorEnabled());
} catch (IOException ioe) {
throw new IFException("I/O error in fillRect()", ioe);
}
@@ -410,7 +410,11 @@ public class PCLPainter extends AbstractIFPainter<PCLDocumentHandler> implements
Color textColor = state.getTextColor();
if (textColor != null) {
gen.setTransparencyMode(true, false);
- gen.selectGrayscale(textColor);
+ if (getDocumentHandler().getPCLUtil().isColorEnabled()) {
+ gen.selectColor(textColor);
+ } else {
+ gen.selectGrayscale(textColor);
+ }
}
gen.setTransparencyMode(true, true);
@@ -492,7 +496,11 @@ public class PCLPainter extends AbstractIFPainter<PCLDocumentHandler> implements
Color textColor = state.getTextColor();
if (textColor != null) {
gen.setTransparencyMode(true, false);
- gen.selectGrayscale(textColor);
+ if (getDocumentHandler().getPCLUtil().isColorEnabled()) {
+ gen.selectColor(textColor);
+ } else {
+ gen.selectGrayscale(textColor);
+ }
}
if (x != -1 && y != -1) {
diff --git a/src/java/org/apache/fop/render/pcl/PCLRendererConfig.java b/src/java/org/apache/fop/render/pcl/PCLRendererConfig.java
index 29fccc2c8..05e72b00e 100644
--- a/src/java/org/apache/fop/render/pcl/PCLRendererConfig.java
+++ b/src/java/org/apache/fop/render/pcl/PCLRendererConfig.java
@@ -32,6 +32,7 @@ import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
import org.apache.fop.render.RendererConfig;
import static org.apache.fop.render.pcl.Java2DRendererOption.DISABLE_PJL;
+import static org.apache.fop.render.pcl.Java2DRendererOption.MODE_COLOR;
import static org.apache.fop.render.pcl.Java2DRendererOption.RENDERING_MODE;
import static org.apache.fop.render.pcl.Java2DRendererOption.TEXT_RENDERING;
@@ -65,6 +66,10 @@ public final class PCLRendererConfig implements RendererConfig {
return getParam(DISABLE_PJL, Boolean.class);
}
+ public Boolean isColorEnabled() {
+ return getParam(MODE_COLOR, Boolean.class);
+ }
+
private <T> T getParam(Java2DRendererOption option, Class<T> type) {
assert option.getType().equals(type);
return type.cast(params.get(option));
@@ -90,6 +95,12 @@ public final class PCLRendererConfig implements RendererConfig {
private void configure(Configuration cfg, PCLRendererConfig config) throws FOPException {
if (cfg != null) {
+ Configuration imagesCfg = cfg.getChild("images");
+ String imageMode = imagesCfg.getAttribute("mode", null);
+ if ("color".equalsIgnoreCase(imageMode)) {
+ config.setParam(MODE_COLOR, true);
+ }
+
String rendering = cfg.getChild(RENDERING_MODE.getName()).getValue(null);
if (rendering != null) {
try {
diff --git a/src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java b/src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java
index 33376655f..7a92b7408 100644
--- a/src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java
+++ b/src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java
@@ -67,7 +67,9 @@ public class PCLRendererConfigurator extends PrintRendererConfigurator {
if (config.isTextRendering() != null) {
pclUtil.setAllTextAsBitmaps(config.isTextRendering());
}
-
+ if (config.isColorEnabled() != null) {
+ pclUtil.setColorEnabled(config.isColorEnabled());
+ }
}
@Override
diff --git a/src/java/org/apache/fop/render/pcl/PCLRenderingUtil.java b/src/java/org/apache/fop/render/pcl/PCLRenderingUtil.java
index 32693764f..674605bde 100644
--- a/src/java/org/apache/fop/render/pcl/PCLRenderingUtil.java
+++ b/src/java/org/apache/fop/render/pcl/PCLRenderingUtil.java
@@ -50,12 +50,7 @@ public class PCLRenderingUtil {
/** Controls the dithering quality when rendering gray or color images. */
private float ditheringQuality = 0.5f;
- /**
- * Controls whether an RGB canvas is used when converting Java2D graphics to bitmaps.
- * This can be used to work around problems with Apache Batik, for example, but setting
- * this to true will increase memory consumption.
- */
- private boolean useColorCanvas;
+ private boolean useColor;
/**
* Controls whether the generation of PJL commands gets disabled.
@@ -142,12 +137,12 @@ public class PCLRenderingUtil {
return this.allTextAsBitmaps;
}
- /**
- * Indicates whether a color canvas is used when creating bitmap images.
- * @return true if a color canvas is used.
- */
- public boolean isColorCanvasEnabled() {
- return this.useColorCanvas;
+ public void setColorEnabled(boolean useColor) {
+ this.useColor = useColor;
+ }
+
+ public boolean isColorEnabled() {
+ return useColor;
}
/**
diff --git a/src/java/org/apache/fop/render/ps/Gradient.java b/src/java/org/apache/fop/render/ps/Gradient.java
new file mode 100644
index 000000000..558f3b952
--- /dev/null
+++ b/src/java/org/apache/fop/render/ps/Gradient.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.render.ps;
+
+import java.util.List;
+
+import org.apache.fop.render.gradient.Function;
+import org.apache.fop.render.gradient.Function.SubFunctionRenderer;
+import org.apache.fop.render.gradient.GradientMaker.DoubleFormatter;
+import org.apache.fop.render.gradient.Pattern;
+import org.apache.fop.render.gradient.Shading;
+
+/**
+ * Helper class to draw gradients in PostScript.
+ */
+public final class Gradient {
+
+ private Gradient() { }
+
+ public static String outputPattern(Pattern pattern, DoubleFormatter doubleFormatter) {
+ StringBuilder p = new StringBuilder(64);
+ p.append("/Pattern setcolorspace\n");
+ p.append("<< \n/Type /Pattern \n");
+
+ p.append("/PatternType " + pattern.getPatternType() + " \n");
+
+ if (pattern.getShading() != null) {
+ p.append("/Shading ");
+ outputShading(p, pattern.getShading(), doubleFormatter);
+ p.append(" \n");
+ }
+ p.append(">> \n");
+ List<Double> matrix = pattern.getMatrix();
+ if (matrix == null) {
+ p.append("matrix ");
+ } else {
+ p.append("[ ");
+ for (double m : pattern.getMatrix()) {
+ p.append(doubleFormatter.formatDouble(m));
+ p.append(" ");
+ }
+ p.append("] ");
+ }
+ p.append("makepattern setcolor\n");
+
+ return p.toString();
+ }
+
+ private static void outputShading(StringBuilder out, Shading shading, final DoubleFormatter doubleFormatter) {
+ final Function function = shading.getFunction();
+ Shading.FunctionRenderer functionRenderer = new Shading.FunctionRenderer() {
+
+ public void outputFunction(StringBuilder out) {
+ SubFunctionRenderer subFunctionRenderer = new Function.SubFunctionRenderer() {
+
+ public void outputFunction(StringBuilder out, int functionIndex) {
+ Function subFunction = function.getFunctions().get(functionIndex);
+ assert subFunction.getFunctions().isEmpty();
+ subFunction.output(out, doubleFormatter, null);
+ }
+ };
+ function.output(out, doubleFormatter, subFunctionRenderer);
+ }
+ };
+ shading.output(out, doubleFormatter, functionRenderer);
+ }
+
+}
diff --git a/status.xml b/status.xml
deleted file mode 100644
index 1b0495094..000000000
--- a/status.xml
+++ /dev/null
@@ -1,2512 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!-- $Id$ -->
-<!DOCTYPE status PUBLIC "-//APACHE//DTD Status V1.3//EN" "http://forrest.apache.org/dtd/status-v13.dtd">
-<status>
-
- <developers>
- <person name="Glenn Adams" email="gadams@apache.org" id="GA"/>
- <person name="Max Berger" email="mayberger@apache.org" id="MB"/>
- <person name="Chris Bowditch" email="cbowditch@apache.org" id="CB"/>
- <person name="Jay Bryant" email="jbryant@apache.org" id="JB"/>
- <person name="Adrian Cumiskey" email="acumiskey@apache.org" id="AC"/>
- <person name="Bertrand Delacrétaz" email="bdelacretaz@apache.org" id="BD"/>
- <person name="Andreas Delmelle" email="adelmelle@apache.org" id="AD"/>
- <person name="Luca Furini" email="lfurini@apache.org" id="LF"/>
- <person name="Christian Geisert" email="chrisg@apache.org" id="CG"/>
- <person name="Peter Hancock" email="phancock@apache.org" id="PH"/>
- <person name="Vincent Hennebert" email="vhennebert@apache.org" id="VH"/>
- <person name="Mehdi Houshmand" email="mehdi@apache.org" id="MH"/>
- <person name="Clay Leeds" email="clay@apache.org" id="CL"/>
- <person name="Manuel Mall" email="manuel@apache.org" id="MM"/>
- <person name="Jeremias Märki" email="jeremias@apache.org" id="JM"/>
- <person name="Simon Pepping" email="spepping@apache.org" id="SP"/>
- <person name="the FOP committers" email="fop-dev@xmlgraphics.apache.org" id="all"/>
- </developers>
-
- <contexts>
- <context id="Docs" title="Changes to Documentation"/>
- <context id="Code" title="Changes to the Code Base"/>
- <context id="Layout" title="Changes to the Layout Engine"/>
- <context id="Renderers" title="Changes to Renderers (Output Formats)"/>
- <context id="Fonts" title="Changes to the Font Subsystem"/>
- <context id="API" title="Changes to the End-User API"/>
- <context id="Extensions" title="Changes to the Bundled Extensions"/>
- <context id="Images" title="Changes to the Image Support"/>
- <context id="Config" title="Changes to the User Configuration"/>
- <context id="Test" title="Changes to unit tests or other test code"/>
- </contexts>
-
- <changes>
- <!--
- When adding changes, please try to highlight those which might affect upgrading
- users, i.e. when the behaviour changes and could affect the layout of existing
- documents. Example: the fix of marks layering will be such a case when it's done.
- -->
- <release version="FOP Trunk" date="06 July 2014">
- <action context="Layout" dev="GA" type="fix" fixes-bug="FOP-2388">
- Fix Arabic text left justified on the first cell of a table with writing mode rl-tb.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="FOP-2311">
- Eliminate regression to shorthand properties from Bugzilla 37114 (FOP-1069).
- </action>
- <action context="Renderers" dev="GA" type="add" fixes-bug="FOP-2301">
- Enable support for PDF sub-page transitions.
- </action>
- <action context="Layout" dev="GA" type="fix" fixes-bug="FOP-2310">
- Fix misplaced table cell border in WM RTL context.
- </action>
- <action context="Renderers" dev="GA" type="add" fixes-bug="FOP-2298">
- Enable support for PDF page transitions.
- </action>
- <action context="Code" dev="PH" type="fix" fixes-bug="FOP-2211" due-to="Alexios Giotis, PH">
- Fix and improve the handling of temporary files using the new URI resource resolvers
- </action>
- <action context="Layout" dev="CB" type="fix" fixes-bug="FOP-2217" due-to="Robert Meyer">
- Image scaling change was adversely affecting other image types
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="FOP-2214" due-to="Simon Steiner">
- Thin dashed border look like dots
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="FOP-2215" due-to="Simon Steiner">
- NullPointerException when generating IF with fox:external-document
- </action>
- <action context="Renderers" dev="GA" type="add" fixes-bug="FOP-2206" due-to="Luis Bernardo">
- Add support for CS placement and escapement data in PS renderer.
- </action>
- <action context="Code" dev="PS" type="fix" fixes-bug="FOP-2203" due-to="Will May">
- XML syntax error in XSD.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="FOP-2197">
- Missing GlyphTester class in transcoder archives.
- </action>
- <action context="Fonts" dev="GA" type="fix" fixes-bug="FOP-2195">
- Use sparse arrays for position adjustments.
- </action>
- <action context="Fonts" dev="GA" type="fix" fixes-bug="FOP-2194">
- Optimize lazy font load invocation for hot methods.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="FOP-2192">
- Fix checkstyle and findbugs warnings.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="FOP-2191">
- Cache matched lookups, assembled lookup spec uses; reduce glyph processing state allocation.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="FOP-2188">
- Optimize string allocation in PDF output processing.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="FOP-2186">
- Optimize inefficient glyph processing state update operations in CS path.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="FOP-2184" due-to="Luis Bernardo">
- Optimize inefficient position adjustment array allocation in non-CS path.
- </action>
- <action context="Fonts" dev="PH" type="add" fixes-bug="FOP-2180" due-to="Alexey Neyman">
- TTFReader: Output bounding box information for glyphs.
- </action>
- <action context="Code" dev="PH" type="fix" fixes-bug="FOP-1069" due-to="Robert Meyer">
- Warn instead or error on invalid property values.
- </action>
- <action context="Layout" dev="CB" type="fix" fixes-bug="FOP-2174" due-to="Robert Meyer">
- When using SVG drawings, if no content-width and content-height is specified, 72 will
- be used instead of the source-resolution option.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="FOP-2179" due-to="Robert Meyer">
- Fix checkstyle and findbugs warnings.
- </action>
- <action context="Layout" dev="GA" type="fix" fixes-bug="FOP-2160" due-to="Robert Meyer">
- Fix NPE when rl writing mode is used in certain contexts.
- </action>
- <action context="Layout" dev="GA" type="fix" fixes-bug="FOP-2178">
- Fix incomplete kerning when complex script features are enabled.
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="FOP-2173" due-to="Simon Steiner">
- Invalid Postscript created if more than 255 characters in a custom font are used within
- SVG when generating Postscript
- </action>
- <action context="Code" dev="PH" type="fix" fixes-bug="37114" due-to="Robert Meyer">
- Implementation of changes necessary to warn of invalid property values.
- </action>
- <action context="Layout" dev="PH" type="fix" fixes-bug="FOP-2171" due-to="Simon Steiner">
- Missing Glyph in Postscript using DejaVuSans.
- </action>
- <action context="Renderers" dev="VH" type="fix" fixes-bug="54169" due-to="Robert Meyer">
- Split the parent tree (the number tree corresponding to the ParentTree entry in the
- structure tree root) to avoid reaching the internal limits of Acrobat Pro, that would
- otherwise split it at the wrong place when saving the document.
- </action>
- <action context="Fonts" dev="MH" type="add" fixes-bug="54120">
- Created a simple mechanism to avoid NPEs when AWT fonts are requested from Batik
- for AFP output.
- </action>
- <action context="Renderers" dev="VH" type="add" fixes-bug="54081">
- PDF accessibility: properly tag hyphenated words.
- </action>
- <action context="Code" dev="CB" type="fix" fixes-bug="48955" due-to="Peter Hancock">
- Allow AFP font codepage names to be less than 8 chars
- </action>
- <action context="Code" dev="PH" type="fix" fixes-bug="54075">
- Fixed a regression
- </action>
- <action context="Code" dev="MH" type="add" fixes-bug="45822">
- Changed the dashed borders to appear more like dashes and less like dots
- </action>
- <action context="Code" dev="PH" type="add" fixes-bug="54041">
- Added support for Rounded Corners on block areas.
- </action>
- <action context="Renderers" dev="VH" type="add" fixes-bug="54038">
- Added PDF/A-2 output option.
- </action>
- <action context="Renderers" dev="VH" type="add" fixes-bug="54037">
- PDF output: Issue a warning when accessibility is enabled and language information is
- missing.
- </action>
- <action context="Renderers" dev="VH" type="add" fixes-bug="53980">
- PDF accessibility: Store language information coming from fo:block or fo:character in the
- structure tree.
- </action>
- <action context="Layout" dev="MH" type="add" fixes-bug="53924" due-to="Luis Bernardo">
- Support for retrieve-table-markers
- </action>
- <action context="Renderers" dev="VH" type="add" fixes-bug="53902">
- Added possibility to define ‘header’ table columns (the same way as fo:table-header allows
- to define header rows). When accessibility is enabled, this allows to set the appropriate
- Scope attribute on the corresponding TH cells.
- </action>
- <action context="Fonts" dev="MH" type="add" fixes-bug="53868" importance="low" due-to="Luis Bernardo">
- Full font embedding in PDF
- </action>
- <action context="Renderers" dev="PH" type="add" fixes-bug="53865" importance="low">
- Added configuration for RowPerStrip configuration in the Tiff renderer.
- RowsPerStrip can be configured to 1 or to the total # of rows.
- See docs for fop.xconf configuration details.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="53598" due-to="Robert Meyer">
- Always set the breakClass field to a legal value in BreakElement, so as to avoid
- IllegalArgumentExceptions in other parts of the code.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="45715" due-to="Luis Bernardo">
- Restored support for break-before on fo:table.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="53827">
- When an fo:block has a non-zero value for its text-indent property and is broken over two
- pages of different widths, then the first line on the second page is missing one word and
- appears indented.
- </action>
- <action context="Renderers" dev="MH" type="fix" fixes-bug="53790">
- Prevented the TIFF configurator from overriding the Bitmap configurator unless CCITT
- compression is enabled.
- </action>
- <action context="Renderers" dev="MH" type="fix" fixes-bug="53786">
- Removed the Attribute Qualifier on TLEs as they aren't used.
- </action>
- <action context="Renderers" dev="MH" type="fix" fixes-bug="48954" due-to="PH">
- Support for character encoding of TLEs in AFP output
- </action>
- <action context="Renderers" dev="VH" type="fix" fixes-bug="53778">
- When PDF accessibility is enabled, the contents for the different regions must appear in the
- proper order in the structure tree.
- </action>
- <action context="Renderers" dev="MH" type="fix" fixes-bug="53766" due-to="Robert Meyer">
- Remove StandardEncoding as the encoding type from fonts used in the PDF renderer
- </action>
- <action context="Fonts" dev="MH" type="fix" fixes-bug="53685">
- Cached AFP charactersets have more unique keys preventing the two characters with
- but different binaries conflicting.
- </action>
- <action context="Fonts" dev="MH" type="fix" fixes-bug="53657" due-to="Robert Meyer">
- AFP fonts default to the nominal character increment to font metrics when glyph info
- is missing from the characterset.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="53688">
- Wrong page number reported when a column overflows the region-body in a multi-column
- document.
- </action>
- <action context="Renderers" dev="VH" type="add" fixes-bug="53639">
- When PDF accessibility is enabled, the Scope attribute must be present in the structure tree
- for table header elements.
- </action>
- <action context="Fonts" dev="MH" type="add" fixes-bug="53600" due-to="Robert Meyer">
- Added an event if a glyph and its metric information does not exist in the character set
- </action>
- <action context="Renderers" dev="VH" type="add" fixes-bug="53596">
- When PDF accessibility is enabled, the structure tree must contain information about the
- number of columns or rows spanned by a table cell.
- </action>
- <action context="Renderers" dev="MH" type="add" fixes-bug="53563" importance="low">
- Removed a method call to the java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice()
- that could (in a headless environment) throw a java.awt.HeadlessException
- </action>
- <action context="Renderers" dev="VH" type="add" importance="high">
- When PDF accessibility is enabled, treat repeated table headings as artifacts. This allows
- screen readers to read the header only once at the beginning of the table and the footer
- once at the end of a table. Reading the headings at every column or page break is likely to
- disturb the user. This follows Section 508 recommendations.
- </action>
- <action context="Layout" dev="VH" type="fix">
- An IllegalArgumentException was thrown when break-before was used inside a list.
- </action>
- <action context="Layout" dev="VH" type="fix">
- When restarting layout for the last page, discard glues and penalties at the beginning of
- the restarted Knuth sequence.
- </action>
- </release>
- <release version="1.1" date="20 October 2012">
- <action context="Test" dev="GA" type="fix">
- Fix errors and warnings in example files. Add build.xml for documentation examples.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="53458" due-to="Dieter von Holten">
- Fix incorrect language and country code key generation in hyphenation tree cache.
- </action>
- <action context="Images" dev="GA" type="fix" fixes-bug="53431" due-to="Luis Bernardo">
- Fix incorrect SVG line dash pattern with PDF output format.
- </action>
- <action context="Images" dev="GA" type="update" fixes-bug="40676" due-to="Luis Bernardo">
- Fix interoperability issue with Adobe reader regarding use of multiple filters.
- </action>
- <action context="Code" dev="GA" type="fix">
- Eliminate javadocs warnings.
- </action>
- <action context="Renderers" dev="VH" type="add" fixes-bug="52338" importance="high">
- Added possibility to embed TrueType fonts in PostScript.
- </action>
- <action context="Images" dev="GA" type="update" fixes-bug="40676" due-to="Luis Bernardo">
- Update site documentation about PNG image loading configuration and support.
- </action>
- <action context="Images" dev="GA" type="update" fixes-bug="40676" due-to="Luis Bernardo">
- Fix newly introduced findbugs warnings.
- </action>
- <action context="Images" dev="GA" type="fix" fixes-bug="40676" due-to="Luis Bernardo, Matthias Reischenbacher" importance="high">
- Support use of ImageLoaderRawPNG decoder in order to prevent re-encoding of PNG images (and unnecssary output file bloat).
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="53412" due-to="Alexios Giotis">
- Eliminate incorrect use of object identity which produces excessive property cache collisions.
- </action>
- <action context="Code" dev="GA" type="fix">
- Eliminate javadocs warnings.
- </action>
- <action context="Code" dev="GA" type="update" fixes-bug="53055">
- Update xmlgraphics common jar to reflect recent fixes in XGC.
- </action>
- <action context="Code" dev="GA" type="update" fixes-bug="43940" due-to="Julien Aymé">
- Fix handling of NaN, {+,-}Infinity, and other edge cases. Submitted by Julien Aymé.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="53304,53306">
- Add version attribute to AT and IF intermediate formats. Also eliminate redundant use of reversed attribute in AT format.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="53295" due-to="Luis Bernardo" importance="high">
- Add extension to place code just before PostScript %PageTrailer.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="53294" due-to="Robert Meyer">
- Fix invalid PostScript file being created when font-size is 0.
- </action>
- <action context="Docs" dev="GA" type="update">
- Update FAQ and New Bug documentation.
- </action>
- <action context="Code" dev="VH" type="add">
- Added support for the role property on fo:page-sequence, fo:flow and fo:static-content. This
- allows to change the mapping of those FOs to PDF structure types when enabling
- accessibility.
- </action>
- <action context="Renderers" dev="VH" type="fix" due-to="Martin Koegler">
- Stop outputting the Type entry for structure elements in order to create a smaller PDF
- ouptut when accessibility is enabled.
- </action>
- <action context="Config" dev="GA" type="fix" fixes-bug="52144" due-to="Luis Bernardo">
- Fix crash on use of version switch (-v).
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="53242" due-to="Luis Bernardo">
- Support fractional line widths in AFP renderer, fixing problem with SVG line drawing.
- </action>
- <action context="Config" dev="GA" type="fix" fixes-bug="53248" due-to="Luis Bernardo">
- Fix exception thrown from use of -print option in CLI.
- </action>
- <action context="Docs" dev="GA" type="fix" fixes-bug="53247">
- Fix renderer mime type for PCL output; should be application/x-pcl.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="40699" due-to="Luis Bernardo">
- Fix for invalid PDF for certain numerical values in SVG lineargradient.
- </action>
- <action context="Layout" dev="GA" type="fix" fixes-bug="53185" due-to="Robert Meyer">
- Unify date formatting between FOP and XGC as well as tidying the date format code.
- </action>
- <action context="Layout" dev="GA" type="fix" fixes-bug="45715" due-to="Luis Bernardo" importance="high">
- Fix for break before (break-before) not respected on blocks nested in inlines.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="48723" due-to="Robert Meyer">
- Fix for XGC when rendering PostScript using SVG being drawn upside down when using a custom affine transform.
- </action>
- <!-- the following is also due to Julien Aymé, but due to a bug in forrest is not included here to prevent duplicate listing in contributors list -->
- <action context="Code" dev="GA" type="fix" fixes-bug="43940" due-to="Ognjen Blagojevic">
- Use new double format utility to improve thread safety and performance.
- </action>
- <action context="Fonts" dev="GA" type="fix" fixes-bug="53148" due-to="Tassos Charoulis">
- Fix performance regression in JDK 1.6 Update 19 due to use of Java Beans API. Fix checkstyle errors.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="51484" due-to="Benjamin Riefenstahl">
- Don't write final /sect suffix in RTF if section is last section.
- </action>
- <action context="Fonts" dev="GA" type="fix" fixes-bug="53143">
- Ensure fonts are not loaded twice (redundantly).
- </action>
- <action context="Test" dev="GA" type="update" fixes-bug="50196" due-to="Matthias Reischenbacher">
- Add test for basic-link with padding.
- </action>
- <action context="Code" dev="GA" type="update">
- Improve property function argument parsing, specifically, better separate required, optional, and variable arguments and the handling of optional argument defaults.
- Regularize property function class names.
- </action>
- <action context="Layout" dev="GA" type="fix" fixes-bug="51043" due-to="Pascal Sancho">
- Don't restart layout unless abs(ipd difference) > 1 in order to prevent rounding issues from triggering false restart.
- </action>
- <action context="Fonts" dev="GA" type="update">
- Removing experimental feature that violates XSL-FO and Unicode semantics by misinterpreting Basic Latin code points. Users must use private use codepoints to access font specific
- character mappings that have no assigned Unicode code point. See bug 50492.
- </action>
- <action context="Layout" dev="GA" type="fix" fixes-bug="53103" due-to="Matthias Reischenbacher">
- Ensure that table cell spanning works in right-to-left writing mode.
- </action>
- <action context="Layout" dev="GA" type="fix" fixes-bug="53086">
- Ensure that table footer and header are included in bididirectional resolution.
- </action>
- <action context="Layout" dev="GA" type="fix" fixes-bug="53097">
- Ensure writing-mode specified on fo:table is used to determine writing mode of table and its descendants.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="53094" due-to="Luis Bernardo">
- Convert block container overflow exception to event model, improving overflow property behavior.
- </action>
- <action context="Code" dev="GA" type="update" fixes-bug="51617">
- Add run target for embedded examples. Add increased JVM memory heap flag for example8 in case font cache is rebuilt.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="53083" importance="high">
- Update to use of checkstyle-5.5 as default configuration. Remove checkstyle-4.0 configuration. Also, import environment build properties before local properties, so that latter can refer to former.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="52572" due-to="Pascal Sancho">
- Prevent NPE on use of unsupported collapse-with-precedence; fall back to collapse. Fix checkstyle errors from prior commit.
- </action>
- <action context="Layout" dev="GA" type="fix" fixes-bug="52514" due-to="Luis Bernardo" importance="high">
- Ensure square image is appropriately scaled.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="50062" importance="high">
- Invoke JVM in headless mode from FOP command scripts and JS shell to prevent stealing focus from GUI applications.
- </action>
- <action context="Renderers" dev="GA" type="fix" fixes-bug="52114">
- Take leading derived space before/after into account when computing rows for TXT renderer.
- </action>
- <action context="Code" dev="PH" type="add" fixes-bug="49893">
- A global setting to wrap F11 images in page segments.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="52763" importance="high">
- Support list-block in marker, thus preventing NPE.
- </action>
- <action context="Code" dev="GA" type="fix">
- Must use unqualified (local name) when reporting invalid child error.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="53065">
- Restore lookup on Event message lookup field part. Add locale field to Event to
- enable locale dependent deferred bundle load during lookup field part substitution.
- </action>
- <action context="Code" dev="MH" type="fix">
- Bug in AFP font metrics that performed integer arithmetic when it should have been
- double arithemetic.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="49754" due-to="Simon Pepping">
- Bring clone() in line with the recommendations in Object.clone().
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="52966" due-to="Luis Bernardo">
- How to use native text with EPSDocumentGraphics2D.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="51599" due-to="Paul Huemer" importance="high">
- Allow https scheme URI for PDF external action target.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="50901" due-to="Carsten Pfeiffer">
- RTF percentage table column width not calculated from table.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="51009" due-to="Max Aster">
- RTF generates unexpected lines for blocks in tables. Also fix three findbugs issues.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="51007" due-to="Max Aster">
- RTF tables do not support percent column-widths.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="50435" due-to="Armin Haaf">
- Access denied (java.util.PropertyPermission org.apache.fop.fo.properties.use-cache read).
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="49763" due-to="Adrian Buza">
- Incorrect message when encountering a block in an inline in a footnote.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="47380" due-to="Georg Datterl">
- Specified rule-thickness applies only when leader-pattern is rule, otherwise should use default thickness.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="49302" due-to="Julien Aym&#x00E9;">
- Eliminate duplicate code.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="49350" due-to="Julien Aym&#x00E9;">
- Correct coding error in AFPResourceLevel#equals.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="51836" due-to="Melanie Drake">
- Throw IFException instead of NPE if navigation target (page reference) doesn't exist.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="51808" due-to="Sergey Vladimirov">
- Fixed memory waste in traits map.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="51807" due-to="Sergey Vladimirov">
- Fixed small memory waste in rowCells array construction.
- </action>
- <action context="Code" dev="GA" type="fix" fixes-bug="53005" due-to="Alberto Simões" importance="high">
- Fixed incorrect rejection of fo:wrapper inside fo:inline inside fo:footnote-body.
- </action>
- <!-- the following is also due to Vincent Hennebert, but due to a bug in forrest is not included here to prevent duplicate listing in contributors list -->
- <action context="Code" dev="VH" type="add" importance="high" due-to="Peter Hancock">
- Added support for PDF Object Streams. When accessibility is enabled and PDF version 1.5
- selected, the structure tree will be stored in object streams in order to reduce the size of
- the final PDF.
- </action>
- <action context="Code" dev="VH" type="fix" fixes-bug="46962" due-to="Alexios Giotis">
- Fixed deadlock in PropertyCache.
- </action>
- <action context="Config" dev="VH" type="add" fixes-bug="51385" due-to="Mehdi Houshmand" importance="high">
- Added configuration option to set the version of the output PDF document.
- </action>
- <action context="Code" dev="MH" type="fix" fixes-bug="52849" due-to="Luis Bernardo" importance="high">
- Fixed bug that caused a configured and installed SVG font to be stroked,
- also added an event indicating when fonts are stroked.
- </action>
- <action context="Code" dev="PH" type="fix">
- Fix of a bug introduced when merging ImproveAccessibility.
- </action>
- <action context="Code" dev="PH" type="add" fixes-bug="50391" importance="high">
- Improved support for empty flow-name mapping.
- </action>
- <action context="Layout" dev="GA" type="add" fixes-bug="32789, 49008, 49687" importance="high">
- Add support for complex scripts, including: full bidi support, support for advanced
- typographic tables, advanced support for number conversion.
- </action>
- <action context="Fonts" dev="GA" type="add" importance="high">
- Add support for OpenType advanced typographic tables (GDEF, GSUB, GPOS).
- </action>
- <action context="Code" dev="VH" type="fix" fixes-bug="52655" due-to="Luis Bernardo">
- Fixed rendering of special glyphs when using single-byte encoding mode.
- </action>
- <!-- the following is also due to Peter Hancock, but due to a bug in forrest is not included here to prevent duplicate listing in contributors list -->
- <action context="Code" dev="PH" type="add" due-to="Vincent Hennebert">
- Improvements of the Accessibility features.
- </action>
- <action context="Code" dev="CB" type="add" fixes-bug="52416" due-to="Luis Bernardo">
- Suppress unnecessary "font not found warnings" when generating AFP with raster fonts
- </action>
- <action context="Code" dev="CB" type="add" fixes-bug="51209" due-to="Luis Bernardo">
- SVG text in AFP creates miscoded GOCA text
- </action>
- <action context="Code" dev="CB" type="add" fixes-bug="50391" due-to="Peter Hancock" importance="high">
- Add support for different flow-name of fo:region-body in FOP
- </action>
- <action context="Code" dev="CB" type="add" fixes-bug="51664" due-to="Mehdi Houshmand">
- Tagged PDF performance improvement plus tests
- </action>
- <action context="Code" dev="MH" type="add" fixes-bug="52197">
- Improved AdobeStandardEncoding support in AFM files for type1 fonts
- </action>
- <action context="Code" dev="VH" type="add" fixes-bug="52151" due-to="Mehdi Houshmand">
- Added ant script to get JaCoCo code coverage.
- </action>
- <action context="Code" dev="VH" type="add" fixes-bug="52136" due-to="Mehdi Houshmand">
- Added to build file JUnit target that uses a regex to run all of the test cases. This
- reduces the risk that some of them are omitted when building FOP.
- </action>
- <action context="Code" dev="PH" type="add" fixes-bug="52089" due-to="Mehdi Houshmand" importance="high">
- Allow JPEG images to be embedded in an AFP document as is, without being decoded and
- encoded.
- </action>
- <action context="Code" dev="PH" type="add" fixes-bug="52010" due-to="Mehdi Houshmand">
- Simplification of the build: Reduced code duplication and layout engine tests.
- </action>
- <action context="Renderers" dev="JM" type="add">
- Various bugfixes to make PDFDocumentGraphics2D operational again.
- </action>
- <action context="Code" dev="PH" type="add" fixes-bug="51962" due-to="Mehdi Houshmand" importance="high">
- Fix for when the last simple-page-master referenced in a page-sequence-master is not
- chosen when force-page-count=odd.
- </action>
- <action context="Code" dev="VH" type="add" fixes-bug="51928" due-to="Mehdi Houshmand" importance="high">
- Upgraded all tests to JUnit 4.
- </action>
- <action context="Fonts" dev="PH" type="fix" fixes-bug="48696">
- Bugfix for color model in IOCA IDE structure parameter for 4- and 8-bit grayscale images.
- Revision 4.
- </action>
- <action context="Fonts" dev="PH" type="fix" fixes-bug="51760" due-to="Mehdi Houshmand" importance="high">
- Changes the way PostScript handles Graphics2D images such that if the language is set to
- level 3, the image is stored as an embedded file which has no length limit. Previously it
- was stored as an array which has a implementation limit of 65535 elements.
- </action>
- <action context="Fonts" dev="PH" type="fix" fixes-bug="51759" due-to="Mehdi Houshmand">
- PDFFactory responsible for asdigning name to a subset font.
- </action>
- <action context="Fonts" dev="PH" type="fix" fixes-bug="51530" due-to="Mehdi Houshmand" importance="high">
- Improved support for EBCDIC encoded double byte fonts fo AFP.
- </action>
- <action context="Fonts" dev="PH" type="fix" fixes-bug="51205" due-to="Mehdi Houshmand">
- Corrected typographical errors in AFPBase12FontCollection.
- </action>
- <action context="Renderers" dev="PH" type="fix" fixes-bug="48062">
- Improved fix of a bug relating to PCL painter thread safetly. Previous fix in rev 895012
- worked by synchronizing methods of a static instance of Java2DFontMetrics. This fix uses a
- unique instance for per thread.
- </action>
- <action context="Renderers" dev="PH" type="fix">
- Fixed a bug in AFP where an ArrayOutofBoundsException is throwqn when embedding a Page
- Segment.
- </action>
- <action context="Renderers" dev="VH" type="add" due-to="Michael Rubin" importance="high">
- Added support for 128bit encryption in PDF output.
- </action>
- <action context="Renderers" dev="PH" type="fix">
- Fixed a bug in AFP where the object area axes of an Include Object was incorrectly set when
- rotated by 180. </action>
- <action context="Fonts" dev="JM" type="fix" fixes-bug="51596" due-to="Mehdi Houshmand">
- Fixed a bug in TTF subsetting where a composite glyph could get
- remapped more than once resulting in garbled character.
- </action>
- <action context="Fonts" dev="JM" type="fix" fixes-bug="50605">
- Fixed a number of bugs concerning Type 1 and other single-byte fonts
- (glyph width mismatches and overlapping characters).
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Fixed a multi-threading bug for SVG images included through svg:image inside SVG documents.
- </action>
- <action context="Renderers" dev="PH" type="add" importance="high">
- Added an IFDocumentHandler filter for triggering rendering events. Created an Event that
- captures an end page event with the page number.
- </action>
- <action context="Renderers" dev="VH" type="fix">
- Fix for alternative text not working in tagged PDF for TIFF images.
- </action>
- <action context="Renderers" dev="PH" type="fix" fixes-bug="50909">
- Fixed io exception in MODCAParser caused by the improper use of mark() and reset() on the
- MODCA data input stream. Added unit test. </action>
- <action context="Fonts" dev="JM" type="fix" fixes-bug="51144" due-to="Mehdi Houshmand">
- Removed invalid entries in ToUnicode table of CID subset fonts.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="50899" due-to="Glenn Adams">
- Fixed mapping of font weights between CSS values and TextAttribute.WEIGHT_*.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- AFP GOCA: fonts were not embedded from within AFPGraphics2D.
- </action>
- <action context="Renderers" dev="JM" type="fix" importance="high">
- AFP GOCA: Changed the way FOP fonts are selected based on Batik's GVT fonts to match
- the behaviour of PDF/PS output.
- </action>
- <action context="Renderers" dev="JM" type="add" importance="high">
- Added option to place AFP NOPs right before the end of a named page group (page-sequence),
- rather than after the start.
- </action>
- <action context="Renderers" dev="JM" type="add" importance="high">
- Added option for PostScript output to optimize for file size rather than quality.
- </action>
- <action context="Renderers" dev="JM" type="add" importance="high">
- AFP GOCA: Added option to disable GOCA and to control text painting inside GOCA graphics.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- AFP GOCA: Work-around for InfoPrint's AFP implementation which seems to lose
- the character set state over Graphics Data (GAD) boundaries.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Bugfix for AFP GOCA segments: they were not properly marked as appended which could
- lead to graphics state changes in some implementations.
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="51010" due-to="Max Aster">
- Bugzilla 51010: Bookmarks create useless lines in RTF
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="51008" due-to="Max Aster">
- Bugzilla 51008: page-number-citation-last does not work in RTF
- </action>
- <action context="Renderers" dev="VH" type="add">
- Added id element to intermediate format to track the origin of content.
- </action>
- <action context="Renderers" dev="AD" type="fix" fixes-bug="50987" due-to="Matthias Reischenbacher">
- Bugzilla 50988: Fixed a NullPointerException in case a white-space fo:character was removed
- due to white-space handling.
- </action>
- <action context="Renderers" dev="AD" type="fix" fixes-bug="50987" due-to="Martin Koegler">
- Bugzilla 50987: Fixed an issue in PDF output where a link was added to the parent tree
- instead of the related structure element.
- </action>
- <action context="Renderers" dev="AD" type="fix" fixes-bug="50986" due-to="Martin Koegler">
- Bugzilla 50986: Fixed an issue where invalid PDF page content was generated due to
- incorrect ET/EMC sequences.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="50593">
- Fixed regression introduced by Bugzilla 50593: bookmarks pointing to a non-existing
- internal destination should just trigger a warning.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="50965" due-to="Martin Koegler">
- Bugzilla 50965: Fixed a regression in BlockContainerLayoutManager where margins were
- no longer reset after forced breaks.
- </action>
- <action context="Layout" dev="VH" type="fix" fixex-bug="50763" importance="high">
- Implemented non-standard behavior for basic-link areas, such that they take into account the
- heights of their descendants areas.
- </action>
- <action context="Layout" dev="VH" type="fix" importance="high">
- Fix for keep-together does not apply to fo:table-cell.
- </action>
- <action context="Layout" dev="VH" type="fix" importance="high">
- Fix for keep-together on a table containing row-spanning cells that was not honored.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="50196" due-to="Matthias Reischenbacher" importance="high">
- Fix forpadding-start ignored when table-header/footer is repeated.
- </action>
- <action context="Renderers" dev="JM" type="fix" importance="high">
- Increased maximum possible PDF size from 2GB to around 9GB (hard maximum imposed by the PDF specification).
- </action>
- <action context="Renderers" dev="JM" type="add" importance="high">
- Added support for CIE Lab colors (from XSL-FO 2.0 WD).
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="49403" due-to="Patrick Jaromin" importance="high">
- Initial work on spot colors (aka named colors) for PDF output.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="50705" due-to="Mehdi Houshmand">
- Fix to preserve the order of AFP TLEs and NOPs as given in the XSL-FO document.
- </action>
- <action context="Fonts" dev="JM" type="add" fixes-bug="50699" due-to="Alexandros Papadakis">
- Added support for lookup of alternative glyphs when additional single-byte encodings are
- used, ex. replacing "Omegagreek" by "Omega" and vice versa.
- </action>
- <action context="Code" dev="AD" type="add" fixes-bug="48334" importance="high">
- Added support for resolution of relative URIs against a specified xml:base during
- property refinement.
- </action>
- <action context="Renderers" dev="JM" type="add">
- Allow afp:no-operation to also appear under fo:page-sequence and fo:declarations.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="50635" due-to="Martin Koegler">
- Fix for issue in RenderPagesModel.checkPreparedPages() where the same page-sequence
- is potentially started multiple times.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="50636" due-to="Martin Koegler">
- Fix for performance issue when adding pages, if the total number of pages
- is significantly large.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="50626" due-to="Martin Koegler">
- Fix for performance issue when adding nodes, if the number of children
- is significantly large.
- </action>
- <action context="Config" dev="SP" type="fix">
- Fix for relative URIs in the configuration file (base, font-base, hyphenation-base) are evaluated relative to the base URI of the configuration file.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="49848" importance="high">
- Fix for correct behavior of keep-together.within-line in case there are nested inlines
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="50471">
- Fix for avoid ArrayIndexOutOfBoundsException for codepoints without a linebreak class
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="48380">
- Fix for avoid ClassCastException when using fox:widow-content-limit
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="50089">
- Fix for content after forced break in block-container is not rendered.
- </action>
- <action context="Layout" dev="JM" type="fix" fixes-bug="42034">
- Fixed adjustment of inline parent area for justified text containing a forward page reference.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="38264">
- Fixed behavior when combining hyphenation with preserved linefeeds or whitespace.
- </action>
- <action context="Code" dev="VH" type="fix" fixes-bug="49695" due-to="Joshua Marquart">
- Replaced magic numbers with constants from UnitConv and GraphicsConstants.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="42600" due-to="Max Aster">
- Added some support for break-before/-after for RTF output.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="49379" due-to="Peter Hancock" importance="high">
- Added ability to embed an external AFP page segment resource file (AFP output only).
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="46360" due-to="Alexios Giotis">
- Fixed a multi-threading issue when rendering SVG.
- </action>
- <action context="Layout" dev="JM" type="fix" fixes-bug="49885">
- Fixed retrieval of available BPD for cases spanning columns and multiple pages with differing page masters.
- </action>
- <action context="Renderers" dev="VH" type="remove">
- Removed old Renderer implementations for those output formats that have a version based on
- the new DocumentHandler architecture available (AFP, PCL, PDF, PS).
- </action>
- <action context="Fonts" dev="AC" type="fix" importance="high">
- Reinstated support for being able to specify a font cache filepath in the fop user configuration.
- </action>
- <action context="Fonts" dev="AC" type="add" importance="high">
- Added convenience support for the flushing of the Fop font cache file from the command line.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="44460" due-to="Andrejus Chaliapinas">
- Added support for PDF File Attachments (Embedded Files).
- </action>
- </release>
- <release version="1.0" date="21 July 2010">
- <action context="Renderers" dev="JM" type="fix">
- AFP Output: Fixed positioning of Java2D-based images (when GOCA is enabled).
- </action>
- <action context="Renderers" dev="JM" type="add">
- AFP Output: Added enhanced dithering functionality for images that are converted to
- bi-level images.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- AFP Output: Fix for bitmap images inside an SVG or G2D graphic (printer errors) and
- positioning fix for bitmaps from G2D graphics.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="42306" due-to="Richard Wheeldon">
- Fix for AWT viewer to correctly track page numbers in continuous display mode.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Bugfix for formatting of floating point numbers which could lead to invalid PDFs.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Added a save/restoreGraphicsState pair for the initial coordinate system in PDF output
- for easier post-processing.
- </action>
- <action context="Images" dev="JM" type="add">
- Added customization ability for the image loading framework from FOP's configuration file.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="48696" due-to="Peter Hancock">
- Bugfix for color model in IOCA IDE structure parameter for 4- and 8-bit grayscale images.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="48567" due-to="Peter Hancock">
- Initial support for CID-keyed double-byte fonts (Type 0) in AFP output.
- </action>
- <action context="API" dev="SP" type="add">Added a command-line option '-catalog' to use a catalog resolver for the XML and XSLT files</action>
- <action context="Layout" dev="SP" type="add">Implement internal character classes if the hyphenation pattern file does not contain them</action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="46486">
- Bugfix: having a special page-master for the last page caused loss of content when normal
- blocks were mixed with blocks spanning all columns.
- </action>
- <action context="Renderers" dev="VH" type="add">
- Added possibility to customize PDF tagging via the ‘role’ property.
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="48237" due-to="Peter Hancock">
- Bugfix: AFP Renderer: Respect image color settings for svg
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="48376" due-to="Venkat Reddy">
- Bugfix: AFP Renderer: Page Overlays not generated when using Intermediate Format
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="48456">
- Bugfix: AFP Renderer: Underline is incorrectly placed when reference-orientation != 0
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="48453">
- Bugfix: AFP Renderer: Page Segments not positioned correctly when reference-orientation != 0
- </action>
- <action context="Fonts" dev="JM" type="add">
- Added support for TrueType fonts with symbol character maps (like "Wingdings" and "Symbol").
- Character for these fonts are usually found in the 0xF020 to 0xF0FF range
- (a Unicode private use area).
- </action>
- <action context="Fonts" dev="JM" type="fix">
- Bugfix: Font selection fallbacks did not work in some cases (ex. bold+italic to normal)
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="48290">
- Bugfix: AFP Renderer: AttributeQualifier Triplet occurs before TLE Value.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="48048" due-to="D.W. Harks">
- Bugfix in AFP output: fixed flags in GOCA GBAR order.
- </action>
- <action context="Renderers" dev="VH" type="fix" fixes-bug="48185" due-to="Harald G. Henne">
- Bugfix in AFP output: rounding error when computing the CMYK components of a color.
- </action>
- <action context="Code" dev="VH" type="fix" fixes-bug="48167" due-to="Venkat Reddy">
- Bugfix: when #CMYK pseudo-profile was used in the rgb-icc() function, always the fallback
- RGB colors were used instead.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="48082">
- Bugfix: value of conditional space not always taken into account in the calculation of a
- table’s height.
- </action>
- <action context="Renderers" dev="JM,VH" type="add" fixes-bug="46705" due-to="Jost Klopfstein">
- Added basic accessibility and Tagged PDF support.
- </action>
- <action context="Renderers" dev="JM" type="add">
- Added support for encoding CMYK bitmap images (IOCA FS45) and TIFF images as embedded objects.
- </action>
- <action context="Code" dev="AC" type="add">
- Added support for xmlfile and xsltfile parameters in FOP's Ant Task.
- </action>
- <action context="Renderers" dev="AC" type="fix" fixes-bug="47941">
- BugFix: Maintain valid AFP by providing TLE truncation on Attribute Value Triplet values that are greater than 250 chars in length.
- </action>
- <action context="Fonts" dev="JM" type="fix" fixes-bug="47711" due-to="Nicolas Peninguy">
- Fixed generation of CIDSet object in PDF output.
- </action>
- <action context="Layout" dev="VH" type="fix">
- Fixed handling of percentage values for provisional-label-separation.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="47835" due-to="Jonathan Levinson">
- Fixed handling of percentage values for provisional-distance-between-starts.
- </action>
- <action context="Renderers" dev="CB" type="add">
- Added support for positioning Page Overlays in AFP Output
- </action>
- <action context="Fonts" dev="JM" type="add">
- Added support for specifying referenced fonts per renderer in addition to the general
- match list.
- </action>
- <action context="Renderers" dev="JM" type="add">
- Added support for creating thumbnails or preview bitmaps of fixed size for PNG and TIFF
- output.
- </action>
- <action context="Extensions" dev="JM" type="add">
- Added support for the #CMYK pseudo-profile supported by some commercial XSL implementations
- on the rgb-icc() function.
- </action>
- <action context="Layout" dev="VH" type="add" importance="high">
- Added limited support for pages of different inline-progression-dimensions within a
- page-sequence.
- </action>
- <action context="Layout" dev="AD" type="add" fixes-bug="46905">
- Added basic implementation for column-keeps.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="47710">
- White-space handling in markers with inline-content throws a NullPointerException
- in some cases.
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="47694">
- Dithered Background Shading can produce illegal AFP if objects are very small
- </action>
- <action context="Renderers" dev="CB" type="add">
- AFP Output: Added support for IMM Extension on fo:simple-page-master.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="47311" due-to="Peter Coppens">
- Added an initial set of extensions for prepress support (fox:bleed, fox:crop-offset,
- fox:crop-box and fox:scale). This is currently supported only by PDF and Java2D renderers.
- </action>
- <action context="Renderers" dev="JM" type="add">
- PCL Output: Added support for specifying the output bin.
- </action>
- <action context="Renderers" dev="JM" type="add">
- AFP Output: Added support for embedding external AFP form maps (form defs) using the
- afp:include-form-map extension.
- </action>
- <action context="Renderers" dev="JM" type="add">
- AFP Output: Added support for AFP font embedding. Note: this changes the default behaviour.
- Like with PDF and PS, all fonts are embedded by default unless matched in the
- "referenced-fonts" section in the configuration.
- </action>
- <action context="Renderers" dev="AD" type="fix" fixes-bug="47508" due-to="Bharat Attaluri">
- Bugfix: Error while writing TLE's attribute qualifier in the output.
- </action>
- <action context="Renderers" dev="CB" type="fix">
- Bugfix: support justified text in AFP Renderer (already working in AFP Painter)
- </action>
- <action context="Renderers" dev="AD" type="add">
- AFP Renderer Raster Fonts:
- <ul>
- <li>added support for fractional font-sizes in the configuration.</li>
- <li>selection of the smaller font-size, in case two possible fallbacks have the
- same difference to a requested size.</li>
- </ul>
- </action>
- <action context="Fonts" dev="CB" type="fix">
- Bugfix: support PFM Files with no extent table.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="46960">
- Bugfix: previously retrieved markers were not cleared if the new marker was empty.
- </action>
- <action context="Fonts" dev="VH" type="fix" fixes-bug="47232" due-to="Maxim Wirt">
- Bugfix: for the last character of a Type1 font, always a width of 0 was returned.
- </action>
- <action context="Code" dev="VH" type="fix">
- Changed meaning of ‘-v’ option to ‘verbose’, which will print FOP’s version and proceed.
- Added a ‘-version’ option to simply print the version then exit, following Java practices.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="47101">
- Bugfix: The cells of a table inside a marker were duplicated at every marker retrieval.
- </action>
- <action context="Images" dev="JM" type="fix">
- Bugfix: use the effective color profile supplied by the ImageEncodingHelper, instead of the
- original one.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Bugfix: reset graphic state when a page is finished in PostScript.
- </action>
- <action context="Renderers" dev="JM" type="add">
- Added setting to enable dithered painting of filled rectangles in AFP and PCL.
- </action>
- <action context="Layout" dev="VH" type="fix">
- Bugfix: footnotes occurring within the forced height of a table row did not appear on the
- output
- </action>
- <action context="Renderers" dev="JM" type="update" fixes-bug="47031" due-to="Francois Fernandes">
- PDFGraphics2D.writeClip doesn't generate a clip command anymore when the clip path
- is empty.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="47000">
- Added a custom text painter for rendering SVG text using text operators when rendering
- to PostScript or EPS. Text is no longer painted as shapes, thus creating much smaller files.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Fixed a bug that left the PrintRenderer unconfigured even if a configuration was
- specified for "application/X-fop-print".
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="46882" due-to="Yegor Kozlov">
- Fixed the handling of CMYK colors in PDFGraphics2D.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="46489">
- Fixed a bug when combining a forced break with a "last" page-master. The restart
- of the algorithm would start at the index of the penalty corresponding to the last
- page-break. This has been changed to the index of the first element after the last
- page-break.
- </action>
- <action context="Fonts" dev="JM" type="add">
- Added a command-line tool to list all configured fonts
- (org.apache.fop.tools.fontlist.FontListMain).
- </action>
- <action context="Code" dev="AD" type="add" fixes-bug="46828" due-to="Dario Laera">
- Added the possibility to use CachedRenderPagesModel, to conserve memory in case
- of large documents with a lot of cross-references (area tree will be serialized to
- disk to avoid keeping it entirely in memory).
- </action>
- <action context="Fonts" dev="JM" type="add">
- AFP Fonts: Added support for full URI resolution on configured AFP fonts.
- </action>
- <action context="Renderers" dev="JM" type="add">
- AFP Output: Tag Logical Element (TLE) is now also allowed on fo:page-sequence
- (page group level).
- </action>
- <action context="Layout" dev="JM" type="fix">
- Fixed BPD trait and border painting for leaders with leader-pattern="space"
- (and similar cases).
- </action>
- <action context="Renderers" dev="JM" type="add">
- AFP Output: Added support for Invoke Medium Map (IMM).
- </action>
- <action context="Renderers" dev="JM" type="add">
- Introduced a new, additional intermediate format optimized for performance. Please see
- the intermediate format documentation for details.
- </action>
- <action context="Fonts" dev="JM" type="fix" fixes-bug="46686" due-to="Alok Singh">
- Use temporary directory for the font cache if the user home directory is not
- write-accessible.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="45342" due-to="Emil Maskovsky">
- AFP Fonts: Fixed interpretation of metric for fonts with fixed metrics and made sure
- all repeating groups in FNP (Font Position) are processed.
- </action>
- <action context="Renderers" dev="JM" type="add">
- AFP Output: Added a configuration option to override the resource level defaults in the
- code.
- </action>
- <action context="Code" dev="VH" type="fix" fixes-bug="46638">
- MinOptMaxUtil.toMinOptMax was converting LengthRangeProperty objects into illegal MinOptMax
- objects (in some cases opt could be inferior to min).
- </action>
- <action context="Layout" dev="VH" type="add" fixes-bug="46315" due-to="Georg Datterl">
- Added extension to disable column balancing before blocks spanning the whole page, in
- multiple-column documents.
- </action>
- <action context="Renderers" dev="JM" type="add">
- AFP Output: Bilevel images in resource groups as generated as hard page segments
- (instead of image objects) for better interoperability with older IPDS environments
- and for better printing performance.
- </action>
- <action context="Fonts" dev="JM" type="add">
- FOP now creates ToUnicode CMaps for single-byte fonts that don't use built-in
- encodings to help PDF text extractors interpreting characters.
- </action>
- <action context="Fonts" dev="JM" type="add">
- Added support for forcing single-byte encodings for TrueType fonts without
- creating an XML font metric file (see "encoding-mode" attribute on "font" element)
- </action>
- <action context="Layout" dev="JM" type="fix" fixes-bug="45306">
- Fixed fo:instream-foreign-object inside fo:marker.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Fixed black backgrounds occurring for transparent images in PCL output.
- </action>
- <action context="Renderers" dev="CB" type="fix" fixes-bug="46369">
- Fixed bug that caused AFP Renderer Extensions to be ignored.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="46319">
- Fixed a memory-leak in Marker.MarkerAttribute, where an instance was used both as key and value in
- a WeakHashMap, effectively neutralizing the benefit of using WeakReferences. Solved by extending
- PropertyCache to work for MarkerAttributes as well.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixed-bug="46360">
- Fixed a multi-threading issue when rendering SVG.
- </action>
- <action context="Renderers" dev="AC" importance="high" type="add">
- AFP Output: An AFPGraphics2D implementation which provides the ability to use Batik to drive the production of AFP Graphics (GOCA) output from SVG.
- </action>
- <action context="Renderers" dev="AC" importance="high" type="add">
- AFP Output: Resource group leveling, external streaming, and de-duplication of images and graphics using IncludeObject and ResourceGroup.
- </action>
- <action context="Renderers" dev="AC" importance="high" type="add">
- AFP Output: Native image embedding support (e.g. JPEG, GIF, TIFF) using ObjectContainer and a MOD:CA Registry implementation.
- </action>
- <action context="Fonts" dev="AC" type="fix">
- More robust AFP font parsing, although it is still in need of some rework in the future.
- </action>
- <action context="Images" dev="JM" type="add" fixes-bug="41657">
- Added support for SVG 1.2 functionality inside fo:instream-foreign-object.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="46240">
- Fixed a bug when combining break-before with a span change.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="46211" due-to="rogov.AT.devexperts.com">
- Fixed some multi-threading issues in FontCache.java:
- <ul>
- <li>remove the unused private readObject()</li>
- <li>make the changeLock member final (initialization-safety + impossible to reassign)</li>
- <li>perform the HashMap check for a failed font inside the synchronized block to avoid a race condition</li>
- </ul>
- </action>
- <action context="Renderers" dev="AD" type="add" fixes-bug="45113" due-to="Alexander Stamenov">
- Added PDF /Launch action: references to URIs using the file:// protocol will now generate
- a /Launch action as opposed to a more general /URI (which doesn't yield the expected result
- for this protocol).
- </action>
- <action context="Layout" dev="JM" type="fix">
- Fixed a problem where the BPD or a block area could be wrong if there is a nested,
- absolutely positioned area (for example a block-container).
- </action>
- <action context="Code" dev="VH" type="fix" fixes-bug="45971" due-to="Tow Browder">
- Improved the behaviour of the command line interface.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="40798">
- Bugzilla 40798: A conditional-page-master-reference with page-position="last" qualifies
- for a first page, if it is also the last. Additionally: also added support for
- page-position="only".
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="45842" due-to="Carsten Siedentop">
- Make fop.bat and fop.cmd use the %FOP_OPTS% environment variable.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="45795">
- PDF Output: Added support for handling 16-bit alpha channel. They are currently
- converted to 8 bits.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- PDF Output: Made sure the XMP Metadata stream is never compressed.
- </action>
- <action context="Fonts" dev="JM" type="fix" fixes-bug="45734" due-to="J. Frantzius">
- Fix for PFMReader after bug #43089 changed the behavior of PFMFile. Fixes baseline
- problems when Type 1 fonts are used in conjunction with XML font metric files.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="45616" due-to="Pavel Kysilka">
- Fix for table handling in RTF output, so the output works with OpenOffice and AbiWord, too.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="45667">
- Quick-fix to avoid a possible NullPointerException when using
- empty inlines and hyphenation.
- </action>
- <action context="Layout" dev="JM" type="add">
- Added missing generation of areas for empty grid units in tables with collapsing border
- model.
- </action>
- <action context="Code" dev="JM" type="fix" importance="high">
- Fixed memory leak in property cache (not cleaning stale PropertyCache$CacheEntry instances).
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Fixed text stroking in SVG when the stroke-width is zero.
- </action>
- <action context="Layout" dev="JM" type="fix">
- Fixed the source for a division by zero when the content of an fo:leader with
- leader-pattern="use-content" collapses to zero width during layout.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Fixed border trait parsing for the area tree XML when CMYK or ICC colors were used.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="45606" due-to="Pavel Kysilka">
- Fixed generation of "fonttbl" for RTF output to fix loading problem with AbiWord.
- </action>
- <action context="Layout" dev="JM" type="fix">
- Fixed ID resolution for nested bookmarks with duplicated IDs.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="45490" due-to="Thomas Stieler">
- Fixed a slight error when resolving non-file URLs: avoid
- altering the original 'href' if the protocol is other than 'file:'
- </action>
- <action context="Layout" dev="JM" type="fix" fixes-bug="45470">
- Added LayoutManagerMapping.registerMaker() to make registration of custom
- layout managers easier.
- </action>
- <action context="Layout" dev="LF" type="fix">
- Fixed absolute positioning of block-containers when specified
- using right and bottom instead of left and top.
- </action>
- <action context="Renderers" dev="AC" type="add">
- Added PDF encryption parameter support in configuration.
- </action>
- <action context="Layout" dev="LF" type="add">
- Allowing non-zero borders and padding on page regions when
- relaxed validation is turned on.
- </action>
- <action context="Layout" dev="LF" type="fix">
- Fixed an inconsistency in footnote handling that led to unnecessary
- empty areas in pages whose last normal line contains footnotes
- when the page bpd is not the same for all pages.
- </action>
- <action context="Code" dev="AD" type="update" importance="high">
- Changed FONode.addCharacters() parameter to closer match the signature of
- the standard SAX characters() event (reduces confusion and computations).
- <em>!! Implementors of extensions that subclass FONode directly, and
- offer an implementation for addCharacters() should take care to make
- similar modifications in their code !!</em>
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="45115" due-to="Martin Edge">
- Added a PCL-specific extension attribute on simple-page-master for controlling
- the simplex/duplex mode.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="45097">
- Corrected white-space-treatment for situations where an inline-node is the first/last
- child node of an fo:block, without preceding/following text.
- </action>
- <action context="Layout" dev="MB" type="add">
- Implemented word-by-ford font-selection strategy on text.
- </action>
- <action context="Layout" dev="MB" type="add">
- Support character-by-character font-selection strategy on fo:character element.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="44794">
- Added support for page-number-citation and page-number-citation-last
- of fo:inline. Corrected behavior for page-number-citation-last
- of fo:block: forward references now properly resolved.
- </action>
- <action context="Fonts" dev="JM" type="add">
- For auto-detected fonts it is now possible to specify that a font needs to be referenced
- rather than embedded (for the output formats that support this distinction).
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="42423">
- Added support for the "id" attribute on fo:wrappers when used
- as a child of the fo:flow.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="41500">
- Fixed a ClassCastException when using an fo:wrapper as a child
- of an fo:block-container.
- </action>
- <action context="Fonts" dev="AC" type="add" importance="high">
- Add support for font substitution.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="43650">
- PCL Renderer: Improved page format selection so it doesn't interfere with
- duplex printing.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="42703">
- Fixed a regression introduced by the fix for
- <link href="https://issues.apache.org/bugzilla/show_bug.cgi?id=44286">Bugzilla 44286</link>.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="43591">
- Activated min-height/max-height and min-width/max-width properties.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="44203">
- Fixed a logic error in Hyphenator.java:
- If the source had an associated InputStream, an UnsupportedOperationException was
- triggered.
- </action>
- <action context="Renderers" dev="AD" type="add" fixes-bug="44634">
- Add partial support for the "show-destination" property on fo:basic-link
- (PDF output only; see limitations on the compliance page)
- </action>
- <action context="Layout" dev="JM" type="add" importance="high">
- Added minimal support for integer keep values on the various keep properties on block-level
- FOs. For now, all integer values are treated the same (i.e. without strength distinction).
- Using integers allows to avoid overflows that can happen when "always" is used extensively.
- </action>
- <action context="Renderers" dev="JM" type="add">
- Added support for rendering pages using JPS (Java Printing System). See new example:
- examples/embedding/java/ExamplesFO2JPSPrint.java
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="41687">
- Restored ability to specify from/to and odd/even pages as well as the number of copies
- for printing from the command-line.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="44678" due-to="Antti Karanta">
- Added ability to pass a preconfigured PrinterJob instance to the PrintRenderer via
- the rendering options map.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="44743" due-to="Yegor Kozlov">
- Added a public accessor for reference to the current page to PDFGraphics2D.
- </action>
- <action context="Fonts" dev="JM" type="add" fixes-bug="44737" due-to="Jason Harrop">
- Added support for auto-configuring TrueType Collections. XML font metrics files for
- *.ttc fonts are not required anymore.
- </action>
- <action context="Renderers" dev="JM" type="update">
- When a JPEG image is embedded, an optionally embedded color profile is filtered out
- as it's already embedded separately in the PDF file.
- </action>
- <action context="Fonts" dev="JM" type="add" importance="high">
- Added support for addressing all glyphs available in a Type 1 font, not just the ones
- in the font's primary encoding.
- </action>
- <action context="Code" dev="JM" type="add" importance="high">
- Added an event handling framework which allows to get better feedback from within FOP
- with the ability to customize problem management.
- </action>
- </release>
- <release version="0.95" date="05 August 2008">
- <notes>
- <section>
- <title>Notes</title>
- <p>
- Besides the important changes listed below, the most important areas with
- improvements in this release are:
- </p>
- <ul>
- <li>
- Many bugfixes in tables, plus some new features (full support for keeps and
- breaks, border conditionality, background on columns and header/footer/body)
- </li>
- <li>
- Improvements and bugfixes for font handling and font
- auto-detection/-registration.
- </li>
- <li>
- Performance improvements and memory optimizations for the property handling
- in the FO tree.
- </li>
- </ul>
- <p>
- Please note that with this release, we've dropped support for Java 1.3.
- FOP will, from now on, <strong>require at least Java 1.4</strong>.
- </p>
- <p>
- There have been a few changes in tables that make FOP both more strict and more
- compliant to the Recommendation:
- <ul>
- <li>XSL-FO 1.1 explicitly states that a row-spanning fo:table-cell element is not
- allowed to span further than its enclosing fo:table-header/footer/body element
- (see bottom of <link href="http://www.w3.org/TR/xsl11/#fo_table">section
- 6.7.3</link>). From now on FOP will give a validation error if a document
- contains such an erroneous cell.
- </li>
- <li>
- <p>If an fo:table element contains explicit fo:table-column children, then those
- elements set the total number of columns in the table. This means that a
- validation error will now occur if a row contains more cells than available
- columns. This change allows to improve performance, since the rendering of the
- table may start as soon as the table-column elements have been parsed.</p>
- <p>If more flexibility is needed, then the fo:table-column elements may be just
- omitted. The final number of columns will then be set by the row that has the
- most cells.</p>
- </li>
- </ul>
- </p>
- <p>
- The image libraries Jimi and JAI are no longer needed (and used) for image loading.
- Instead we rely completely on the Image I/O API that has been introduced with
- Java 1.4. If you still need support for bitmap image formats that do not work
- out-of-the-box, we recommend adding
- <link href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</link>
- (an Image I/O compatible image codec package) to the classpath. JAI is still required
- for building the FOP distribution but it is optional for normal builds and at run-time.
- </p>
- <note>
- This final 0.95 release also includes all of the
- <a href="changes_0.95beta.html">changes made for Apache FOP 0.95beta</a>.
- </note>
- </section>
- </notes>
- <action context="Renderers" dev="JM" type="fix">
- Fixed a color selection problem which occurred after an image has been painted
- through the Graphics2DAdapter in PDF output.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="41306">
- Fixed page ordering problem with AWTRenderer.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="39980">
- Fixed image scaling for RTF output.
- </action>
- <action context="API" dev="JM" type="fix">
- Fixed the -imagein command-line option.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="43825" due-to="Maximilian Aster">
- Added support for fo:leader for RTF output (no full support!). Fixes problems with empty leaders
- being used to force empty lines among other issues.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="43824" due-to="Maximilian Aster">
- Added support for page-number-citation for RTF output.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="43606" due-to="Maximilian Aster">
- Fixed handling of proportional-column-width() and percentages for table column in RTF
- output.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="45295">
- Fixed NullPointerException when page-number-citations are used inside a marker.
- </action>
- <action context="Images" dev="JM" type="fix">
- Fixed two bugs concerning resolution handling with SVG images and their
- conversion to bitmaps for RTF output.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="44887" importance="high">
- Fixed potential multi-threading problem concerning the use of DecimalFormat.
- </action>
- <action context="Layout" dev="JM" type="fix" fixes-bug="44412">
- Regression bugfix: Multiple collapsible breaks don't cause empty pages anymore.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Fixed resolution handling inside AWT preview dialog.
- </action>
- <action context="Renderers" dev="JM" type="fix" importance="high">
- Fixed positioning of absolutely positioned block-containers in multi-column documents.
- </action>
- <action context="Renderers" dev="JM" type="fix" importance="high">
- Fixed rendering of fixed block-containers in AFP output.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="44621" importance="high">
- Various bugfixes for table layout.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Fixed regression causing bad positioning of block-containers if used as descendant
- of a table-cell.
- </action>
- <action context="Fonts" dev="JM" type="fix">
- Fixed text extraction problem with ZapfDingbats and Symbol font in PDF output.
- </action>
- <action context="Images" dev="JM" type="fix">
- Fixed a performance problem concerning image serialization.
- </action>
- <action context="Fonts" dev="JM" type="fix">
- Fixed NullPointerException when loading a TrueType font using XML font metric files.
- </action>
- </release>
- <release version="0.95beta" date="26 March 2008">
- <notes>
- <section>
- <title>Notes</title>
- <p>
- Besides the important changes listed below, the most important areas with
- improvements in this release are:
- </p>
- <ul>
- <li>
- Many bugfixes in tables, plus some new features (full support for keeps and
- breaks, border conditionality, background on columns and header/footer/body)
- </li>
- <li>
- Improvements and bugfixes for font handling and font
- auto-detection/-registration.
- </li>
- <li>
- Performance improvements and memory optimizations for the property handling
- in the FO tree.
- </li>
- </ul>
- <p>
- Please note that with this release, we've dropped support for Java 1.3.
- FOP will, from now on, <strong>require at least Java 1.4</strong>.
- </p>
- <p>
- There have been a few changes in tables that make FOP both more strict and more
- compliant to the Recommendation:
- <ul>
- <li>XSL-FO 1.1 explicitly states that a row-spanning fo:table-cell element is not
- allowed to span further than its enclosing fo:table-header/footer/body element
- (see bottom of <link href="http://www.w3.org/TR/xsl11/#fo_table">section
- 6.7.3</link>). From now on FOP will give a validation error if a document
- contains such an erroneous cell.
- </li>
- <li>
- <p>If an fo:table element contains explicit fo:table-column children, then those
- elements set the total number of columns in the table. This means that a
- validation error will now occur if a row contains more cells than available
- columns. This change allows to improve performance, since the rendering of the
- table may start as soon as the table-column elements have been parsed.</p>
- <p>If more flexibility is needed, then the fo:table-column elements may be just
- omitted. The final number of columns will then be set by the row that has the
- most cells.</p>
- </li>
- </ul>
- </p>
- <p>
- The image libraries Jimi and JAI are no longer needed (and used) for image loading.
- Instead we rely completely on the Image I/O API that has been introduced with
- Java 1.4. If you still need support for bitmap image formats that do not work
- out-of-the-box, we recommend adding
- <link href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</link>
- (an Image I/O compatible image codec package) to the classpath. JAI is still required
- for building the FOP distribution but it is optional for normal builds and at run-time.
- </p>
- </section>
- </notes>
- <action context="Layout" dev="JM" type="fix" fixes-bug="44412">
- Bugfix: The before border of a block is no longer swallowed if its first child issues
- a break-before.
- </action>
- <action context="Layout" dev="JM" type="fix" fixes-bug="44412">
- Bugfix: When there was a forced break after a block with (conditional) borders the
- border-after wasn't painted.
- </action>
- <action context="Layout" dev="VH" type="fix">
- Bugfix: a forced break inside a cell was ignored when occurring before the minimum height
- set on the enclosing row was set.
- </action>
- <action context="Layout" dev="JM" type="fix">
- Fixed exceptions when lists, tables or block-container are children of an inline-level
- FO.
- </action>
- <action context="Layout" dev="VH" type="add" importance="high">
- Added support for background on fo:table-column and fo:table-header/footer/body elements.
- </action>
- <action context="Layout" dev="VH" type="fix">
- Fixed the rendering of the area of a table corresponding to border-separation, which must
- be filled with the background of the table, and not the rows.
- </action>
- <action context="Layout" dev="VH" type="fix">
- Improved conformance: even if a table-cell spans several rows its background must
- correspond to the first row spanned.
- </action>
- <action context="Renderers" dev="JM" type="fix" due-to="Gordon Cooke">
- Slight improvement for thin lines in Java2D/AWT output.
- </action>
- <action context="Layout" dev="VH" type="add">
- Added full support for keep-with-previous on fo:table-row and in fo:table-cell elements.
- </action>
- <action context="Code" dev="MB" type="add">
- Turned on XInclude processing for the main source given on the command line.
- </action>
- <action context="Fonts" dev="JM" type="fix" fixes-bug="44451" due-to="Justus Piater">
- Improved the font auto-detection so fonts accessed using the font-family name are
- selected with higher accuracy.
- </action>
- <action context="API" dev="JM" type="remove">
- Removed deprecated methods in the "apps" package that were left-overs from the API
- discussions.
- </action>
- <action context="Fonts" dev="JM" type="add">
- Added support for unusual font encodings (like for Symbol or Cyrillic fonts) of Type 1
- fonts in PDF and PostScript output.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="44321">
- Moved to the FO tree stage the check for break-before/after on table-row while spanning in
- progress.
- </action>
- <action context="Layout" dev="VH" type="add">
- Added full support for breaks before and after table cells (that is, break-before/after set
- on the first/last child of a cell).
- </action>
- <action context="Layout" dev="VH" type="add">
- Added full support for breaks inside the cells of a table.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="41631">
- Added correct percentage resolution for arguments to the proportional-column-width() function.
- </action>
- <action context="Fonts" dev="JM" type="fix">
- Bugfix for date formatting with negative time zones in the PDF's Info object.
- This affected PDF/A compliance.
- </action>
- <action context="Renderers" dev="JM" type="add">
- Added an option to disable the default sRGB profile in PDF output for those who
- don't care about color fidelity, but care about PDF file size.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="43705">
- Fixed a bug when the rgb-icc() function was used either before the fo:declarations,
- or in documents without a fo:declarations node. In such cases, the sRGB fallback
- is now used to avoid an ugly NullPointerException.
- </action>
- <action context="Code" dev="AD" type="add">
- Added very basic parsing for the xml:lang shorthand.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="44343">
- Fixed a bug when using relative font-size (smaller/larger) in combination
- with percentages.
- </action>
- <action context="Fonts" dev="JM" type="fix">
- Bugfix for handling of optional tables in subset TrueType fonts. This bug caused errors
- in various PDF viewers.
- </action>
- <action context="Renderers" dev="JM" type="add">
- Added support for the natural language indentifier ("Lang" in the document catalog)
- for PDF documents based on the language/country values on fo:page-sequence.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="44286" due-to="Stefan Ziel">
- Fixed a memory-leak in XMLWhiteSpaceHandler.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="44289">
- Fixed the resolution of borders when header/footer is omitted at page breaks.
- </action>
- <action context="Layout" dev="VH" type="add" importance="high" fixes-bug="43934">
- Added support for conditional borders in tables, for both the separate and the collapsing
- border model.
- </action>
- <action context="Layout" dev="JM" type="fix" fixes-bug="44160">
- Fixed a possible IndexOutOfBoundsException that could happen with certain constellations
- when footnotes are used.
- </action>
- <action context="Layout" dev="JM" type="fix">
- Compliance fix: for absolutely positioned block-containers, "top" wasn't
- interpreted correctly.
- </action>
- <action context="Extensions" dev="JM" type="add">
- New extension attribute fox:transform on fo:block-container allows free-form transformation
- (rotation, scaling etc.) of absolute and fixed block-containers. Supported only
- for PDF, PS and Java2D-based renderers.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Fixed logic error setting the transformation matrix for block-container viewports
- (applies to absolute and fixed block-containers only).
- Important: External renderer implementations need to adjust for the change and implement
- the new method concatenateTransformationMatrix(AffineTransform) if the renderer is
- derived from AbstractPathOrientedRenderer.
- </action>
- <action context="Images" dev="JM" importance="high" type="fix">
- A new image loading framework has been introduced to fix various problems with external
- graphics and improve performance.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Fixed generation of named destinations so it works when the PDF document is encrypted.
- </action>
- <action context="Renderers" dev="JM" type="add">
- PostScript output now generates the bounding box DSC comments for the whole document.
- </action>
- <action context="Renderers" dev="JM" type="add">
- Added support for PDF page labels.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="44176" due-to="Patrick Jaromin">
- Added support for custom fonts in Java2DRenderer and derived renderers.
- </action>
- <action context="Extensions" dev="JM" type="add" importance="high">
- Added new extension element: fox:external-document. It allows to add whole documents
- such as multi-page TIFF images to be inserted as peers to a page-sequence. Each image
- will make up an entire page. See the documentation for details.
- </action>
- <action context="Layout" dev="JM" type="add">
- Added minimal support for the .minimum/.maximum components of block/inline-progression-dimension
- on fo:external-graphic and fo:instream-foreign-object.
- </action>
- <action context="Layout" dev="JM" type="add" importance="high">
- Added support for scale-down-to-fit and scale-up-to-fit (introduced in XSL 1.1).
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="43633">
- Bugfix: content of a row with zero height overriding the previous row
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="37993">
- Bugfix: allow multiple bookmarks to point at the same destination.
- </action>
- <action context="Layout" dev="JM" type="fix" fixes-bug="43917">
- Bugfix for border-after painting and element list generation when a
- forced break is involved.
- </action>
- <action context="Layout" dev="JM" type="fix" fixes-bug="40230">
- Bugfix: no empty page is generated anymore if there's no content
- after a break-after.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="43803">
- Restored proper handling of fo:table-cell having no children, which is allowed in relaxed
- validation mode.
- </action>
- <action context="Layout" dev="JM" type="fix">
- Memory Leak fixed in the Property Cache. Fixed by Jeremias Maerki. Reported and Tested By
- Chris Bowditch.
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="43712">
- Bugfix in tables: wrong element generation by the merging algorithm when glues must be
- produced to cope with conditional spaces. The corresponding length was added twice: one in
- the glue itself and one in the following box.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix for URI resolution: Make StreamSources without system identifier work again.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="43910" due-to="David Delbecq">
- Avoid a NullPointerException in AreaTreeHandler.endDocument().
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="43766">
- Bugfix: breaks generated by the merging algorithm for a table-row containing empty cells
- had always a penalty of 900.
- </action>
- <action context="Layout" dev="JM" type="add" fixes-bug="43605" due-to="V. Schappert">
- Added methods for fo:page-number-citation(-last) in FOEventHandler.
- </action>
- <action context="Layout" dev="VH" type="add">
- Step towards performance: the collapsing-border resolution algorithm no longer triggers the
- retrieving of the whole table, when possible.
- </action>
- <action context="Layout" dev="VH" type="fix">
- In case of missing cells the border-end of the table was applied to an inner cell, instead
- of the (empty) cell in the last column.
- </action>
- <action context="Layout" dev="VH" type="fix">
- Fixed the resolution of borders with table-columns (border-before/after was wrongly applied
- to every cell of the column).
- </action>
- <action context="Layout" dev="VH" type="fix" fixes-bug="42768">
- Fixed the resolution of border-end on cells spanning several rows.
- </action>
- <action context="Fonts" dev="JM" type="fix" fixes-bug="43835" due-to="David Churavy">
- Bugfix: Use Font.getName() (logical font name) instead of Font.getFontName()
- (localized) when registering fonts from AWT.
- </action>
- <action context="Fonts" dev="JM" type="fix">
- Made the way TrueType fonts are embedded in PDF compliant to the
- specification so viewers correctly identify subset fonts.
- </action>
- <action context="Fonts" dev="JM" type="fix">
- Fixed font-autodetection so fonts with uppercase extensions are
- detected, too.
- </action>
- <action context="Fonts" dev="JM" type="update">
- Improved font auto-detection and handling of AWT-supplied fonts in order
- to achieve better results when using multiple output formats. Whenever
- possible, the font names appearing in the operating system can also
- be used in XSL-FO.
- </action>
- <action context="Renderers" dev="JM" type="fix">
- Fixed regression: transparent-page-background was not recognized for PNG output.
- </action>
- <action context="Layout" dev="VH" type="add">
- Added check for table-cells which span more rows than available in their parent element
- (table-header/footer/body).
- </action>
- <action context="Layout" dev="AD" type="add">
- Added support for fo:markers in fo:inline and fo:basic-link.
- </action>
- <action context="Renderers" dev="JM" type="update" importance="high">
- PDF Transcoder (SVG) text painting has been completely rewritten.
- Except for some special cases (with filters for example), all text
- (including flow text) is now painted using PDF text operators.
- </action>
- <action context="Layout" dev="AD" type="add" fixes-bug="42748">
- Added support for ids on empty fo:inlines.
- </action>
- <action context="Fonts" dev="AC" type="add" fixes-bug="42982" due-to="Max Berger">
- Add Font support in jar files.
- </action>
- <action context="Renderers" dev="AC" type="fix" fixes-bug="43042" due-to="Andrejus Chaliapinas">
- Postscript extension cleanup.
- </action>
- <action context="Renderers" dev="AC" type="fix" fixes-bug="43587">
- Fix to avoid ClassCastException where multiple ps:ps-comments are declared within fo:declarations.
- </action>
- <action context="Fonts" dev="AC" type="fix" fixes-bug="43143">
- Fix to avoid NullPointerException when parsing ExpertEncoded and ExpertSubsetEncoded Type 1 fonts.
- </action>
- <action context="Renderers" dev="AC" type="fix" fixes-bug="43439">
- Fixes missing TLE value attribute when using AreaTree input with the AFP renderer.
- </action>
- <action context="Renderers" dev="JM" type="add">
- Added generic structures to the PDF library in order to support PDF
- file in fo:external-graphic later.
- </action>
- <action context="Code" dev="JM" type="add" fixes-bug="43597" due-to="Max Berger">
- Added support for SVGZ.
- </action>
- <action context="Layout" dev="JM" type="fix">
- Bugfix for NPE with empty table-row (regression from 0.93).
- </action>
- <action context="Renderers" dev="JM" type="add">
- Added a configuration setting to the PCL renderer to disable PJL commands.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="43464" due-to="Bruno Feurer">
- Fix to avoid a ClassCastException in renderer configuration.
- </action>
- <action context="Renderers" dev="JM" type="fix" fixes-bug="43439" due-to="Adrian Cumiskey">
- Fixed the restoration of the TLE values from the intermediate format
- for the AFP extension elements.
- </action>
- <action context="Renderers" dev="JM" type="add" fixes-bug="43041" due-to="Adrian Cumiskey">
- Added a configuration setting for the renderer/device resolution to the AFP renderer.
- </action>
- <action context="Layout" dev="AD" type="update">
- Facilitate the implementation for font-selection-strategy:<br/>
- • Changed FontInfo.fontLookup to always return an array of FontTriplet.<br/>
- • Changed CommonFont.getFontState to return an array of FontTriplet.<br/>
- • Initial modifications to the related LMs: initialized with
- the font corresponding to the first of the triplets.<br/>
- </action>
- <action context="Layout" dev="AD" type="update">
- PropertyCache phase 2:<br/>
- • improvement of the PropertyCache itself should now guarantee acceptable
- performance of the static caches in multi-session environments, which is
- a possible problem with synchronizedMap.<br/>
- • changed CommonFont to use the cache:
- added CachedCommonFont to contain the properties that are always cacheable
- CommonFont itself is only cached if the remaining properties are absolutes.<br/>
- • changed CommonHyphenation, KeepProperty, ColorProperty and FontFamilyProperty to use the cache.<br/>
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="42705">
- Fixed swallowing PCDATA in text-node children of
- retrieved markers.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="42703">
- Fixed erroneous white-space removal in retrieved markers.
- </action>
- <action context="Layout" dev="AD" type="fix" fixes-bug="43274" due-to="ckohrn.at.tng.de">
- Fixed erroneous usage of inherited color-values in SVG.
- </action>
- </release>
- <release version="0.94" date="24th August 2007">
- <action context="Code" dev="JM" type="fix">
- AFP Renderer: Bugfix for 1 bit images where the width is not a multiple of 8.
- </action>
- <action context="Code" dev="MM" type="add" importance="high">
- Support for keep-together.within-line="always".
- </action>
- <action context="Code" dev="MM" type="fix">
- Fixed incomplete support for Unicode Word Joiner characters (U+2060 and U+FEFF).
- </action>
- <action context="Code" dev="VH" type="add">
- Add support for conditional spaces in table-cells.
- </action>
- <action context="Code" dev="AD" type="add" fixes-bug="42785" due-to="Max Berger">
- Support alignment-adjust for images.
- </action>
- <action context="Code" dev="AD" type="add" fixes-bug="41044" due-to="Richard Wheeldon">
- Partial application of the patch in Bugzilla 41044:
- * addition of a generic PropertyCache to be used by all Property
- types that can be safely canonicalized
- * modified EnumProperty, StringProperty, NumberProperty, EnumNumber
- and FixedLength to make use of the cache infrastructure
- </action>
- <action context="Code" dev="AD" type="update" fixes-bug="41656">
- Refactoring in the fo package:
- -> removal of the childNodes instance member in fop.fo.FObj
- -> addition of a firstChild instance member in fop.fo.FObj
- -> addition of a siblings instance member in fop.fo.FONode
- -> addition of a FONodeIterator interface in FONode + corresponding implementation in FObj
- -> changed implementations of FObj.addChildNode(), .removeChild() and .getChildNodes()
- </action>
- <action context="Code" dev="AD" type="update" fixes-bug="42089" due-to="Adrian Cumiskey">
- Code cleanup and restructuring:
- Refactoring of PageSequenceLayoutManager and provide common FObj id property use
- </action>
- <action context="Code" dev="AD" type="add">
- Slight improvement of relative font-weight handling in the properties
- package.
- </action>
- <action context="Code" dev="JM" type="update">
- Updated PDF/A-1b support according to ISO-19005-1:2005/Cor.1:2007.
- </action>
- <action context="Code" dev="JM" type="add" importance="high" fixes-bug="41831" due-to="Adrian Cumiskey">
- Add support for font auto-detection (easier font configuration).
- </action>
- <action context="Code" dev="JM" type="update" fixes-bug="42406" due-to="Hussein Shafie">
- Use source resolution setting for bitmap images which don't provide their own
- resolution.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="42109" due-to="Paul Vinkenoog">
- Fixed the rendering of zero-width spaces for certain fonts by not generating them into
- the area tree.
- </action>
- <action context="Code" dev="LF" type="fix">
- Fixed a problem with disappearing footnotes inside hyphenated inlines (and footnotes with hyphenated inline child).
- </action>
- <action context="Code" dev="JM" type="add" fixes-bug="42067" due-to="Paul Vinkenoog">
- Add support for exact positioning of internal PDF links.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="41434" due-to="Martin Kögler">
- Fix PDF Genaration for non-ASCII compatible locales.
- </action>
- <action context="Code" dev="VH" type="fix">
- Fix several exceptions when break-before/after is set on the first/last row of a table.
- </action>
- <action context="Code" dev="VH" type="fix">
- Fix extra page break when break-before is set on both a table and its first row.
- </action>
- <action context="Code" dev="VH" type="fix">
- Make keep-with-next and keep-with-previous work on fo:table.
- </action>
- <action context="Code" dev="VH, JM" type="add" importance="high" fixes-bug="36934">
- Add support for the collapsing-border model in tables.
- </action>
- <action context="Code" dev="JB" type="add" importance="high">
- Add support for named destinations in PDF.
- </action>
- <action context="Code" dev="JM" type="fix">
- Fixed a problem with keep-with-next on table-rows. Once a keep-with-next was set
- inside a table, the FO following the table would always be glued to the previous table.
- </action>
- <action context="Code" dev="JM" type="fix">
- Fixed a problem with the auto-rotate-landscape setting in the PostScript renderer.
- It didn't generate the right setpagedevice command.
- </action>
- <action context="Code" dev="JM" type="fix">
- Fixed an IllegalArgumentException for absolutely positioned block-containers with a
- border and no height/bpd set.
- </action>
- <action context="Code" dev="JM" type="add">
- Add support for a two-pass production for PostScript output to minimize file size. This
- adds images only once and adds only the fonts that are really used.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="41652">
- If a line contained nothing but a linefeed, this didn't produce empty lines.
- Replaced the auxiliary zero-width box with a glue the width of a line,
- and shrinkable to zero-width.
- </action>
- <action context="Code" dev="VH" type="fix" fixes-bug="40120" due-to="Adrian Cumiskey">
- Stricter FOP user configuration checking
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="41572" due-to="Erwin Tratar">
- Fix parsing 'url(...)' when the URL itself contains a bracketed part.
- </action>
- <action context="Code" dev="JM" type="add">
- Support for GIF images in RTF output (RTF handler, only. Does not affect the RTF library.)
- </action>
- <action context="Code" dev="JM" type="fix">
- Fix for NPE with PNG images for RTF output.
- </action>
- <action context="Code" dev="AD" type="fix">
- Fix for properly parsing font-family names containing spaces.
- </action>
- <action context="Code" dev="JM" type="add">
- Support for soft masks (transparency) with ImageIO image adapter.
- </action>
- <action context="Code" dev="LF" type="fix" fixes-bug="41019">
- Fix incorrect behaviour of the BreakingAlgorithm when some inline content is wider than
- the available ipd, causing a restart.
- </action>
- <action context="Code" dev="JM" type="fix">
- Fix for PDF corruption when a TrueType font with spaces in its name is embedded and no
- XML font metrics file for that font is used.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="41426" due-to="Adrian Cumiskey">
- Fix for ClassCastException when fo:wrapper was used as direct child of fo:flow.
- Note: "id" attributes are still not handled properly on fo:wrapper!
- </action>
- <action context="Code" dev="MM" type="add">
- Added support for the soft hyphen (SHY) character.
- </action>
- <action context="Code" dev="MM" type="add">
- Added support for line-height-shift-adjustment property.
- </action>
- <action context="Code" dev="SP" type="add">
- Added support for the system property fop.home to
- cli.Main.getJARList().
- </action>
- <action context="Code" dev="JM" type="add" fixes-bug="40930">
- Added support for display-align for table-cell in RTF output.
- </action>
- <action context="Code" dev="MM" type="add" importance="high">
- Added support for UAX#14 type line breaking. Support does not extend across nested fo:inline elements.
- </action>
- </release>
- <release version="0.93" date="9 January 2007">
- <notes>
- <section>
- <title>Notes</title>
- <p>This is the first production grade release of the new FOP
- codebase.</p>
- <ul>
- <li>It contains the new API first introduced in release 0.92
- beta. The preceding API has been removed.
- </li>
- <li>
- See the <link href="../compliance.html">compliance page</link> for an
- overview of the compliance of this release with the XSL 1.0 and
- 1.1 recommendations.
- </li>
- <li>
- This release again contains many bug fixes and new features. See
- below for details.
- </li>
- <li>
- See the <link href="../knownissues.html">known issues page</link>
- for an overview of the known issues with this release.
- </li>
- </ul>
- <p>Caveats:</p>
- <ul>
- <li>
- You may experience different behaviour compared to version 0.20.5.
- Please consult the <link href="upgrading.html">"Upgrading"</link> page for details.
- </li>
- </ul>
- </section>
- </notes>
- <action context="Code" dev="BD" type="add" importance="high">
- Added support for the use of Open Type fonts
- </action>
- <action context="Code" dev="BD" type="update" fixes-bug="5535" due-to="Adam Strzelecki, Victor Mote" importance="high">
- Enabled Copy/Paste from PDF content in Acrobat Reader for text using embedded TrueType fonts.
- </action>
- <action context="Code" dev="SP" type="update" fixes-bug="41044" due-to="Richard Wheeldon">
- Commented out unused properties, in order to minimize memory usage.
- </action>
- <action context="Code" dev="SP" type="update" fixes-bug="41009" due-to="Richard Wheeldon">
- Removed unused attributes from TableCell.
- </action>
- <action context="Code" dev="JM" type="add">
- Added initial support for loading fonts without a pre-created XML font metric
- file.
- </action>
- <action context="Code" dev="JM" type="add" fixes-bug="40729" due-to="Peter Coppens" importance="high">
- Support for the rgb-icc() function and for a proprietary cmyk() function (for device CMYK
- colors only through the PDF renderer so far).
- </action>
- <action context="Code" dev="JM" type="update" fixes-bug="40813" due-to="Richard Wheeldon">
- Minor fixes and improvements for the AWT Preview (keyboard shortcuts, scrolling, windows
- setup).
- </action>
- <action context="Code" dev="JM" type="add" fixes-bug="40849" due-to="Dominic Brügger">
- Added support for SVG in fo:instream-foreign objects for RTF output.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Fixed bug when the sum of column widths of a table is larger than the
- specified widths. The table width was not adjusted.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Nested tables with headers and footers were not handled correctly and could
- overlap with the region-after.
- </action>
- <action context="Code" dev="JM" type="add" fixes-bug="40519" due-to="Oliver Hernàndez Valls">
- Added support for CCITT compression in the TIFFRenderer by switching to the ImageWriter
- abstraction from XML Graphics Commons.
- </action>
- <action context="Code" dev="JM" type="add">
- Extension properties fox:orphan-content-limit and fox:widow-content-limit which
- help with list-block and table layout. See the documentation for details.
- </action>
- <action context="Code" dev="JM" type="add">
- Configuration option in the Java2D-based renderers that allows to disable the default
- white background in order to produce bitmap output with transparency.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="39414">
- Split up FOText instances larger than 32K characters to avoid
- integer overflow during layout.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Corrected painting of shading patterns and position of links for SVG images
- inside FO documents.
- </action>
- <action context="Code" dev="AD" type="update">
- Minor fix: correctly set negative values for ipd/bpd to zero.
- </action>
- <action context="Code" dev="AD" type="update" fixes-bug="35656">
- Rework of default column-creation / column-width setting from
- cells in the first row.
- </action>
- <action context="Code" dev="AD" type="update" fixes-bug="40270" due-to="Gary Reed">
- Added relaxed validation for empty list-item-*, as suggested by Gary Reed.
- </action>
- <action context="Code" dev="AD" type="update">
- Modified proportional-column-width() function to log an error if used
- with table-layout=auto
- </action>
- <action context="Code" dev="AD" type="fix">
- Deferred property resolution for markers until they are actually retrieved,
- which leads to percentages and relative font-sizes now getting the correct
- values. Also deferred white-space-handling for markers.
- </action>
- <action context="Code" dev="JM" type="update">
- Changed the way overflowing pages are handled. The overflow property on region-body
- is now used to define the behaviour.
- </action>
- <action context="Code" dev="JM" type="fix">
- Fixed a memory-leak: The FO tree part of a page-sequence was not released when a
- page-sequence was finished.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Table headers and footers were swallowed when a table was nested in a list-block.
- </action>
- <action context="Code" dev="JM" type="fix">
- Fixed a bug with indent handling when margins are used on a surrounding block and
- not start/end-indent.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="40106" due-to="Jeroen Meijer">
- Compatibility fix for GCJ (GNU Classpath): Using "UTF-16BE" instead of "UnicodeBigUnmarked"
- encoding.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="40062" due-to="Gilles Beaugeais">
- Fixed handling for CCITT Group 4 TIFF images with fill order 2.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="40048" due-to="Igor Istomin">
- Fixed setting of page margins in AWT Renderer like it was done in the print renderer.
- </action>
- <action context="Code" dev="JM" type="fix">
- Fixed two memory-leaks in image handling. The image cache is finally working
- properly.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="39608">
- Let numeric property values without a unit be treated as pixels like in HTML.
- This fixes certain NullPointerException when no units are specified.
- (Note: the use of pixels in XSL-FO is discouraged!)
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Potential multi-threading issue (ConcurrentModificationException)
- eliminated for ElementMapping classes.
- </action>
- <action context="Code" dev="JM" type="fix">
- No more System.exit() and look &amp; feel setting calls inside the reusable
- parts of the AWT viewer.
- </action>
- <action context="Code" dev="JM" type="fix">
- Proper escaping of characters in list-items labels for RTF output.
- </action>
- <action context="Code" dev="MM" type="fix">
- Bugfix: FOUserAgent specific configuration parameters specified in config file
- were not set when FOP was invoked from command line.
- </action>
- <action context="Code" dev="JM" type="add" importance="high">
- Added support for PDF/A-1b and PDF/X-3:2003. (Note: this may still be a bit
- incomplete. Feedback is welcome!)
- </action>
- <action context="Code" dev="JM" type="add">
- The CIDSet object is now generated for CID fonts which are embedded in PDFs.
- (Required by PDF/A).
- </action>
- <action context="Code" dev="JM" type="update" importance="high">
- The Java2DRenderer (and therefore the print and bitmap renderers) is now
- offering the same quality as the PDF and PS renderers. Note: There can still
- be little differences between PDF and Print/PNG/TIFF because the latter uses
- a different font metrics source.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="39712">
- Bugfix: components of the border-separation property weren't set when
- in shorthand-mode, leading to a NPE being thrown.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Table headers were omitted when a table is a child of a block-container.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Bookmarks in PDF will be generated even if some bookmarks cannot be
- resolved.
- </action>
- <action context="Code" dev="AD" type="fix" fixes-bug="39560">
- Bugfix: the interaction between the table FOs and properties package in
- determining initial values for column-number should be a one-time process,
- not repeated when the table is in a marker that is retrieved.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: All fonts names were converted unnecessarily to lower case in RTF output.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: The combination of hyphenation and kerning resulted in slightly ragged
- right ends for right-aligned and justified text.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: NullPointerException in AreaAdditionUtil in a table-cell spanning
- multiple pages and with a marker.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="39533">
- Bugfix: NullPointerException in RTF output when a table does not contain
- table-columns.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="39607" due-to="Julien Aym&#x00E9;">
- Bugfix: NullPointerException in RTF library when there are no borders on
- the parent table.
- </action>
- <action context="Code" dev="JM" type="add" importance="high">
- Automatic support for all fonts available to the Java2D subsystem for all
- Java2D-descendant renderers (TIFF, PNG, print, AWT).
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Improved baseline detection in TTFReader for TrueType fonts.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="39443">
- Bugfix: tables nested in inline elements caused a NullPointerException.
- </action>
- <action context="Code" dev="JM" type="update">
- The default sRGB color profile provided by the Java class library is no longer
- embedded if it is encountered. This should reduce the PDF size considerably.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="39443">
- Bugfix: Sections with span="all" lead to overlapping text if spanning multiple pages.
- </action>
- <action context="Code" dev="MM" type="fix">
- Bugfix: Percentages in vertical-align property values were not correctly handled.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="38243" due-to="Gerhard Oettl">
- Bugfix: Gaps in table-columns cause a NullPointerException.
- </action>
- <action context="Code" dev="JM" type="update" fixes-bug="38946" due-to="Max Berger">
- Changed the internal representation of colors to use Java's own color infrastructure
- instead of FOP's home-grown classes.
- </action>
- <action context="Code" dev="MM" type="fix">
- Bugfix: TABs were not correctly replaced by spaces in some circumstances.
- </action>
- <action context="Code" dev="JM" type="update">
- Content in block-containers makes better use of shrink to fit content vertically
- into the available area. This can be used indirectly to justify content vertically
- in a block-container.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: basic-links with internal destinations in documents with multiple
- page-sequences sometimes pointed at the wrong page.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Fixed ClassCastException when retrieve-marker is used as a direct child
- if static-content in which case leading and trailing white space is not properly
- removed.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="39285">
- Bugfix: Fixed OutOfMemoryException with long data URLs (RFC 2397).
- </action>
- <action context="Code" dev="JM" type="add" fixes-bug="39118" due-to="Pierre-Henri Kraus">
- Initial support for page-number-citation-last (XSL 1.1). Works without problems
- only for page-sequence so far.
- </action>
- </release>
- <release version="0.92beta" date="18 Apr 2006">
- <action context="Code" dev="JM" type="fix">
- Bugfix: The generation of the PDF "d" (setdash) command was assuming that
- only integer values can be used but that isn't the case. Dash patterns
- PDFGraphics2D would be wrong in the process.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Fixed a division by zero problem in TTFReader and improved the detection
- of the capHeight and xHeight font metric values for TrueType fonts.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Allow URLs in basic-link's external-destination to be wrapped in "url()".
- </action>
- <action context="Code" dev="MM" type="fix">
- Bugfix: Corrected enumerated property value for white-space property
- from "no-wrap" to "nowrap".
- </action>
- <action context="Code" dev="MM" type="fix" fixes-bug="38457">
- Bugfix: Added support for white-space-treatment="preserve" in particular to
- support the white-space="pre" short hand property.
- </action>
- <action context="Code" dev="JM" type="fix">
- Corrected expectation and behaviour for the text-indent property to only apply
- to the first line area generated by a block.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix for invalid handling of ICC color profiles in JPEG images and for
- dealing with CMYK JPEG images with the Adobe APPE marker.
- </action>
- <action context="Code" dev="JM" type="add">
- Initial support for page-position="last" added.
- </action>
- <action context="Code" dev="JM" type="add">
- Reenabled loading of user-supplied hyphenation patterns that was available in
- FOP 0.20.5. (See "hyphenation-base" option in the user configuration)
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Certain filter combinations in PDF could lead to invalid PDFs.
- DecodeParams were not properly handled.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: CCITT Group 4 encoded TIFF images with multiple strips are now properly
- embedded in PDF files.
- </action>
- <action context="Code" dev="JM" type="add">
- Added support for fixed-width spaces.
- </action>
- <action context="Code" dev="JM" type="add">
- Added support for kerning.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Fixed a copy/paste error in the table layout code that caused wrong page
- break decisions when table-headers and/or table-footers are used.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Fixed an NPE that was thrown when a table was used inside a footnote-body.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Fixed a problem with certain TrueType fonts which are missing the "PCLT"
- table, where a baseline-shift="sub" had no effect due to a missing x-height value.
- (Note: This only affects TTFReader, so the font metric file has to be regenerated.)
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: When the base URL was specified as a file system path, the constructed
- URL was wrong.
- </action>
- <action context="Code" dev="JM" type="add" due-to="Jirí Mareš">
- Support for "userconfig" attribute in FOP Ant Task.
- </action>
- <action context="Code" dev="JM" type="add">
- Initial support for XMP metadata (PDF 1.4) under fo:declarations.
- </action>
- <action context="Code" dev="AD" type="add">
- Added support for the background-position shorthand property.
- </action>
- <action context="Code" dev="AD" type="add">
- Added support for the font shorthand property.
- </action>
- <action context="Code" dev="JM" type="add" fixes-bug="38618" due-to="Max Berger">
- Added support for system-color() function.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Fixed two causes for ClassCastExceptions in BlockContainerLayoutManager.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: padding-top and padding-bottom on list-items could lead to wrong page
- break decisions and thus to overlapping text.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: break-before and break-after were ignored on list-items.
- </action>
- <action context="Code" dev="LF" type="fix" fixes-bug="38507">
- Bugfix: The elements representing a non-breaking space weren't always correct.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="38453">
- Bugfix: Text-decoration was not promoted if no text-decoration attribute was
- specified on a nested element.
- </action>
- <action context="Code" dev="AD" type="add" fixes-bug="38282"
- due-to="Gerhard Oettl (gerhard.oettl.at.oesoft.at)">
- Added support for the from-table-column() function.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="38397">
- Bugfix: Spanned cells could lead to an false error message about overlapping
- cells and ultimately a NullPointerException.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Regions with non-standard names got ignored in RTF output leading to
- missing headers and footers.
- </action>
- <action context="Code" dev="JM" type="fix">
- The RTF output now properly generates the "\landscape" flag for documents in
- landscape orientation.
- </action>
- <action context="Code" dev="JM" type="fix">
- Following a clarification by the XSL FO SG, space traits are only set on the
- first and last area generated by an FO, and not on every area anymore.
- </action>
- <action context="Code" dev="JM" type="add">
- New feature: "Intermediate format" (IF). The IF is basically the XML dialect
- written by the area tree renderer (XMLRenderer). A new parser for this format
- allows reparsing a serialized and possibly modified area tree and rendering it
- to the final target format.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Floating point numbers were not properly formatted in the PDF renderer
- which could lead to error messages while opening a PDF in Acrobat Reader.
- </action>
- <action context="Code" dev="SP" type="update" fixes-bug="38098"
- due-to="Gerhard Oettl">
- Implement property name as default argument on some xsl-function calls.
- </action>
- <action context="Code" dev="SP" type="update" fixes-bug="38087"
- due-to="Gerhard Oettl">
- Implement force-page-count property of page-sequence.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="38054">
- Bugfix: Spans that end up with a negative height don't get swallowed anymore.
- </action>
- <action context="Code" dev="MM" type="add" fixes-bug="36729">
- Relative URLs for the font configuration attributes metrics-url and embed-url
- are now supported. A new configuration property font-base has been added. It
- sets the base URL against which relative font URLs are resolved. If font-base is
- not set base is used.
- </action>
- <action context="Code" dev="JM" type="add" fixes-bug="38132" due-to="Richard Wheeldon">
- Added support for RFC2397 "data" URLs.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="38132">
- Bugfix: Certain border styles could lead to a NullPointerException.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="38102">
- Bugfix: Space was not adjusted if the space was on a nested block. This could
- lead to content overflowing the bottom of a page.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: TableCell did not properly report that it generates reference-areas
- which could lead to wrong inherited values for start-indent and end-indent.
- </action>
- <action context="Code" dev="JM" type="add">
- The font loading code now reads the encoding value from the XML font metrics file
- so that fonts like Symbol and ZapfDingbats can be embedded explicitely (Required by PDF/A).
- </action>
- <action context="Code" dev="SP" type="update">
- Improvements to the code for inline block content.
- </action>
- <action context="Code" dev="MM" type="fix" fixes-bug="38089">
- Bugfix: Image height for BMP images was incorrectly calculated
- </action>
- <action context="Code" dev="AD" type="update">
- Revision of refinement white-space handling.
- </action>
- <action context="Code" dev="AD" type="add">
- Added feature: support for white-space shorthand
- </action>
- <action context="Code" dev="AD" type="add">
- Added feature: support for page-break-* shorthands
- </action>
- <action context="Code" dev="MM" type="fix" fixes-bug="38053">
- Bugfix: NullPointerException on certain fo:inline within lists.
- </action>
- <action context="Code" dev="MM" type="fix" fixes-bug="37743">
- Bugfix: ClassCastException on certain fo:inline with border combinations.
- </action>
- <action context="Code" dev="MM" type="fix">
- Changed a method name in LineArea from finalize to finalise because it was
- never intended for the method to be an override of the Java Object finalize
- method. If invoked by the Java garbage collector it may cause a NPE.
- </action>
- </release>
- <release version="0.91beta" date="23 Dec 2005">
- <action context="Code" dev="JM" type="update">
- Deprecated Fop constructors that use integer constants to select the
- output format have been removed in favor or the constructors that use
- MIME types.
- </action>
- <action context="Code" dev="MM" type="fix">
- Fixed a bug where the linefeed-treatment property value "preserve" was not
- honoured when used in conjunction with text-align="center".
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="37964">
- Bugfix: hard breaks with even-page or odd-page were not handled correctly
- when spaces were surrounding the break.
- </action>
- <action context="Code" dev="JM" type="update">
- Changed the XMLHandler interface so it doesn't report the MIME type it
- supports but instead can report whether it supports a particular Renderer
- implementation. XMLHandlers are now configurable.
- </action>
- <action context="Code" dev="JM" type="fix">
- Fixed a bug where SVG content could be clipped when rendered to PostScript.
- </action>
- <action context="Code" dev="JM" type="fix">
- Changed the way resolutions are handled. The single resolution in the user
- agent got split up into source and target resolutions. For more info, see
- the updated documentation. Note: backwards-incompatible change!
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="37875">
- Bugfix: Some content inside a table-header may not have been renderered on
- pages n &gt; 1 in certain conditions.
- </action>
- <action context="Code" dev="MM" type="fix">
- Fixed a bug where an empty line, i.e. a block containing only a &amp;nbsp;,
- was not rendered at all.
- </action>
- <action context="Code" dev="JM" type="fix">
- Fixed a bug where the area for a finished cell that is broken over pages was
- created once for each row it was spanned over instead of only once.
- </action>
- <action context="Code" dev="JM" type="add">
- Added checks that warn about tables and block-containers that are wider than
- the available content area.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="37880">
- Bugfix: Footnotes were lost if the footnote appeared in centered text.
- </action>
- <action context="Code" dev="JM" type="update">
- Improved log and error messages in a number of places by adding additional
- context information that should make it easier to find the location in the
- source files.
- </action>
- <action context="Code" dev="JM" type="fix">
- Fix to correct image sizes in RTF output.
- </action>
- <action context="Code" dev="JM" type="add">
- First attempt at SVG support in RTF output. SVG images are converted to 300dpi JPEG
- images internally.
- </action>
- <action context="Code" dev="JM" type="update">
- Additional checks to detect text overflows. The overflow property is now properly
- handled where applicable.
- </action>
- <action context="Code" dev="JM" type="update">
- Source location information improved. If location information is not available,
- the context information is provided based on text content.
- </action>
- <action context="Code" dev="JM" type="add">
- The command-line now automatically sets two parameters for any XSLT transformation:
- "fop-output-format" contains the MIME type of the currently selected output format,
- "fop-version" contains FOP's version number.
- </action>
- <action context="Code" dev="JM" type="fix">
- The output file is now deleted when an exception occurs when calling FOP from
- the command-line.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Areas for table-cells that are broken over more than one page are now
- generated even if all its content is already painted on a previous page. This
- fixes strange effects like a table grid that is not completely painted.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="37828">
- Bugfix: Column balancing produced strange break decisions in certain multi-column
- documents with large amounts of text.
- </action>
- <action context="Code" dev="JM" type="add">
- Added an alternative set of rules for calculating text indents which tries to mimic
- the behaviour of many commercial FO implementations that chose to break the rules
- in the FO specification in order to better meet the natural expectations of
- inexperienced FO users.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="37815" due-to="Tom Craddock">
- Bugfix: The combination of content-width="scale-to-fit" and content-height="100%"
- did not work as expected due to a datatype conversion bug.
- </action>
- <action context="Code" dev="JM" type="fix" fixes-bug="37813">
- Bugfix: A span="all" on the first block cause a subsequent page break and the first block
- didn't span all columns.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Self-created OutputStreams in PNG Renderer were not properly closed.
- </action>
- <action context="Code" dev="JM" type="update">
- The border-collapse property on fo:table is now forced to the value "separate" until the collapsing
- border has been implemented.
- </action>
- <action context="Code" dev="JM" type="add">
- font-family list still not fully supported but a comma-separated list is now properly tokenized.
- FOP will now go through all fonts in the list to find one that is available, but it doesn't
- do so per character, yet.
- </action>
- <action context="Code" dev="JM" type="add">
- Implemented "Overconstrained Geometry" rules (5.3.4, XSL 1.0) for the most important cases.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Relatively positioned BlockViewports (from block-containers) caused the paint
- cursor not be be properly advanced when space-before or space-after were present.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix: Space resolution was incomplete for content in table-cells. Conditional elements
- didn't get removed.
- </action>
- <action context="Code" dev="JM" type="fix">
- The validation check for non-zero borders and padding on a region-* and for empty static-content
- elements is now turned off when relaxed validation is active to improve compatibility with
- FO documents written for other FO implementations.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix for "/ by zero" ArithmeticExceptions when an URL to a non-existing image is used
- and content-width and/or content-height is used.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix for a multi-threading problem:
- propertyListTable initialization moved from the constructor to a static block in FONode.
- This fixes NullPointerExceptions in PropertyList.
- </action>
- <action context="Code" dev="JM" type="fix">
- Bugfix for placement of text inside a text area when borders are present in PostScript output.
- </action>
- <action context="Code" dev="JM" type="update">
- Improvements on leader painting in PDF output.
- </action>
- <action context="Code" dev="JM" type="add">
- Support for leader painting in PostScript output.
- </action>
- <action context="Code" dev="LF, MM" type="add">
- Support for hyphenation-ladder-count.
- </action>
- </release>
- <release version="0.90alpha1" date="22 Nov 2005">
- <action context="Code" dev="all" type="update">
- <strong>Complete redesign of the FOP codebase</strong> in the period between Dec 2001 and Nov 2005.
- There are just too many changes to list here. If you like to know details, run
- <code>"svn log --verbose http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/"</code>.
- </action>
- </release>
- <release version="0.20.5" date="18 July 2003">
- <action context="Code" dev="all" type="update">
- For the change log for the maintenance branch
- (where FOP 0.20.5 came from), please see the "CHANGES" file in the distribution, or
- <link href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/branches/fop-0_20_2-maintain/CHANGES?view=markup">the CHANGES file in the SVN repository</link>.
- </action>
- </release>
- </changes>
-
- <todo>
- <!-- See Bugzilla and http://wiki.apache.org/xmlgraphics-fop/FOPProjectTasks -->
- <actions>
- <action dev="open" type="update" context="Docs">
- Improve the documentation.
- </action>
- </actions>
- </todo>
-
-</status>
diff --git a/test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java b/test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java
index 75ba53525..1362ad559 100644
--- a/test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java
+++ b/test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java
@@ -140,7 +140,7 @@ public class CollapsedConditionalBorderTestCase extends AbstractTableTest {
do {
String baseErrorMsge = "table " + Integer.toString(tableNum) + " (0-based), ";
Table table = (Table) tableIterator.next();
- TablePart part = (TablePart) table.getChildNodes().nextNode();
+ TablePart part = (TablePart) table.getChildNodes().next();
GridUnit gu = getGridUnit(part);
String errorMsge = baseErrorMsge + "border-before";
@@ -182,7 +182,7 @@ public class CollapsedConditionalBorderTestCase extends AbstractTableTest {
resolvedBordersHF[tableNum][borderNum++]);
FONodeIterator bodyIter = table.getChildNodes();
- TableBody body = (TableBody) bodyIter.nextNode();
+ TableBody body = (TableBody) bodyIter.next();
gu = getGridUnit(body);
checkBorder(errorMsge, gu.borderBefore.normal,
resolvedBordersHF[tableNum][borderNum++]);
@@ -197,7 +197,7 @@ public class CollapsedConditionalBorderTestCase extends AbstractTableTest {
checkBorder(errorMsge, gu.borderAfter.rest,
resolvedBordersHF[tableNum][borderNum++]);
- body = (TableBody) bodyIter.nextNode();
+ body = (TableBody) bodyIter.next();
gu = getGridUnit(body);
checkBorder(errorMsge, gu.borderBefore.normal,
resolvedBordersHF[tableNum][borderNum++]);
diff --git a/test/java/org/apache/fop/pdf/PDFAttachmentTestCase.java b/test/java/org/apache/fop/pdf/PDFAttachmentTestCase.java
new file mode 100644
index 000000000..8915ba934
--- /dev/null
+++ b/test/java/org/apache/fop/pdf/PDFAttachmentTestCase.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+package org.apache.fop.pdf;
+
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+
+import javax.xml.transform.stream.StreamResult;
+
+import org.junit.Test;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.FopFactory;
+import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.render.intermediate.IFContext;
+import org.apache.fop.render.intermediate.IFException;
+import org.apache.fop.render.intermediate.extensions.Link;
+import org.apache.fop.render.intermediate.extensions.URIAction;
+import org.apache.fop.render.pdf.PDFDocumentHandler;
+import org.apache.fop.render.pdf.extensions.PDFEmbeddedFileAttachment;
+
+import junit.framework.Assert;
+
+public class PDFAttachmentTestCase {
+ private FOUserAgent ua = FopFactory.newInstance(new File(".").toURI()).newFOUserAgent();
+
+ @Test
+ public void testAddEmbeddedFile() throws IFException {
+ PDFDocumentHandler docHandler = new PDFDocumentHandler(new IFContext(ua));
+ docHandler.setFontInfo(new FontInfo());
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ docHandler.setResult(new StreamResult(out));
+ docHandler.startDocument();
+ docHandler.startPage(0, "", "", new Dimension());
+ docHandler.handleExtensionObject(new PDFEmbeddedFileAttachment("filename", "src", "desc"));
+ docHandler.getDocumentNavigationHandler().renderLink(new Link(
+ new URIAction("embedded-file:filename", false), new Rectangle()));
+ docHandler.endDocument();
+ Assert.assertTrue(out.toString().contains("<<\n /Type /Filespec\n /F (filename)"));
+ Assert.assertTrue(out.toString().contains("<<\n/S /JavaScript\n"
+ + "/JS (this.exportDataObject({cName:\"filename\", nLaunch:2});)\n>>"));
+ }
+}
diff --git a/test/java/org/apache/fop/render/pcl/PCLPainterTestCase.java b/test/java/org/apache/fop/render/pcl/PCLPainterTestCase.java
new file mode 100644
index 000000000..65ac6ef0b
--- /dev/null
+++ b/test/java/org/apache/fop/render/pcl/PCLPainterTestCase.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+package org.apache.fop.render.pcl;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Rectangle;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+
+import javax.xml.transform.stream.StreamResult;
+
+import org.junit.Test;
+
+import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.FopFactory;
+import org.apache.fop.render.intermediate.IFContext;
+import org.apache.fop.render.intermediate.IFException;
+
+import junit.framework.Assert;
+
+public class PCLPainterTestCase {
+ private FOUserAgent ua = FopFactory.newInstance(new File(".").toURI()).newFOUserAgent();
+
+ @Test
+ public void testFillRect() throws IFException {
+ Rectangle size = new Rectangle(1, 1);
+ PCLPageDefinition pclPageDef = new PCLPageDefinition("", 0, new Dimension(), size, true);
+ PCLDocumentHandler documentHandler = new PCLDocumentHandler(new IFContext(ua));
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ documentHandler.setResult(new StreamResult(output));
+ documentHandler.startDocument();
+ PCLPainter pclPainter = new PCLPainter(documentHandler, pclPageDef);
+ pclPainter.fillRect(size, Color.RED);
+ Assert.assertTrue(output.toString().contains("*c4Q\u001B*c0.01h0.01V\u001B*c32G\u001B*c4P"));
+ output.reset();
+
+ pclPainter.getPCLUtil().setColorEnabled(true);
+ pclPainter.fillRect(size, Color.RED);
+ Assert.assertFalse(output.toString().contains("*c4P"));
+ Assert.assertTrue(output.toString().contains("*v255a0b0c0I\u001B*v0S\u001B*c0.01h0.01V\u001B*c0P"));
+ }
+
+}
diff --git a/test/layoutengine/standard-testcases/basic_link_to_last_page.xml b/test/layoutengine/standard-testcases/basic_link_to_last_page.xml
index df99c7cde..892e85fcf 100644
--- a/test/layoutengine/standard-testcases/basic_link_to_last_page.xml
+++ b/test/layoutengine/standard-testcases/basic_link_to_last_page.xml
@@ -74,7 +74,7 @@
<checks>
<eval expected="(P2,par2)" xpath="((/areaTree/pageSequence/pageViewport)[4]//inlineparent[@internal-link])[1]/@internal-link"/>
<eval expected="(P3,par3)" xpath="((/areaTree/pageSequence/pageViewport)[4]//inlineparent[@internal-link])[2]/@internal-link"/>
- <eval expected="(P5,title)" xpath="/areaTree/bookmarkTree/bookmark/@internal-link"/>
+ <eval expected="(P6,title)" xpath="/areaTree/bookmarkTree/bookmark/@internal-link"/>
<eval expected="4" xpath="count(/areaTree/pageSequence/pageViewport)"/>
</checks>
</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_columns.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_columns.xml
new file mode 100644
index 000000000..ab6321adc
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_columns.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ Check that an IPD change is detected when switching from single column to multi-column layout.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="page1"
+ page-height="120pt" page-width="320pt" margin="10pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="page2"
+ page-height="120pt" page-width="320pt" margin="10pt">
+ <fo:region-body column-count="2" column-gap="20pt"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="page"
+ page-height="120pt" page-width="320pt" margin="10pt">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="pages">
+ <fo:single-page-master-reference master-reference="page1"/>
+ <fo:single-page-master-reference master-reference="page2"/>
+ <fo:repeatable-page-master-reference master-reference="page"/>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="pages">
+ <fo:flow flow-name="xsl-region-body" text-align="justify">
+ <fo:block>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
+ tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et
+ accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus
+ est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
+ diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+ voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
+ gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit
+ amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
+ dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores
+ et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+ amet.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="300000" xpath="//pageViewport[1]//flow/block/@ipd"/>
+ <eval expected="140000" xpath="//pageViewport[2]//flow[1]/block/@ipd"/>
+ <eval expected="140000" xpath="//pageViewport[2]//flow[2]/block/@ipd"/>
+ <eval expected="300000" xpath="//pageViewport[3]//flow/block/@ipd"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_1.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_1.xml
new file mode 100644
index 000000000..5024cd2d0
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_1.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that the definition of a special page-master for the last page with a
+ different width that the previous "rest" page causes FOP to redo the line breaking layout.
+ </p>
+ </info>
+ <fo>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="Page-Portrait" page-width="8.5in" page-height="11in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="Page_Landscape" page-width="11in" page-height="8.5in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="first" master-reference="Page-Portrait"/>
+ <fo:conditional-page-master-reference master-reference="Page_Landscape" page-position="rest"/>
+ <fo:conditional-page-master-reference master-reference="Page-Portrait" page-position="last"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="LetterPages">
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. </fo:block>
+ <fo:block break-before="page"/>
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. </fo:block>
+ <fo:block break-before="page"/>
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. </fo:block>
+ <fo:block>Check this works!</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
+ </fo>
+ <checks>
+ <eval expected="is just some generic text to use for testing. This is just some generic text to use for testing. This is just" xpath="//pageViewport[3]//flow/block[1]/lineArea[2]//text"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_2.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_2.xml
new file mode 100644
index 000000000..c636d3980
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_2.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that the definition of a special page-master for the last page with a
+ different width that the previous "rest" page causes FOP to redo the line breaking layout.
+ </p>
+ </info>
+ <fo>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="Page-Portrait" page-width="3in" page-height="4.5in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="Page_Landscape" page-width="4.5in" page-height="3in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="first" master-reference="Page-Portrait"/>
+ <fo:conditional-page-master-reference master-reference="Page_Landscape" page-position="rest"/>
+ <fo:conditional-page-master-reference master-reference="Page-Portrait" page-position="last"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="LetterPages">
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. </fo:block>
+ <fo:block>Check this works!</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
+ </fo>
+ <checks>
+ <eval expected="is just some generic text" xpath="//pageViewport[3]//flow/block[1]/lineArea[2]//text"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_3.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_3.xml
new file mode 100644
index 000000000..b683d320c
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_3.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that the definition of a special page-master for the last page with a
+ different width that the previous "rest" page causes FOP to redo the line breaking layout.
+ </p>
+ </info>
+ <fo>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="Page-Portrait" page-width="3in" page-height="4.5in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="Page_Landscape" page-width="4.5in" page-height="3in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="first" master-reference="Page-Portrait"/>
+ <fo:conditional-page-master-reference master-reference="Page_Landscape" page-position="rest"/>
+ <fo:conditional-page-master-reference master-reference="Page-Portrait" page-position="last"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="LetterPages">
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing.</fo:block>
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing.</fo:block>
+ <fo:block>Check this works!</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
+ </fo>
+ <checks>
+ <eval expected="text to use for testing. This" xpath="//pageViewport[3]//flow/block[1]/lineArea[2]//text"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_4.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_4.xml
new file mode 100644
index 000000000..ab209a14b
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_4.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that the definition of a special page-master for the last page with a
+ different width that the previous "rest" page causes FOP to redo the line breaking layout.
+ </p>
+ </info>
+ <fo>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="Page-First" page-width="3.5in" page-height="3.5in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body background-color="yellow" margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="Page-Rest" page-width="3.5in" page-height="3.5in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body background-color="orange" margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="Page-Last" page-width="4.0in" page-height="3.5in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body background-color="pink" margin-bottom="1.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="first" master-reference="Page-First"/>
+ <fo:conditional-page-master-reference master-reference="Page-Rest" page-position="rest"/>
+ <fo:conditional-page-master-reference master-reference="Page-Last" page-position="last"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="LetterPages">
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing.</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
+ </fo>
+ <checks>
+ <eval expected="testing. This is just some generic text to" xpath="//pageViewport[3]//flow/block[1]/lineArea[2]//text"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_5.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_5.xml
new file mode 100644
index 000000000..1deb24a11
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_5.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that the definition of a special page-master for the last page with a
+ different width that the previous "rest" page causes FOP to redo the line breaking layout.
+ </p>
+ </info>
+ <fo>
+
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:svg="http://www.w3.org/2000/svg" xmlns:th="http://www.thunderhead.com/XSL/Extensions" xmlns:rx="http://www.renderx.com/XSL/Extensions" xmlns:ps="http://xmlgraphics.apache.org/fop/postscript">
+ <fo:layout-master-set>
+ <fo:simple-page-master margin-left="0mm" master-name="PageOneFront" page-width="210mm" page-height="297mm" margin-bottom="6mm" margin-right="10mm" margin-top="0mm">
+
+ <fo:region-body margin-right="60mm" margin-left="25mm" margin-bottom="15mm" margin-top="44mm" region-name="letterPageBody"/>
+
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageRest" page-width="210mm" page-height="297mm" margin-bottom="6mm" margin-right="25mm" margin-top="0mm" margin-left="25mm">
+ <fo:region-body margin-top="44mm" margin-bottom="15mm" margin-right="0mm" margin-left="0mm" region-name="letterPageBody"/>
+
+ </fo:simple-page-master>
+
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="first" master-reference="PageOneFront"/>
+ <fo:conditional-page-master-reference page-position="rest" master-reference="PageRest"/>
+ <fo:conditional-page-master-reference blank-or-not-blank="not-blank" page-position="last" master-reference="PageRest"/>
+ <fo:conditional-page-master-reference blank-or-not-blank="blank" page-position="last" master-reference="PageRest"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+
+
+ </fo:layout-master-set>
+ <fo:page-sequence format="1" id="th_default_sequence1" initial-page-number="auto" force-page-count="auto" master-reference="LetterPages">
+
+ <fo:flow flow-name="letterPageBody">
+ <fo:block-container min-height="50mm">
+ <fo:block>
+
+ </fo:block>
+ </fo:block-container>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence format="1" id="th_default_sequence2" initial-page-number="auto" force-page-count="auto" master-reference="LetterPages">
+
+ <fo:flow flow-name="letterPageBody">
+ <fo:block-container min-height="50mm">
+ <fo:block>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="98%" column-number="1"/>
+ <fo:table-column column-width="1%" column-number="2"/>
+ <fo:table-column column-width="1%" column-number="3"/>
+ <fo:table-body>
+ <fo:table-row height="10mm">
+ <fo:table-cell number-columns-spanned="3">
+ <fo:block>test</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="29.5mm">
+ <fo:table-cell column-number="1">
+ <fo:block/>
+ </fo:table-cell>
+ <fo:table-cell column-number="2">
+ <fo:block/>
+ </fo:table-cell>
+ <fo:table-cell column-number="3">
+ <fo:block/>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+ </fo:block-container>
+
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="test" xpath="//word"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_6.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_6.xml
new file mode 100644
index 000000000..bcd6c30ad
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_6.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that the definition of a special page-master for the last page with a
+ different width that the previous "rest" page causes FOP to redo the line breaking layout.
+ </p>
+ </info>
+ <fo>
+
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:svg="http://www.w3.org/2000/svg" xmlns:th="http://www.thunderhead.com/XSL/Extensions" xmlns:rx="http://www.renderx.com/XSL/Extensions">
+ <fo:layout-master-set>
+ <fo:simple-page-master margin-right="10mm" margin-left="0mm" margin-bottom="6mm" master-name="PageFront" page-width="210mm" page-height="297mm" margin-top="0mm">
+ <fo:region-body background-color="blue" margin-right="60mm" margin-left="25mm" margin-top="44mm" margin-bottom="15mm" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master margin-right="25mm" margin-left="25mm" margin-bottom="6mm" master-name="PageRest" page-width="210mm" page-height="297mm" margin-top="0mm">
+ <fo:region-body background-color="red" margin-top="44mm" margin-bottom="15mm" margin-right="0mm" margin-left="0mm" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master margin-right="25mm" margin-left="25mm" margin-bottom="6mm" master-name="PageLast" page-width="210mm" page-height="297mm" margin-top="0mm">
+ <fo:region-body background-color="green" margin-top="44mm" margin-bottom="15mm" margin-right="0mm" margin-left="0mm" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="first" master-reference="PageFront"/>
+ <fo:conditional-page-master-reference blank-or-not-blank="not-blank" page-position="rest" master-reference="PageRest"/>
+ <fo:conditional-page-master-reference blank-or-not-blank="not-blank" page-position="last" master-reference="PageLast"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence format="1" id="th_default_sequence1" initial-page-number="auto" force-page-count="auto" master-reference="LetterPages">
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>page 1</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence format="1" id="th_default_sequence2" initial-page-number="auto" force-page-count="auto" master-reference="LetterPages">
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>page 2</fo:block>
+ <fo:block break-before="page">page 3</fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
+
+ </fo>
+ <checks>
+ <eval expected="color=#008000" xpath="/areaTree/pageSequence[2]/pageViewport[2]/page/regionViewport[1]/@background"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_7.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_7.xml
new file mode 100644
index 000000000..4e5f048e8
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_7.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that the definition of a special page-master for the last page with a
+ different width that the previous "rest" page causes FOP to redo the line breaking layout.
+ </p>
+ </info>
+ <fo>
+
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master margin-left="0mm" margin-right="10mm" margin-bottom="6mm" master-name="PageFront" page-width="210mm" page-height="297mm" margin-top="0mm">
+ <fo:region-body margin-right="60mm" margin-left="25mm" margin-top="44mm" margin-bottom="15mm" region-name="letterPageBody"/>
+
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageRest" page-width="210mm" page-height="297mm" margin-bottom="6mm" margin-right="25mm" margin-top="0mm" margin-left="25mm">
+ <fo:region-body margin-top="44mm" margin-bottom="15mm" margin-right="0mm" margin-left="0mm" region-name="letterPageBody"/>
+
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageFrontLogoRight" margin-right="10mm" margin-left="25mm" margin-bottom="6mm" page-width="210mm" page-height="297mm" margin-top="0mm">
+ <fo:region-body margin-right="60mm" margin-top="44mm" margin-left="0" margin-bottom="15mm" region-name="letterPageBody"/>
+
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="PageFrontRestMediaType" margin-left="0mm" margin-right="10mm" margin-bottom="6mm" page-width="210mm" page-height="297mm" margin-top="0mm">
+ <fo:region-body margin-right="60mm" margin-top="44mm" margin-left="25mm" margin-bottom="15mm" region-name="letterPageBody"/>
+
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="first" master-reference="PageFront"/>
+ <fo:conditional-page-master-reference page-position="rest" master-reference="PageRest"/>
+ <fo:conditional-page-master-reference page-position="last" master-reference="PageRest"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ <fo:page-sequence-master master-name="LetterPagesMYLocal">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference master-reference="PageFrontRestMediaType" page-position="first"/>
+ <fo:conditional-page-master-reference page-position="rest" master-reference="PageRest"/>
+ <fo:conditional-page-master-reference page-position="last" master-reference="PageRest"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence format="1" id="th_default_sequence1" initial-page-number="auto" force-page-count="auto" master-reference="LetterPages">
+
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>
+
+ <fo:block page-break-after="always">
+ <fo:leader/>
+ </fo:block>
+
+ <fo:block>
+ test
+ </fo:block>
+
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ <fo:page-sequence format="1" id="th_default_sequence4" master-reference="LetterPagesMYLocal" initial-page-number="auto" force-page-count="auto">
+
+ <fo:flow flow-name="letterPageBody">
+
+ <fo:block>
+
+ <fo:block page-break-after="always">
+ <fo:leader/>
+ </fo:block>
+ <fo:block page-break-after="always">
+ <fo:leader/>
+ </fo:block>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(100)" column-number="1"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(1)" column-number="1"/>
+ <fo:table-column column-width="proportional-column-width(28.49)" column-number="2"/>
+ <fo:table-column column-width="proportional-column-width(21.55)" column-number="3"/>
+ <fo:table-column column-width="proportional-column-width(47.96)" column-number="4"/>
+ <fo:table-column column-width="proportional-column-width(1)" column-number="5"/>
+ <fo:table-body>
+ <fo:table-row height="16px">
+ <fo:table-cell>
+ <fo:block>
+ <fo:block>
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-columns-spanned="3">
+ <fo:block>
+ test
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>
+ <fo:block>
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>
+ <fo:block>
+ <fo:leader/>
+ </fo:block>
+ </fo:block>
+ </fo:table-cell>
+
+ </fo:table-row>
+
+
+ </fo:table-body>
+ </fo:table>
+
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+
+ </fo>
+ <checks>
+ <eval expected="test" xpath="//word"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_8.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_8.xml
new file mode 100644
index 000000000..53c83e847
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_8.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that the definition of a special page-master for the last page with a
+ different width that the previous "rest" page causes FOP to redo the line breaking layout.
+ </p>
+ </info>
+ <fo>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="Page-Portrait" page-width="8.5in" page-height="11in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="Page_Landscape" page-width="11in" page-height="8.5in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="first" master-reference="Page-Portrait"/>
+ <fo:conditional-page-master-reference master-reference="Page_Landscape" page-position="rest"/>
+ <fo:conditional-page-master-reference master-reference="Page-Portrait" page-position="last"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="LetterPages">
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. </fo:block>
+ <fo:block break-before="page"/>
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. </fo:block>
+ <fo:block break-before="page"/>
+ <fo:table>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block></fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>A table with first row empty after change in IPD and forced break before page...</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
+ </fo>
+ <checks>
+ <eval expected="A table with first row empty after change in IPD and forced break before page..." xpath="//pageViewport[3]//lineArea"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_9.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_9.xml
new file mode 100644
index 000000000..2517aaa37
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_last-page_9.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that the definition of a special page-master for the last page with a
+ different width that the previous "rest" page causes FOP to redo the line breaking layout.
+ </p>
+ </info>
+ <fo>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="Page-Portrait" page-width="8.5in" page-height="11in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master master-name="Page_Landscape" page-width="11in" page-height="8.5in" margin-bottom="0in" margin-right="0in" margin-top="0in" margin-left="0in">
+ <fo:region-body margin-bottom="0.5in" margin-right="0.5in" margin-top="0.5in" margin-left="0.5in" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="first" master-reference="Page-Portrait"/>
+ <fo:conditional-page-master-reference master-reference="Page_Landscape" page-position="rest"/>
+ <fo:conditional-page-master-reference master-reference="Page-Portrait" page-position="last"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="LetterPages">
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. </fo:block>
+ <fo:block break-before="page"/>
+ <fo:block>This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. This is just some generic text to use for testing. </fo:block>
+ <fo:block break-after="page"/>
+ <fo:table>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block></fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>A table with first row empty after change in IPD and forced break after page...</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
+ </fo>
+ <checks>
+ <eval expected="A table with first row empty after change in IPD and forced break after page..." xpath="//pageViewport[3]//lineArea"/>
+ </checks>
+</testcase>
diff --git a/test/layoutengine/standard-testcases/flow_changing-ipd_no-last-page.xml b/test/layoutengine/standard-testcases/flow_changing-ipd_no-last-page.xml
new file mode 100644
index 000000000..bf9441371
--- /dev/null
+++ b/test/layoutengine/standard-testcases/flow_changing-ipd_no-last-page.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks that the definition of a special page-master for the last page does not
+ interfere with the changing IPD code.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
+ <fo:layout-master-set>
+ <fo:simple-page-master margin-right="0mm" margin-top="4mm" margin-left="7mm" margin-bottom="8mm" master-name="PageFront" page-width="210mm" page-height="297mm">
+ <fo:region-body margin-right="20mm" region-name="letterPageBody" margin-top="46mm" margin-left="26mm" margin-bottom="10mm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master margin-right="0mm" margin-top="4mm" margin-left="7mm" master-name="PageRest" page-width="210mm" page-height="297mm" margin-bottom="8mm">
+ <fo:region-body margin-right="20mm" margin-top="35mm" margin-left="13mm" region-name="letterPageBody" margin-bottom="10mm"/>
+ </fo:simple-page-master>
+ <fo:simple-page-master margin-right="0mm" master-name="PageBlank" margin-top="4mm" margin-left="7mm" page-width="210mm" page-height="297mm" margin-bottom="8mm">
+ <fo:region-body margin-right="20mm" margin-top="38mm" margin-bottom="12mm" margin-left="26mm" region-name="letterPageBody"/>
+ </fo:simple-page-master>
+ <fo:page-sequence-master master-name="LetterPages">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference page-position="first" master-reference="PageFront"/>
+ <fo:conditional-page-master-reference page-position="rest" master-reference="PageRest"/>
+ <fo:conditional-page-master-reference blank-or-not-blank="not-blank" odd-or-even="even" page-position="last" master-reference="PageRest"/>
+ <fo:conditional-page-master-reference blank-or-not-blank="blank" odd-or-even="even" page-position="last" master-reference="PageBlank"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+ </fo:layout-master-set>
+ <fo:page-sequence format="1" id="th_default_sequence1" initial-page-number="auto" force-page-count="end-on-even" master-reference="LetterPages">
+
+ <fo:flow flow-name="letterPageBody">
+ <fo:block>
+ <fo:table table-layout="fixed">
+ <fo:table-body>
+ <fo:table-row height="30mm">
+ <fo:table-cell width="157mm">
+ <fo:block/>
+ </fo:table-cell>
+ </fo:table-row>
+ <fo:table-row height="199mm" display-align="after">
+ <fo:table-cell width="157mm">
+ <fo:block margin-bottom="0mm"/>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+ <fo:block>
+ <fo:block font-size="9pt">
+ <fo:leader/>
+ <fo:block break-before="page"/>
+ </fo:block>
+ </fo:block>
+
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="" xpath="//pageViewport[1]//flow/block[2]//text"/>
+ <eval expected="" xpath="//pageViewport[2]//flow/block[1]//text"/>
+ </checks>
+</testcase>
diff --git a/xmlgraphics-fop-pom-template.pom b/xmlgraphics-fop-pom-template.pom
index d15b15183..6f7911053 100644
--- a/xmlgraphics-fop-pom-template.pom
+++ b/xmlgraphics-fop-pom-template.pom
@@ -75,7 +75,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId>
- <version>2.0.1</version>
+ <version>2.1</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>