From 8430f0839958e9c59877fb05ae4ffb487ffc0296 Mon Sep 17 00:00:00 2001
From: Mehdi Houshmand
Date: Fri, 24 Aug 2012 14:50:54 +0000
Subject: Bugzilla#48954: Support for character encoding of TLEs in AFP output.
Submitted by PH.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1376950 13f79535-47bb-0310-9956-ffa450edef68
---
src/documentation/content/xdocs/trunk/output.xml | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'src/documentation')
diff --git a/src/documentation/content/xdocs/trunk/output.xml b/src/documentation/content/xdocs/trunk/output.xml
index 7c4ace72e..4f792971b 100644
--- a/src/documentation/content/xdocs/trunk/output.xml
+++ b/src/documentation/content/xdocs/trunk/output.xml
@@ -971,7 +971,8 @@ Note that the value of the encoding attribute in the example is the double-byte
xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp">
-
+
@@ -985,7 +986,7 @@ Note that the value of the encoding attribute in the example is the double-byte
The tag-logical-element extension element can appear within a simple-page-master
(page level) or it can appear as child of page-sequence (page group level).
Multiple tag-logical-element extension elements within a simple-page-master or
- page-sequence are allowed. The name and value attributes are mandatory.
+ page-sequence are allowed. The name and value attributes are mandatory. The encoding attribute specifying a CCSID encoding is optional.
--
cgit v1.2.3
From 03bedaf0caa6c39823437e43b2f8547d476d24e7 Mon Sep 17 00:00:00 2001
From: Pascal Sancho
Date: Wed, 12 Sep 2012 12:35:42 +0000
Subject: FOP website: broken links to nabble archives
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1383917 13f79535-47bb-0310-9956-ffa450edef68
---
src/documentation/content/xdocs/dev/index.xml | 2 +-
src/documentation/content/xdocs/maillist.xml | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to 'src/documentation')
diff --git a/src/documentation/content/xdocs/dev/index.xml b/src/documentation/content/xdocs/dev/index.xml
index 357402026..27f1b2cd9 100644
--- a/src/documentation/content/xdocs/dev/index.xml
+++ b/src/documentation/content/xdocs/dev/index.xml
@@ -97,7 +97,7 @@ To review the archives, you have several options:
The Mailing list ARChives (MARC) at the AIMS group (search).
The Mail Archive.
The GMANE archive.
-
The Nabble archive.
+
The Nabble archive.
The MarkMail archive.
diff --git a/src/documentation/content/xdocs/maillist.xml b/src/documentation/content/xdocs/maillist.xml
index b24166462..406ccf3c0 100644
--- a/src/documentation/content/xdocs/maillist.xml
+++ b/src/documentation/content/xdocs/maillist.xml
@@ -43,17 +43,17 @@ If you are using Microsoft Outlook, this setting can be found at the "Mail Forma
Archives
To review the archives, you have several options:
-
+
The Apache Mailing List archive (mod_mbox archive, no full-text search, yet).
The Apache Mailing List archive (gzipped mbox files).
The Mailing list ARChives (MARC) at the AIMS group.
The Mail Archive.
The GMANE archive.
-
The Nabble archive (only posts after May 2005).
+
The Nabble archive (only posts after May 2005).
The MarkMail archive.
- If you don't like mailing lists and prefer a forum-like system, have a look at
+ If you don't like mailing lists and prefer a forum-like system, have a look at
GMANE or
Nabble. They
allow you to post to the mailing list without having to subscribe.
--
cgit v1.2.3
From d99dc75ffa1d37817ce18cff188fdabc29f9f73e Mon Sep 17 00:00:00 2001
From: Peter Hancock
Date: Thu, 13 Sep 2012 12:45:27 +0000
Subject: Bugzilla #53865: Add Rows per Strip configuration for Tiff renderer
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1384310 13f79535-47bb-0310-9956-ffa450edef68
---
lib/xmlgraphics-commons-1.5svn.jar | Bin 603006 -> 607764 bytes
src/documentation/content/xdocs/trunk/output.xml | 5 +++++
.../fop/render/bitmap/TIFFDocumentHandler.java | 4 ++++
.../fop/render/bitmap/TIFFRendererConfig.java | 19 ++++++++++++++++---
.../render/bitmap/TIFFRendererConfigurator.java | 8 +++++++-
status.xml | 5 +++++
.../apache/fop/apps/TIFFRendererConfBuilder.java | 7 ++++++-
.../bitmap/TIFFRendererConfigParserTestCase.java | 12 +++++++++++-
.../bitmap/TIFFRendererConfiguratorTestCase.java | 13 ++++++++++++-
9 files changed, 66 insertions(+), 7 deletions(-)
(limited to 'src/documentation')
diff --git a/lib/xmlgraphics-commons-1.5svn.jar b/lib/xmlgraphics-commons-1.5svn.jar
index 802ae49ae..1a56594b2 100644
Binary files a/lib/xmlgraphics-commons-1.5svn.jar and b/lib/xmlgraphics-commons-1.5svn.jar differ
diff --git a/src/documentation/content/xdocs/trunk/output.xml b/src/documentation/content/xdocs/trunk/output.xml
index 4f792971b..5de820c18 100644
--- a/src/documentation/content/xdocs/trunk/output.xml
+++ b/src/documentation/content/xdocs/trunk/output.xml
@@ -1270,6 +1270,7 @@ Note that the value of the encoding attribute in the example is the double-byte
@@ -1303,6 +1304,10 @@ Note that the value of the encoding attribute in the example is the double-byte
added separately. The internal TIFF codec from XML Graphics Commons only supports PackBits,
Deflate and JPEG compression for writing.
+
+ The default value for the "single-strip" is "false" resulting in the RowsPerStrip Tiff Tag equal to the number of rows.
+ If set to true RowsPerStrip is set to 1.
+
Runtime Rendering Options
diff --git a/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandler.java b/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandler.java
index 48e79520f..d536167c3 100644
--- a/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandler.java
+++ b/src/java/org/apache/fop/render/bitmap/TIFFDocumentHandler.java
@@ -19,9 +19,12 @@
package org.apache.fop.render.bitmap;
+import org.apache.xmlgraphics.image.writer.ResolutionUnit;
+
import org.apache.fop.apps.MimeConstants;
import org.apache.fop.render.bitmap.TIFFRendererConfig.TIFFRendererConfigParser;
import org.apache.fop.render.intermediate.IFContext;
+import org.apache.fop.render.intermediate.IFDocumentHandler;
import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
/**
@@ -32,6 +35,7 @@ public class TIFFDocumentHandler extends AbstractBitmapDocumentHandler {
TIFFDocumentHandler(IFContext context) {
super(context);
+ getSettings().getWriterParams().setResolutionUnit(ResolutionUnit.CENTIMETER);
}
/** {@inheritDoc} */
diff --git a/src/java/org/apache/fop/render/bitmap/TIFFRendererConfig.java b/src/java/org/apache/fop/render/bitmap/TIFFRendererConfig.java
index 3c833d3b0..1e44397f6 100644
--- a/src/java/org/apache/fop/render/bitmap/TIFFRendererConfig.java
+++ b/src/java/org/apache/fop/render/bitmap/TIFFRendererConfig.java
@@ -23,21 +23,24 @@ import java.util.EnumMap;
import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.xmlgraphics.util.MimeConstants;
-
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.MimeConstants;
import org.apache.fop.fonts.DefaultFontConfig;
import org.apache.fop.fonts.DefaultFontConfig.DefaultFontConfigParser;
import org.apache.fop.render.RendererConfigOption;
+import static org.apache.fop.render.bitmap.TIFFCompressionValue.PACKBITS;
+
/**
* The renderer configuration object for the TIFF renderer.
*/
public final class TIFFRendererConfig extends BitmapRendererConfig {
public enum TIFFRendererOption implements RendererConfigOption {
- COMPRESSION("compression", TIFFCompressionValue.PACKBITS);
+ COMPRESSION("compression", PACKBITS),
+ /** option to encode one row per strip or a all rows in a single strip*/
+ SINGLE_STRIP("single-strip", Boolean.FALSE);
private final String name;
private final Object defaultValue;
@@ -67,6 +70,14 @@ public final class TIFFRendererConfig extends BitmapRendererConfig {
return (TIFFCompressionValue) params.get(TIFFRendererOption.COMPRESSION);
}
+ /**
+ * @return True if all rows are contained in a single strip, False each strip contains one row or null
+ * if not set.
+ */
+ public Boolean isSingleStrip() {
+ return (Boolean) params.get(TIFFRendererOption.SINGLE_STRIP);
+ }
+
/**
* The TIFF renderer configuration parser.
*/
@@ -94,6 +105,8 @@ public final class TIFFRendererConfig extends BitmapRendererConfig {
if (cfg != null) {
setParam(TIFFRendererOption.COMPRESSION,
TIFFCompressionValue.getType(getValue(cfg, TIFFRendererOption.COMPRESSION)));
+ setParam(TIFFRendererOption.SINGLE_STRIP, Boolean.valueOf(getValue(cfg,
+ TIFFRendererOption.SINGLE_STRIP)));
}
return config;
}
diff --git a/src/java/org/apache/fop/render/bitmap/TIFFRendererConfigurator.java b/src/java/org/apache/fop/render/bitmap/TIFFRendererConfigurator.java
index 593934b45..19abb8131 100644
--- a/src/java/org/apache/fop/render/bitmap/TIFFRendererConfigurator.java
+++ b/src/java/org/apache/fop/render/bitmap/TIFFRendererConfigurator.java
@@ -76,7 +76,12 @@ public class TIFFRendererConfigurator extends BitmapRendererConfigurator {
}
}
- /** {@inheritDoc} */
+ private boolean isSingleStrip(TIFFRendererConfig config) {
+ Boolean singleRowPerStrip = config.isSingleStrip();
+ return singleRowPerStrip == null ? false : singleRowPerStrip;
+ }
+
+ @Override
public void configure(IFDocumentHandler documentHandler) throws FOPException {
final TIFFRendererConfig config = (TIFFRendererConfig) getRendererConfig(documentHandler);
if (config != null) {
@@ -84,6 +89,7 @@ public class TIFFRendererConfigurator extends BitmapRendererConfigurator {
BitmapRenderingSettings settings = tiffHandler.getSettings();
configure(documentHandler, settings, new TIFFRendererConfigParser());
setCompressionMethod(config.getCompressionType(), settings);
+ settings.getWriterParams().setSingleStrip(isSingleStrip(config));
}
}
diff --git a/status.xml b/status.xml
index 3e73488fb..b39d3d9e0 100644
--- a/status.xml
+++ b/status.xml
@@ -62,6 +62,11 @@
documents. Example: the fix of marks layering will be such a case when it's done.
-->
+
+ 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.
+
Always set the breakClass field to a legal value in BreakElement, so as to avoid
IllegalArgumentExceptions in other parts of the code.
diff --git a/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java b/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java
index 8b72a558d..f39df2988 100644
--- a/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java
+++ b/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java
@@ -20,7 +20,7 @@
package org.apache.fop.apps;
import static org.apache.fop.render.bitmap.TIFFRendererConfig.TIFFRendererOption.COMPRESSION;
-
+import static org.apache.fop.render.bitmap.TIFFRendererConfig.TIFFRendererOption.SINGLE_STRIP;
public class TIFFRendererConfBuilder extends BitmapRendererConfBuilder {
public TIFFRendererConfBuilder() {
@@ -31,4 +31,9 @@ public class TIFFRendererConfBuilder extends BitmapRendererConfBuilder {
createTextElement(COMPRESSION, mode);
return this;
}
+
+ public TIFFRendererConfBuilder setSingleStrip(boolean single) {
+ createTextElement(SINGLE_STRIP, String.valueOf(single));
+ return this;
+ }
}
diff --git a/test/java/org/apache/fop/render/bitmap/TIFFRendererConfigParserTestCase.java b/test/java/org/apache/fop/render/bitmap/TIFFRendererConfigParserTestCase.java
index 487b8cb9f..69326559e 100644
--- a/test/java/org/apache/fop/render/bitmap/TIFFRendererConfigParserTestCase.java
+++ b/test/java/org/apache/fop/render/bitmap/TIFFRendererConfigParserTestCase.java
@@ -26,9 +26,11 @@ import org.apache.fop.apps.TIFFRendererConfBuilder;
import org.apache.fop.render.bitmap.TIFFRendererConfig.TIFFRendererConfigParser;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
public class TIFFRendererConfigParserTestCase
- extends AbstractBitmapRendererConfigParserTester {
+extends AbstractBitmapRendererConfigParserTester {
public TIFFRendererConfigParserTestCase() {
super(new TIFFRendererConfigParser());
@@ -52,4 +54,12 @@ public class TIFFRendererConfigParserTestCase
assertEquals(value, getConfig().getCompressionType());
}
}
+
+ @Test
+ public void testSingleStrip() throws Exception {
+ parseConfig(createRenderer().setSingleStrip(true));
+ assertTrue(getConfig().isSingleStrip());
+ parseConfig(createRenderer().setSingleStrip(false));
+ assertFalse(getConfig().isSingleStrip());
+ }
}
diff --git a/test/java/org/apache/fop/render/bitmap/TIFFRendererConfiguratorTestCase.java b/test/java/org/apache/fop/render/bitmap/TIFFRendererConfiguratorTestCase.java
index c97d73333..3e6c951a6 100644
--- a/test/java/org/apache/fop/render/bitmap/TIFFRendererConfiguratorTestCase.java
+++ b/test/java/org/apache/fop/render/bitmap/TIFFRendererConfiguratorTestCase.java
@@ -23,7 +23,6 @@ import java.awt.image.BufferedImage;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
import org.apache.fop.apps.FopConfBuilder;
import org.apache.fop.apps.MimeConstants;
@@ -32,6 +31,9 @@ import org.apache.fop.render.bitmap.TIFFRendererConfig.TIFFRendererConfigParser;
import static org.apache.fop.render.bitmap.TIFFCompressionValue.CCITT_T4;
import static org.apache.fop.render.bitmap.TIFFCompressionValue.CCITT_T6;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
public class TIFFRendererConfiguratorTestCase extends AbstractBitmapRendererConfiguratorTest {
@@ -61,4 +63,13 @@ public class TIFFRendererConfiguratorTestCase extends AbstractBitmapRendererConf
}
}
}
+
+ @Test
+ public void testSingleStrip() throws Exception {
+ parseConfig(createBuilder().setSingleStrip(true));
+ assertTrue(settings.getWriterParams().isSingleStrip());
+ parseConfig(createBuilder().setSingleStrip(false));
+ assertFalse(settings.getWriterParams().isSingleStrip());
+ }
+
}
--
cgit v1.2.3