Fridrich Strba 2024-10-03 10:53:55 +00:00 committed by Git OBS Bridge
commit b78642e4df
19 changed files with 2248 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

10
fix-javadoc-java8.patch Normal file
View File

@ -0,0 +1,10 @@
--- fop-2.5/fop/build.xml
+++ fop-2.5/fop/build.xml
@@ -904,6 +904,7 @@ NOTE:
doctitle="Apache Formatting Objects Processor (FOP)"
bottom="Copyright ${year} The Apache Software Foundation. All Rights Reserved."
overview="${src.java.dir}/org/apache/fop/overview.html"
+ additionalparam="--allow-script-in-comments"
maxmemory="256M">
<header><![CDATA[${name} ${version}]]></header>
<footer><![CDATA[${name} ${version}]]></footer>

138
fop-2.5-QDox-2.0.patch Normal file
View File

@ -0,0 +1,138 @@
--- fop-2.5/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java 2020-05-05 11:42:05.000000000 +0200
+++ fop-2.5/fop-events/src/main/java/org/apache/fop/tools/EventProducerCollector.java 2020-06-03 10:49:58.195555295 +0200
@@ -21,6 +21,7 @@
import java.io.File;
import java.io.IOException;
+import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -31,14 +32,11 @@
import org.apache.fop.events.model.EventProducerModel;
import org.apache.fop.events.model.EventSeverity;
-import com.thoughtworks.qdox.JavaDocBuilder;
-import com.thoughtworks.qdox.model.DefaultDocletTagFactory;
+import com.thoughtworks.qdox.JavaProjectBuilder;
import com.thoughtworks.qdox.model.DocletTag;
-import com.thoughtworks.qdox.model.DocletTagFactory;
import com.thoughtworks.qdox.model.JavaClass;
import com.thoughtworks.qdox.model.JavaMethod;
import com.thoughtworks.qdox.model.JavaParameter;
-import com.thoughtworks.qdox.model.Type;
/**
* Finds EventProducer interfaces and builds the event model for them.
@@ -61,22 +59,12 @@
PRIMITIVE_MAP = Collections.unmodifiableMap(m);
}
- private DocletTagFactory tagFactory;
private List<EventModel> models = new java.util.ArrayList<EventModel>();
/**
* Creates a new EventProducerCollector.
*/
EventProducerCollector() {
- this.tagFactory = createDocletTagFactory();
- }
-
- /**
- * Creates the {@link DocletTagFactory} to be used by the collector.
- * @return the doclet tag factory
- */
- protected DocletTagFactory createDocletTagFactory() {
- return new DefaultDocletTagFactory();
}
/**
@@ -89,9 +77,9 @@
*/
public boolean scanFile(File src)
throws IOException, EventConventionException, ClassNotFoundException {
- JavaDocBuilder builder = new JavaDocBuilder(this.tagFactory);
+ JavaProjectBuilder builder = new JavaProjectBuilder();
builder.addSource(src);
- JavaClass[] classes = builder.getClasses();
+ Collection<JavaClass> classes = builder.getClasses();
boolean eventProducerFound = false;
for (JavaClass clazz : classes) {
if (clazz.isInterface() && implementsInterface(clazz, CLASSNAME_EVENT_PRODUCER)) {
@@ -103,7 +91,7 @@
}
private boolean implementsInterface(JavaClass clazz, String intf) {
- JavaClass[] classes = clazz.getImplementedInterfaces();
+ List<JavaClass> classes = clazz.getInterfaces();
for (JavaClass cl : classes) {
if (cl.getFullyQualifiedName().equals(intf)) {
return true;
@@ -121,7 +109,7 @@
protected void processEventProducerInterface(JavaClass clazz)
throws EventConventionException, ClassNotFoundException {
EventProducerModel prodMeta = new EventProducerModel(clazz.getFullyQualifiedName());
- JavaMethod[] methods = clazz.getMethods(true);
+ List<JavaMethod> methods = clazz.getMethods(true);
for (JavaMethod method : methods) {
EventMethodModel methodMeta = createMethodModel(method);
prodMeta.addMethod(methodMeta);
@@ -133,20 +121,20 @@
private EventMethodModel createMethodModel(JavaMethod method)
throws EventConventionException, ClassNotFoundException {
- JavaClass clazz = method.getParentClass();
+ JavaClass clazz = method.getDeclaringClass();
//Check EventProducer conventions
- if (!method.getReturnType().isVoid()) {
+ if (!method.getReturns().isVoid()) {
throw new EventConventionException("All methods of interface "
+ clazz.getFullyQualifiedName() + " must have return type 'void'!");
}
String methodSig = clazz.getFullyQualifiedName() + "." + method.getCallSignature();
- JavaParameter[] params = method.getParameters();
- if (params.length < 1) {
+ List<JavaParameter> params = method.getParameters();
+ if (params.size() < 1) {
throw new EventConventionException("The method " + methodSig
+ " must have at least one parameter: 'Object source'!");
}
- Type firstType = params[0].getType();
- if (firstType.isPrimitive() || !"source".equals(params[0].getName())) {
+ JavaClass firstType = params.get(0).getJavaClass();
+ if (firstType.isPrimitive() || !"source".equals(params.get(0).getName())) {
throw new EventConventionException("The first parameter of the method " + methodSig
+ " must be: 'Object source'!");
}
@@ -161,12 +149,12 @@
}
EventMethodModel methodMeta = new EventMethodModel(
method.getName(), severity);
- if (params.length > 1) {
- for (int j = 1, cj = params.length; j < cj; j++) {
- JavaParameter p = params[j];
+ if (params.size() > 1) {
+ for (int j = 1, cj = params.size(); j < cj; j++) {
+ JavaParameter p = params.get(j);
Class<?> type;
- JavaClass pClass = p.getType().getJavaClass();
- if (p.getType().isPrimitive()) {
+ JavaClass pClass = p.getJavaClass();
+ if (pClass.isPrimitive()) {
type = PRIMITIVE_MAP.get(pClass.getName());
if (type == null) {
throw new UnsupportedOperationException(
@@ -179,10 +167,10 @@
methodMeta.addParameter(type, p.getName());
}
}
- Type[] exceptions = method.getExceptions();
- if (exceptions != null && exceptions.length > 0) {
+ List<JavaClass> exceptions = method.getExceptions();
+ if (exceptions != null && exceptions.size() > 0) {
//We only use the first declared exception because that is always thrown
- JavaClass cl = exceptions[0].getJavaClass();
+ JavaClass cl = exceptions.get(0);
methodMeta.setExceptionClass(cl.getFullyQualifiedName());
methodMeta.setSeverity(EventSeverity.FATAL); //In case it's not set in the comments
}

BIN
fop-2.8-src.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,12 @@
diff -urEbwB fop-2.5/fop/build.xml fop-2.5/fop/build.xml
--- fop-2.5/fop/build.xml 2020-05-05 11:42:05.000000000 +0200
+++ fop-2.5/fop/build.xml 2020-06-03 11:09:17.026418161 +0200
@@ -207,7 +207,7 @@
<property name="lib.dir" value="${basedir}/lib"/>
<property name="user.hyph.dir" value="${basedir}/hyph"/>
<property name="unidata.dir" value="${basedir}/UNIDATA"/>
- <property name="hyph.stacksize" value="512k"/>
+ <property name="hyph.stacksize" value="1M"/>
<property name="test.dir" value="${basedir}/test"/>
<property name="test.java.dir" value="${src.dir}/test/java"/>
<property name="test.resources.dir" value="${src.dir}/test/resources"/>

227
java8-compatibility.patch Normal file
View File

@ -0,0 +1,227 @@
--- fop-2.5/fop-core/src/main/java/org/apache/fop/afp/fonts/CharactersetEncoder.java 2020-05-05 11:42:04.000000000 +0200
+++ fop-2.5/fop-core/src/main/java/org/apache/fop/afp/fonts/CharactersetEncoder.java 2020-06-03 11:18:04.577537190 +0200
@@ -21,6 +21,7 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.CharacterCodingException;
@@ -68,7 +69,7 @@
if (bb.hasArray()) {
return getEncodedChars(bb.array(), bb.limit());
} else {
- bb.rewind();
+ ((Buffer)bb).rewind();
byte[] bytes = new byte[bb.remaining()];
bb.get(bytes);
return getEncodedChars(bytes, bytes.length);
--- fop-2.5/fop-core/src/main/java/org/apache/fop/area/AreaTreeParser.java 2020-05-05 11:42:04.000000000 +0200
+++ fop-2.5/fop-core/src/main/java/org/apache/fop/area/AreaTreeParser.java 2020-06-03 11:18:04.581537214 +0200
@@ -24,6 +24,7 @@
import java.awt.geom.Rectangle2D;
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.nio.Buffer;
import java.nio.CharBuffer;
import java.util.List;
import java.util.Map;
@@ -326,7 +327,7 @@
throws SAXException {
lastAttributes = new AttributesImpl(attributes);
Maker maker = makers.get(localName);
- content.clear();
+ ((Buffer)content).clear();
ignoreCharacters = true;
if (maker != null) {
ignoreCharacters = maker.ignoreCharacters();
@@ -357,7 +358,7 @@
Maker maker = makers.get(localName);
if (maker != null) {
maker.endElement();
- content.clear();
+ ((Buffer)content).clear();
}
ignoreCharacters = true;
} else {
@@ -845,7 +846,7 @@
boolean reversed = XMLUtil.getAttributeAsBoolean(lastAttributes, "reversed", false);
int[][] gposAdjustments
= XMLUtil.getAttributeAsPositionAdjustments(lastAttributes, "position-adjust");
- content.flip();
+ ((Buffer)content).flip();
WordArea word = new WordArea(
offset, level, content.toString().trim(), letterAdjust,
null, gposAdjustments, reversed);
@@ -865,7 +866,7 @@
int offset = XMLUtil.getAttributeAsInt(lastAttributes, "offset", 0);
//TODO the isAdjustable parameter is currently not used/implemented
if (content.position() > 0) {
- content.flip();
+ ((Buffer)content).flip();
boolean adjustable = XMLUtil.getAttributeAsBoolean(lastAttributes, "adj", true);
int level = XMLUtil.getAttributeAsInt(lastAttributes, "level", -1);
SpaceArea space = new SpaceArea(offset, level, content.charAt(0), adjustable);
@@ -1254,17 +1255,17 @@
// allocate a larger buffer and transfer content
CharBuffer newContent
= CharBuffer.allocate(this.content.position() + length);
- this.content.flip();
+ ((Buffer)(this.content)).flip();
newContent.put(this.content);
this.content = newContent;
}
// make sure the full capacity is used
- this.content.limit(this.content.capacity());
+ ((Buffer)(this.content)).limit(this.content.capacity());
// add characters to the buffer
this.content.put(ch, start, length);
// decrease the limit, if necessary
if (this.content.position() < this.content.limit()) {
- this.content.limit(this.content.position());
+ ((Buffer)(this.content)).limit(this.content.position());
}
}
}
--- fop-2.5/fop-core/src/main/java/org/apache/fop/fo/FOText.java 2020-05-05 11:42:04.000000000 +0200
+++ fop-2.5/fop-core/src/main/java/org/apache/fop/fo/FOText.java 2020-06-03 11:18:04.581537214 +0200
@@ -20,6 +20,7 @@
package org.apache.fop.fo;
import java.awt.Color;
+import java.nio.Buffer;
import java.nio.CharBuffer;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
@@ -134,17 +135,17 @@
newCapacity = requires;
}
CharBuffer newBuffer = CharBuffer.allocate(newCapacity);
- charBuffer.rewind();
+ ((Buffer)charBuffer).rewind();
newBuffer.put(charBuffer);
charBuffer = newBuffer;
}
}
// extend limit to capacity
- charBuffer.limit(charBuffer.capacity());
+ ((Buffer)charBuffer).limit(charBuffer.capacity());
// append characters
charBuffer.put(data, start, length);
// shrink limit to position
- charBuffer.limit(charBuffer.position());
+ ((Buffer)charBuffer).limit(((Buffer)charBuffer).position());
}
/**
@@ -156,7 +157,7 @@
if (this.charBuffer == null) {
return null;
}
- this.charBuffer.rewind();
+ ((Buffer)(this.charBuffer)).rewind();
return this.charBuffer.asReadOnlyBuffer().subSequence(0, this.charBuffer.limit());
}
@@ -169,9 +170,9 @@
// pointed to is really a different one
if (charBuffer != null) {
ft.charBuffer = CharBuffer.allocate(charBuffer.limit());
- charBuffer.rewind();
+ ((Buffer)charBuffer).rewind();
ft.charBuffer.put(charBuffer);
- ft.charBuffer.rewind();
+ ((Buffer)(ft.charBuffer)).rewind();
}
}
ft.prevFOTextThisBlock = null;
@@ -203,7 +204,7 @@
/** {@inheritDoc} */
public void endOfNode() throws FOPException {
if (charBuffer != null) {
- charBuffer.rewind();
+ ((Buffer)charBuffer).rewind();
}
super.endOfNode();
getFOEventHandler().characters(this);
@@ -230,7 +231,7 @@
}
char ch;
- charBuffer.rewind();
+ ((Buffer)charBuffer).rewind();
while (charBuffer.hasRemaining()) {
ch = charBuffer.get();
if (!((ch == CharUtilities.SPACE)
@@ -238,7 +239,7 @@
|| (ch == CharUtilities.CARRIAGE_RETURN)
|| (ch == CharUtilities.TAB))) {
// not whitespace
- charBuffer.rewind();
+ ((Buffer)charBuffer).rewind();
return true;
}
}
@@ -281,7 +282,7 @@
return;
}
- charBuffer.rewind();
+ ((Buffer)charBuffer).rewind();
CharBuffer tmp = charBuffer.slice();
char c;
int lim = charBuffer.limit();
@@ -548,19 +549,19 @@
public void remove() {
if (this.canRemove) {
- charBuffer.position(currentPosition);
+ ((Buffer)charBuffer).position(currentPosition);
// Slice the buffer at the current position
CharBuffer tmp = charBuffer.slice();
// Reset position to before current character
- charBuffer.position(--currentPosition);
+ ((Buffer)charBuffer).position(--currentPosition);
if (tmp.hasRemaining()) {
// Transfer any remaining characters
- charBuffer.mark();
+ ((Buffer)charBuffer).mark();
charBuffer.put(tmp);
- charBuffer.reset();
+ ((Buffer)charBuffer).reset();
}
// Decrease limit
- charBuffer.limit(charBuffer.limit() - 1);
+ ((Buffer)charBuffer).limit(((Buffer)charBuffer).limit() - 1);
// Make sure following calls fail, unless nextChar() was called
this.canRemove = false;
} else {
@@ -743,7 +744,7 @@
*/
public void resetBuffer() {
if (charBuffer != null) {
- charBuffer.rewind();
+ ((Buffer)charBuffer).rewind();
}
}
--- fop-2.5/fop-core/src/main/java/org/apache/fop/fonts/MultiByteFont.java 2020-05-05 11:42:05.000000000 +0200
+++ fop-2.5/fop-core/src/main/java/org/apache/fop/fonts/MultiByteFont.java 2020-06-03 11:19:29.182037444 +0200
@@ -21,6 +21,7 @@
import java.awt.Rectangle;
import java.io.InputStream;
+import java.nio.Buffer;
import java.nio.CharBuffer;
import java.nio.IntBuffer;
import java.util.ArrayList;
@@ -731,7 +732,7 @@
cb.put(c);
}
- cb.flip();
+ ((Buffer)cb).flip();
return cb;
}

BIN
offo-hyphenation.zip (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,50 @@
--- fop-2.5/fop/build.xml 2020-05-05 11:42:05.000000000 +0200
+++ fop-2.5/fop/build.xml 2020-06-03 11:24:41.859886083 +0200
@@ -500,7 +500,6 @@
<attribute name="Implementation-Title" value="${Name}"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation (http://xmlgraphics.apache.org/fop/)"/>
- <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
</manifest>
</jar>
</target>
@@ -522,7 +521,6 @@
<jar jarfile="${build.dir}/fop.jar">
<manifest>
<attribute name="Main-Class" value="org.apache.fop.cli.Main"/>
- <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
<section name="org/apache/fop/">
<attribute name="Specification-Title" value="XSL-FO - Extensible Stylesheet Language"/>
<attribute name="Specification-Version" value="1.1"/>
@@ -550,9 +548,7 @@
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
</tstamp>
<jar jarfile="${build.dir}/fop-sandbox.jar" basedir="${build.sandbox-classes.dir}">
- <manifest>
- <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
- </manifest>
+ <manifest/>
<metainf dir="${basedir}/.." includes="LICENSE,NOTICE"/>
</jar>
</target>
@@ -983,9 +979,7 @@
</target>
<target name="jar-javadocs" depends="javadocs" description="Generates a jar file containing the Javadocs">
<jar jarfile="${build.dir}/${name}-${version}-javadoc.jar">
- <manifest>
- <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}, Java ${java.runtime.version}, Target Java ${javac.target}])"/>
- </manifest>
+ <manifest/>
<fileset dir="${build.javadocs.dir}"/>
<metainf dir="${basedir}/.." includes="LICENSE,NOTICE"/>
</jar>
--- fop-2.5/fop/examples/plan/build.xml 2020-05-05 11:42:05.000000000 +0200
+++ fop-2.5/fop/examples/plan/build.xml 2020-06-03 11:50:35.613163539 +0200
@@ -133,7 +133,6 @@
<attribute name="Implementation-Title" value="${Name}"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="Apache Software Foundation (http://xmlgraphics.apache.org/fop/)"/>
- <attribute name="Build-Id" value="${ts} (${user.name} [${os.name} ${os.version} ${os.arch}])"/>
</manifest>
</jar>
</target>

34
reproducible.patch Normal file
View File

@ -0,0 +1,34 @@
https://github.com/apache/xmlgraphics-fop/pull/65
partial fix for
https://issues.apache.org/jira/browse/FOP-2854
https://github.com/openSUSE/daps/issues/482
commit 0d3f0f9a473aad6f315fd60cc6ed1447afb791ef
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date: Wed Dec 23 13:53:56 2020 +0100
FOP-2854: Allow to override CreationDate
Allow to override build date with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
This patch was done while working on reproducible builds for openSUSE.
diff --git a/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java b/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java
index 3af9af606..ff708e371 100644
--- a/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java
+++ b/fop-core/src/main/java/org/apache/fop/pdf/PDFMetadata.java
@@ -134,7 +134,9 @@ public class PDFMetadata extends PDFStream {
//Set creation date if not available, yet
if (info.getCreationDate() == null) {
- Date d = new Date();
+ Date d = System.getenv("SOURCE_DATE_EPOCH") == null ?
+ new Date() :
+ new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")));
info.setCreationDate(d);
}

15
xmlgraphics-fop-cli.patch Normal file
View File

@ -0,0 +1,15 @@
--- fop-2.5/fop-core/src/main/java/org/apache/fop/cli/Main.java
+++ fop-2.5/fop-core/src/main/java/org/apache/fop/cli/Main.java
@@ -210,11 +210,7 @@
* @param args the command line parameters
*/
public static void main(String[] args) {
- if (checkDependencies()) {
- startFOP(args);
- } else {
- startFOPWithDynamicClasspath(args);
- }
+ startFOP(args);
}
}

View File

@ -0,0 +1,44 @@
#!/bin/bash
# Set default JAVA_HOME
export JAVA_HOME="${JAVA_HOME:-%{?java_home}}"
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
. /usr/share/java-utils/java-functions
else
echo "Can't find functions library, aborting"
exit 1
fi
# Load system-wide configuration
if [ -f /etc/fop.conf ]; then
. /etc/fop.conf
fi
fopxconf=/etc/fop.xconf
fop_exec_args=
if [ -f "$fopxconf" ] ; then
config_found=0
for i in "$@"; do if [ "$i" = "-c" ]; then config_found=1; break; fi; done
if [ $config_found = 0 ]; then
fop_exec_args="-c $fopxconf $fop_exec_args"
fi
fi
# Load user configuration
if [ -f "$HOME/.foprc" ]; then
. "$HOME/.foprc"
fi
# Rest of the configuration
MAIN_CLASS=org.apache.fop.tools.fontlist.FontListMain
BASE_JARS="xmlgraphics-fop xmlgraphics-commons batik-all xerces-j2 xalan-j2 xalan-j2-serializer commons-logging commons-io"
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS $FOP_OPTS
# Let's start
run $fop_exec_args "$@"

View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd"
[
<!ENTITY product "xmlgraphics-fop-fontlist">
]>
<refentry id="fop-fontmetrics">
<refentryinfo>
<productname>&product;</productname>
<authorgroup>
<corpcredit>Apache Foundation</corpcredit>
<author>
<firstname>Thomas</firstname>
<surname>Schraitle</surname>
<contrib>Manpage</contrib>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>&product;</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="version">1.1</refmiscinfo>
<!--<refmiscinfo class="source"></refmiscinfo>-->
<refmiscinfo class="manual"
>http://xmlgraphics.apache.org/fop/1.0/fonts.html#advanced</refmiscinfo>
</refmeta>
<refnamediv>
<refname>&product;</refname>
<refpurpose></refpurpose>
</refnamediv>
<refsynopsisdiv id="fontmetrics.synopsis">
<title>Synopsis</title>
<para>Classname: <classname>org.apache.fop.tools.fontlist.FontListMain</classname></para>
<cmdsynopsis><command>&product;</command>
<arg choice="opt">-c <replaceable>CONFIG_FILE</replaceable></arg>
<arg choice="opt">-f <replaceable>MIME</replaceable></arg>
<arg choice="opt">
<group choice="opt">
<arg choice="plain">output-dir</arg>
<arg choice="plain">output-file</arg>
</group>
<arg choice="opt">font-family</arg>
</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection id="fontmetrics.options">
<title>Options</title>
<para>The following options in alphabetical order are
available:</para>
<variablelist>
<varlistentry>
<term><option>-c <replaceable>CONFIG_FILE</replaceable></option></term>
<listitem>
<para>an optional FOP configuration file</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-f <replaceable>MIME</replaceable></option></term>
<listitem>
<para>MIME type of the output format for which to create the
font list (defaults to application/pdf) </para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>output-dir</option></term>
<listitem>
<para>creates one sample PDF per font-family</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>output-file</option></term>
<listitem>
<para>writes the list as file (valid file extensions:
<filename class="extension">xml</filename>,
<filename class="extension">fo</filename>, and
<filename class="extension">pdf</filename>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>font-family</option></term>
<listitem>
<para>filters to a single font family</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection id="">
<title>Examples</title>
<itemizedlist>
<listitem>
<para>prints all detected fonts to the console:</para>
<screen>&product;</screen>
</listitem>
<listitem>
<para>same as before, but outputs it into a PDF file:</para>
<screen>&product; system-fonts.pdf</screen>
</listitem>
<listitem>
<para>Generates a single PDF containing a sample of all
configured fonts:</para>
<screen>&product; -c userconfig.xml all-fonts.pdf</screen>
</listitem>
</itemizedlist>
</refsection>
</refentry>

View File

@ -0,0 +1,56 @@
#!/bin/bash
# Set default JAVA_HOME
export JAVA_HOME="${JAVA_HOME:-%{?java_home}}"
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
. /usr/share/java-utils/java-functions
else
echo "Can't find functions library, aborting"
exit 1
fi
# Load system-wide configuration
if [ -f /etc/fop.conf ]; then
. /etc/fop.conf
fi
# Load user configuration
if [ -f "$HOME/.foprc" ]; then
. "$HOME/.foprc"
fi
fopxconf=/etc/fop.xconf
fop_exec_args=
if [ -f "$fopxconf" ] ; then
config_found=0
for i in "$@"; do if [ "$i" = "-c" ]; then config_found=1; break; fi; done
if [ $config_found = 0 ]; then
fop_exec_args="-c $fopxconf $fop_exec_args"
fi
fi
# Rest of the configuration
MAIN_CLASS_PFM=org.apache.fop.fonts.apps.PFMReader
MAIN_CLASS_TTF=org.apache.fop.fonts.apps.TTFReader
if [ "$1" = '-t' ]; then
MAIN_CLASS=${MAIN_CLASS_TTF}
shift
elif [ "$1" = "-p" ]; then
MAIN_CLASS=${MAIN_CLASS_PFM}
shift
else
MAIN_CLASS=${MAIN_CLASS_TTF}
fi
BASE_JARS="xmlgraphics-fop xmlgraphics-commons commons-io commons-logging xml-commons-apis xerces-j2 xalan-j2 xalan-j2-serializer"
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS $FOP_OPTS
# Let's start
run $fop_exec_args "$@"

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd"
[
<!ENTITY product "xmlgraphics-fop-fontmetrics">
]>
<refentry id="fop-fontmetrics">
<refentryinfo>
<productname>&product;</productname>
<authorgroup>
<corpcredit>Apache Foundation</corpcredit>
<author>
<firstname>Thomas</firstname>
<surname>Schraitle</surname>
<contrib>Manpage</contrib>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>&product;</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="version">1.1</refmiscinfo>
<!--<refmiscinfo class="source"></refmiscinfo>-->
<refmiscinfo class="manual"
>http://xmlgraphics.apache.org/fop/1.0/fonts.html#advanced</refmiscinfo>
</refmeta>
<refnamediv>
<refname>&product;</refname>
<refpurpose>Reads TTF files and Generates Appropriate Font Metrics</refpurpose>
</refnamediv>
<refsynopsisdiv id="fontmetrics.synopsis">
<title>Synopsis</title>
<para>Classnames:
<classname>org.apache.fop.fonts.apps.PFMReader</classname> and
<classname>org.apache.fop.fonts.apps.TTFReader</classname></para>
<cmdsynopsis><command>&product;</command>
<group choice="opt">
<arg choice="plain">-t</arg>
<arg choice="plain">-p</arg>
</group>
<group choice="opt">options</group>
<arg>fontfile.ttf</arg>
<arg>xmlfile.xml</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection id="fontmetrics.options">
<title>Options</title>
<para>The first argument has to be <option>-t</option> or
<option>-p</option>. The option <option>-t</option> (default)
activates the TrueTypeReader, option <option>-p</option> activates
the PostSriptReader.</para>
<para>The following options in alphabetical order are
available:</para>
<variablelist>
<varlistentry>
<term><option>-d</option></term>
<listitem>
<para>debug mode</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-enc ansi</option></term>
<listitem>
<para>With this option you create a WinAnsi encoded font. The
default is to create a CID keyed font. If you're not going
to use characters outside the pdfencoding range (almost the
same as iso-8889-1) you can add this option.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-fn <replaceable>FONTNAME</replaceable></option></term>
<listitem>
<para>default is to use the fontname in the <filename
class="extension">.ttf</filename> file, but you can
override that name to make sure that the embedded font is
used (if you're embedding fonts) instead of installed fonts
when viewing documents with Acrobat Reader.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-ttcname <replaceable>FONTNAME</replaceable></option></term>
<listitem>
<para>If you're reading data from a TrueType Collection
(<filename class="extension">.ttc</filename> file) you
must specify which font from the collection you will read
metrics from. If you read from a <filename class="extension"
>.ttc</filename> file without this option, the fontnames
will be listed for you.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-q</option></term>
<listitem>
<para>quiet mode</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
</refentry>

551
xmlgraphics-fop.changes Normal file
View File

@ -0,0 +1,551 @@
-------------------------------------------------------------------
Thu Oct 3 10:53:25 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Adapt the scripts to the new javapackages-tools version
-------------------------------------------------------------------
Tue Feb 20 13:22:12 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Use %patch -P N instead of deprecated %patchN.
-------------------------------------------------------------------
Thu Jan 26 08:27:09 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- version 2.8
* Changes:
+ FOP-2839: Links to pdf files with no scheme should open in pdf
viewer
+ FOP-2860: Add light weight line breaking option
+ FOP-2861: Allow resource loading from jar
+ FOP-2865: Stroke-opacity is not honored on svg:text while
conveting svg to pdf
+ FOP-2897: Skip OOM during font OS scanning
+ FOP-2910: Remove cidset for PDF/A-2
+ FOP-2969: Reorder glyphs with no width
+ FOP-2977: Array index out of bounds with glyph position
adjustments and surrogate pairs
+ FOP-3015: Set text color for simulate-style
+ FOP-3023: Simulated bold error in Adobe Reader
+ FOP-3048: Resolve links across IF files
+ FOP-3049: Align AFP SVG text in the middle
+ FOP-3051: Upgrade to Commons IO 2.11
+ FOP-3053: Remove Xerces
+ FOP-3055: Use a event for a draw image error
+ FOP-3057: Allow fallback to non svg glyphs
+ FOP-3061: AFP invoke-medium-map missing when using
page-group=false
+ FOP-3062: AssertionError with SFArabic.ttf
+ FOP-3067: README file still refers to bugzilla
+ FOP-3068: NPE when reading a invalid TTC file
+ FOP-3070: Batik is setting load-external-dtd to false so this
example doesnt work
+ FOP-3071: Write mediummap before pagegroup
+ FOP-3072: Empty link url gives NPE
+ FOP-3074: Reorder glyphs based on gpa value
+ FOP-3077: Use all rulesets for glyph substitution
+ FOP-3078: Fix position of macron glyph
+ FOP-3080: Allow removing empty table elements from structure
tree
+ FOP-3081: Fix change ipd for linefeed-treatment=preserve
+ FOP-3082: NPE when using a link in a span with accessibility
+ FOP-3085: Remove Xalan
+ FOP-3091: Add transparency color support
+ FOP-3092: PDF/UA NPE when using external pdf
+ FOP-3093: Stop reading ttf if we hit last offset
+ FOP-3094: Allow bookmarks before declarations
+ FOP-3101: Don't break with hangul syllables
+ FOP-3102: Move composite glyphs to the end
+ FOP-3103: NPE when using a footnote on redo of layout
+ FOP-3105: Infinite loop when using page break with changing
ipd
+ XGC-130: Allow subproperties in XMP
+ XGC-132: Fallback to raw png if ImageIO cannot read image
- Removed patch:
* update-2.7.patch
-------------------------------------------------------------------
Fri Jan 28 12:52:15 UTC 2022 - Quang Tran <quang.tran@suse.com>
- version 2.7
* Changes:
+ FOP-2928: PDFDocumentGraphics2D does not clear content on
nextPage()
+ FOP-2943: NPE when inline character is a white space
+ FOP-2973: Cannot use custom schemes starting with "data" in
resource resolver
+ FOP-2997: Double byte glyphs not working in SVG font
+ FOP-2999: Rollback after checking next page
+ FOP-3000: Absolute positioning wrong with AFP TTF
+ FOP-3002: Optimise memory usage for data uri
+ FOP-3006: XMP Metadata in created PDF/A-2 documents is not
valid
+ FOP-3008: Table with linefeed-treatment may give
ClassCastException
+ FOP-3014: ConcurrentModificationException for table cell
+ FOP-3016: Reorder thai marks for zero width
+ FOP-3017: Add option to disable positioning per char
+ FOP-3018: Allow to disable AFP page group
+ FOP-3019: Merge useragent encryption params with fop.xconf
+ FOP-3021: Improve validation of border property
+ FOP-3024: Make sure even number of bytes are output per trn
for AFP TTF
+ FOP-3025: Keep table size on changing ipd which has graphics
+ FOP-3026: Fix NPE with empty table header
+ FOP-3027: Sections of text sometimes lost with span=all
multiple columns
+ FOP-3028: Set values in fopFactoryBuilder setConfiguration
+ FOP-3030: AFP page overlay was written twice
+ FOP-3031: Add MCF before MDR in AFP
+ FOP-3032: Allow to embed native PDF in AFP
+ FOP-3033: Update PDFBox to 2.0.21
+ FOP-3034: Update PDFBox to 2.0.24
+ FOP-3038: Allow sections which need security permissions to
be run when AllPermission denied in caller code
+ FOP-3039: AFP include-page-overlay missing X and Y via IF
+ FOP-3046: Don't use page position only on redo of layout
+ XGC-128: Remove image transparency for PS
* Allow to embed native PDF in AFP
- Added patch:
* update-2.7.patch
-------------------------------------------------------------------
Sun Jan 24 18:01:22 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- version 2.6
* Changes:
+ FOP-1648: Fix pdf internal named destinations
+ FOP-2536: Allow overpaint of PDF border
+ FOP-2889: Make JAI optional
+ FOP-2919: NPE printing
+ FOP-2935: Make servlet a compile only dependency
+ FOP-2939: Upgrade ant to 1.9.15
+ FOP-2941: SVG container with stroke=black has an unexpected
border
+ FOP-2945: Don't use change ipd on columns where it won't fit
+ FOP-2950: Display font error at top level exception
+ FOP-2957: Don't change ipd on lastpage if column count changes
+ FOP-2958: Error when using both AFP truetype and base14 font
+ FOP-2960: Soft-Hyphen on Hyphenated words
+ FOP-2975: Put composite glyphs to separate font
+ FOP-2978: Include composite glyphs in otf subset
+ FOP-2979: Update PDFBox to 2.0.19
+ FOP-2980: Reduce filesize for AFP Graphics2D
+ FOP-2981: Convert CFF CID to Type1
+ FOP-2989: Missing text in AFP output when using high
resolution
+ FOP-2990: Changing ipd doesn't handle table narrowing
+ FOP-2992: List broken too early without change ipd
+ FOP-2994: Support OTF/TTF SVG fonts
+ XGC-123: Decode image at page load rather than document load
* Support OTF/TTF SVG fonts
* Allow overpaint of PDF border
-------------------------------------------------------------------
Sat Jan 23 18:39:32 UTC 2021 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch to override build date (boo#1047218)
-------------------------------------------------------------------
Thu Jun 4 05:13:44 UTC 2020 - Fridrich Strba <fstrba@suse.com>
- version 2.5
* Changes:
+ FOP-1606: Incorrect border when using number-columns-spanned
in RTF
+ FOP-2704: Don't fail on coverage set class table not
supported
+ FOP-2889: Make JAI optional
+ FOP-2892: Font substitutions not working
+ FOP-2894: Fit table contents onto current page
+ FOP-2895: Add missing classes to allinone jar
+ FOP-2898: Only use zero glue for change ipd
+ FOP-2901: NoSuchElementException on empty table footer
+ FOP-2902: Ignore TTF reserved index range
+ FOP-2907: Missing bounding box on repeated image for PDF/UA
+ FOP-2908: Repeated image in header not shown in structure tree
+ FOP-2909: Hide empty blocks from structure tree
+ FOP-2911: Add endpage event for FO to IF
+ FOP-2923: Allow to suppress fo:leader within empty paragaphs
from structure tree
+ FOP-2924: Images not scaled or rotated in PCL
+ FOP-2925: Change in IPD on empty block NPE
+ FOP-2926: Add artifact type to PDF header/footer
+ FOP-2934: Absolute element should not be removed
* Allow to hide empty blocks from structure tre
* Does not need avalon-framework to build or run
* Adapt the command-line scripts by removing avalon-framework
from classpath
* Build against fontbox from apache-pdfbox >= 2
* Use the included pom file instead of downloading the same
file from maven central
- Removed patch:
* fop-2.1-batik-xmlconstants.patch
+ Included directly in this version. Requires batik >= 1.11
- Modified patches:
* fop-2.1-QDox-2.0.patch -> fop-2.5-QDox-2.0.patch
* fix-javadoc-java8.patch
* hyphenation-more-stack.patch
* java8-compatibility.patch
* reproducible-build-manifest.patch
* xmlgraphics-fop-cli.patch
+ Port to fop 2.5
-------------------------------------------------------------------
Mon May 18 14:41:12 UTC 2020 - Fridrich Strba <fstrba@suse.com>
- Do not install the OFFO hyphenation files to datadir, but package
instead the xmlgraphics-fop-hyph.jar and
xmlgraphics-fop-sandbox.jar that we build anyway. This fixes
boo#1145693
- Clean up the build a bit
-------------------------------------------------------------------
Fri Apr 3 10:50:59 UTC 2020 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* fop-2.1-batik-xmlconstants.patch
+ apply when building with batik >= 1.11
+ batik 1.11 moved XMLConstants class from
org.apache.batik.util to org.apache.batik.constants
-------------------------------------------------------------------
Wed Aug 14 23:18:43 UTC 2019 - Frank H. Ellenberger <frank.h.ellenberger@gmail.com>
- Add fontbox to classpath: (rh#1413340)
-------------------------------------------------------------------
Mon Apr 15 13:59:26 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Build against glassfish-servlet-api
-------------------------------------------------------------------
Mon Jan 21 16:37:54 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Fix build with new avalon-framework and batik
- Install maven pom file
-------------------------------------------------------------------
Fri Jan 4 16:20:13 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* fop-2.1-QDox-2.0.patch
+ Build against QDox >= 2
-------------------------------------------------------------------
Thu Dec 6 21:54:53 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Bring back the java-devel/java requirements to >= 1.8; we will
fix the ByteBuffer/CharBuffer compatibilities as they arise.
- Modified patch:
* java8-compatibility.patch
+ Fix fix ByteBuffer/CharBuffer incompatibilities with java8
Cast all the java.nio.ByteBuffer and java.nio.CharBuffer
instances to java.nio.Buffer before calling the clear(),
flip(), limit(int), mark(), reset() and rewind() methods.
-------------------------------------------------------------------
Thu Nov 15 11:45:21 UTC 2018 - thomas.schraitle@suse.com
- version 2.1
Change requirement from java-devel-openjdk >= 1.8.0 to
java-devel-openjdk >= 9 to avoid tracebacks because of compatibility
issues with java.nio.Buffer, for example:
java.lang.NoSuchMethodError:
java.nio.CharBuffer.rewind()Ljava/nio/CharBuffer;
-------------------------------------------------------------------
Wed Nov 7 20:48:57 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Do not depend on a particular xml-commons-apis provider.
-------------------------------------------------------------------
Mon Oct 29 06:31:21 UTC 2018 - antoine.belvire@opensuse.org
- Add reproducible-build-manifest.patch: Remove custom "Build-Id"
from manifests. It contains date and other information making the
build unreproducible (boo#1110024).
-------------------------------------------------------------------
Tue Aug 28 13:51:49 UTC 2018 - tchvatal@suse.com
- Fix building with ant >= 1.9.12
-------------------------------------------------------------------
Thu Apr 5 10:13:02 UTC 2018 - fstrba@suse.com
- Added patch:
* java8-compatibility.patch
+ Fix compatibility with java8 and lower when built with java9
or higher
-------------------------------------------------------------------
Fri Sep 29 06:57:25 UTC 2017 - fstrba@suse.com
- Don't condition the maven defines on release version, but on
_maven_repository being defined
-------------------------------------------------------------------
Tue Sep 19 07:23:59 UTC 2017 - fstrba@suse.com
- Fix build with jdk9: specify java source and target 1.6 and fix
javadoc build
-------------------------------------------------------------------
Fri May 19 09:16:13 UTC 2017 - vsistek@suse.com
- Add BuildRequires: javapackages-local (for maven conversions)
-------------------------------------------------------------------
Mon Mar 6 11:47:06 UTC 2017 - sknorr@suse.com
- Make sure to apply new file list for Tumbleweed only
(FATE#322405)
-------------------------------------------------------------------
Thu Mar 2 08:45:45 UTC 2017 - fvogt@suse.com
- Add patch to fix build with stricter javadoc in version 8:
* fix-javadoc-java8.patch (boo#1027467)
- Fix file list on SLE
-------------------------------------------------------------------
Tue Mar 8 08:52:41 UTC 2016 - fvogt@suse.com
- Fix manpage for xmlgraphics-fop-fontmetrics
-------------------------------------------------------------------
Thu Mar 3 12:05:58 UTC 2016 - fvogt@suse.com
- Update to fop 2.1
- https://xmlgraphics.apache.org/fop/changes.html#version_2.1
- Remove upstreamed fop-commons-2.0.patch
and xmlgraphics-fop-xconf.patch
- Add hyphenation-more-stack.patch to fix build with offo 2.2
-------------------------------------------------------------------
Wed Mar 18 09:46:25 UTC 2015 - tchvatal@suse.com
- Fix build with new javapackages-tools
-------------------------------------------------------------------
Mon Dec 8 12:57:49 UTC 2014 - tchvatal@suse.com
- Spec-cleanify
- Do not ever run tests, we lack quite packages to do so anyway
- Drop fop-1.1-src.tar.gz.asc xmlgraphics-fop.keyring as upstream
does not provide those anymore
- Apply patch to build with new xmlgraphics-commons:
* fop-commons-2.0.patch
-------------------------------------------------------------------
Tue Jul 8 10:30:59 UTC 2014 - tchvatal@suse.com
- Do not depend on ant-trax
-------------------------------------------------------------------
Thu Sep 12 21:16:29 UTC 2013 - tchvatal@suse.com
- Drop javadoc package so we build this package
-------------------------------------------------------------------
Mon Sep 9 11:06:30 UTC 2013 - tchvatal@suse.com
- Move from jpackage-utils to javapackage-tools
-------------------------------------------------------------------
Fri Sep 6 08:09:43 UTC 2013 - mvyskocil@suse.com
- use new add_maven_depmap
- add missing commons packages to BuildRequires
- add gpg verification
-------------------------------------------------------------------
Thu Apr 25 12:10:30 UTC 2013 - mvyskocil@suse.com
- fix a typo in a xmlgraphics-fop.script (bnc#817145)
-------------------------------------------------------------------
Mon Jan 28 14:45:12 UTC 2013 - mvyskocil@suse.com
- (build) require xml-commons-apis, the org.w3c.svg are used inside fop
part of a fix for bnc#800694
-------------------------------------------------------------------
Thu Jan 10 11:26:27 UTC 2013 - mvyskocil@suse.com
- drop excalibur usage from all classpaths, use avalon-framework instead
-------------------------------------------------------------------
Mon Dec 17 10:21:55 UTC 2012 - mvyskocil@suse.com
- drop excalibur-avalon from dependencies, fop now uses avalon-framework
-------------------------------------------------------------------
Sun Dec 9 08:29:33 UTC 2012 - slavb18@gmail.com
- patched fop.xconf
* added <auto-detect/> to pdf renderer section, so now possible to use system fonts like font-family="DejaVuSansMono"
- fix the spec file to install a (default) fop.xconf file in /etc
- patched scripts to use /etc/fop.xconf
-------------------------------------------------------------------
Tue Nov 20 12:53:08 UTC 2012 - mvyskocil@suse.com
- add fo-formatter to provides upon a request of doc team
-------------------------------------------------------------------
Wed Nov 14 13:23:34 UTC 2012 - slavb18@gmail.com
- fixed "Class not found" errors in fop scripts
-------------------------------------------------------------------
Thu Oct 25 07:44:09 UTC 2012 - mvyskocil@suse.com
- add commons-logging and commons-io to Requires and fop script
- removed uneeded xalan-j2, xmlcommons and xerces from dependencies
-------------------------------------------------------------------
Wed Oct 24 14:04:38 UTC 2012 - mvyskocil@suse.com
- update to 1.1
* many bug fixes and a number of improvements
* support for Complex Scripts (e.g., Arabic, Hebrew, Indic, and Southeast
* Asian scripts)
* http://xmlgraphics.apache.org/fop/1.1/releaseNotes_1.1.html
* This release implements a substantial subset of the W3C
* XSL-FO 1.1 Recommendation. For a detailed overview of FOP's compliance with
* this recommendation, see Compliance.
* http://xmlgraphics.apache.org/fop/compliance.html
- obsoleted xmlgraphics-fop-asf51789.patch
- obsoleted xmlgraphics-fop-build.patch
-------------------------------------------------------------------
Fri Sep 9 16:20:40 UTC 2011 - giecrilj@stegny.2a.pl
- restored gzipped archive to avoid HTTP 404
- disabled tests (they take ages to build and they fail anyway, so do we really need them)?
- added standard hyphenation from OFFO
- told ant to use UTF-8
- fix for asf#51789
-------------------------------------------------------------------
Fri May 13 08:25:38 UTC 2011 - toms@suse.de
- Recompressed gzip archive to bz2 to avoid warning
- Fixed non-conffile-in-etc warning for %{_mavendepmapfragdir}
- Added new xmlgraphics-fontmetrics and xmlgraphics-fontlist scripts
to help for better FOP configuration
- Added manpage and HTML for all scripts (xmlgraphics-fop,
xmlgraphics-fop-fontmetrics, and xmlgraphics-fop-fontlist)
- Created links without prefix xmlgraphics-fop for
xmlgraphics-fop-fontmetrics and xmlgraphics-fop-fontlist
- Created links for all manpages without prefix xmlgraphics-fop
-------------------------------------------------------------------
Wed May 11 14:43:06 UTC 2011 - toms@suse.de
- Added two new scripts for creating font metrics and font lists
-------------------------------------------------------------------
Mon May 2 06:37:50 UTC 2011 - toms@suse.de
- Fixed xmlgraphic-fop script:
* Added excalibur/avalon-framework-impl in BASE_JAR variable to
avoid exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/avalon/framework/configuration/DefaultConfigurationBuilder
Caused by: java.lang.ClassNotFoundException:
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder
* Replaced xmlgraphics-batik/util in BASE_JAR variable to
avoid ClassNotFoundException: org.apache.batik.bridge.UserAgent
-------------------------------------------------------------------
Tue Nov 16 15:11:29 UTC 2010 - mvyskocil@suse.cz
- correct fop Provides: Obsolete:
-------------------------------------------------------------------
Wed Nov 3 13:11:50 UTC 2010 - mvyskocil@suse.cz
- fix bnc#650138 - fop update wanted
* fix memory leak in property cache
* change FONode.addCharacters() parameter to closer match the signature of the standard SAX characters() event
* new event handling framework
* support for font substitution
* support for addressing all glyphs available in a Type 1 font,
not just the ones in the font's primary encoding.
* limited support for pages of different inline-progression-dimensions within a page-sequence.
* minimal support for integer keep values on the various keep properties on block-level FOs.
* new AFPGraphics2D implementation which provides the ability to use Batik to
drive the production of AFP Graphics (GOCA) output from SVG.
* new Resource group leveling, external streaming, and de-duplication of images and
graphics using IncludeObject and ResourceGroup.
* new Native image embedding support (e.g. JPEG, GIF, TIFF) using ObjectContainer
and a MOD:CA Registry implementation.
- merge with xmlgraphics-fop-0.95-6.jpp5.src.rpm
-------------------------------------------------------------------
Thu Feb 26 13:52:34 CET 2009 - mvyskocil@suse.cz
- fixed bnc#467866 - fop fails if JAVACMD_OPTS is set
-------------------------------------------------------------------
Wed Aug 6 15:23:11 CEST 2008 - skh@suse.de
- update to version 0.95, list of changes at:
http://xmlgraphics.apache.org/fop/0.95/changes_0.95.html
- fop requires java 1.4 now
- use unversioned Requires: jre
-------------------------------------------------------------------
Fri Jun 27 10:48:43 CEST 2008 - coolo@suse.de
- avoid build cycle between fop and saxon
-------------------------------------------------------------------
Wed Jan 30 17:42:06 CET 2008 - skh@suse.de
- update to version 0.94, major changes:
* Add support for font auto-detection (JM) Thanks to Adrian Cumiskey
* Add support for the border-collapsing model in tables (VH, JM)
* Add support for named destinations in PDF (JB)
* Add support for UAX#14 type line breaking (MM)
full list of changes at:
http://xmlgraphics.apache.org/fop/0.94/changes_0.94.html
-------------------------------------------------------------------
Tue Jul 10 12:23:48 CEST 2007 - skh@suse.de
- update to version 0.93
- build with gcj
-------------------------------------------------------------------
Sun May 6 22:50:12 CEST 2007 - ro@suse.de
- added unzip to buildrequires
-------------------------------------------------------------------
Wed Jan 25 21:46:22 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Fri Sep 17 19:53:40 CEST 2004 - skh@suse.de
- do no longer use setJava
-------------------------------------------------------------------
Wed Apr 28 13:59:08 CEST 2004 - ke@suse.de
- Provide wrapper scripts for fop.sh and xalan.sh to make it find the
java environment; reported by Thomas Schraitle; fix provided by Petr
Mladek [#39581].
-------------------------------------------------------------------
Mon Oct 27 13:56:38 CET 2003 - ke@suse.de
- New package: version 0.20.5.

48
xmlgraphics-fop.script Normal file
View File

@ -0,0 +1,48 @@
#!/bin/sh
#
# FOP 0.94 script
# JPackage Project <http://www.jpackage.org/>
# $Id$
# Set default JAVA_HOME
export JAVA_HOME="${JAVA_HOME:-%{?java_home}}"
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
. /usr/share/java-utils/java-functions
else
echo "Can't find functions library, aborting"
exit 1
fi
# Load system-wide configuration
if [ -f /etc/fop.conf ]; then
. /etc/fop.conf
fi
fopxconf=/etc/fop.xconf
fop_exec_args=
if [ -f "$fopxconf" ] ; then
config_found=0
for i in "$@"; do if [ "$i" = "-c" ]; then config_found=1; break; fi; done
if [ $config_found = 0 ]; then
fop_exec_args="-c $fopxconf $fop_exec_args"
fi
fi
# Load user configuration
if [ -f "$HOME/.foprc" ]; then
. "$HOME/.foprc"
fi
# Rest of the configuration
MAIN_CLASS=org.apache.fop.cli.Main
BASE_JARS="xmlgraphics-fop xmlgraphics-fop-hyph xmlgraphics-commons commons-logging commons-io batik-all fontbox xml-commons-apis xml-commons-apis-ext"
# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS $FOP_OPTS
# Let's start
run $fop_exec_args "$@"

194
xmlgraphics-fop.spec Normal file
View File

@ -0,0 +1,194 @@
#
# spec file for package xmlgraphics-fop
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2000-2008, JPackage Project
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define bname fop
Name: xmlgraphics-fop
Version: 2.8
Release: 0
Summary: Formatter for Printing XSLT Processed XML Files
License: Apache-2.0
Group: Productivity/Publishing/XML
URL: https://xmlgraphics.apache.org/fop/
Source0: https://archive.apache.org/dist/xmlgraphics/fop/source/fop-%{version}-src.tar.gz
Source1: https://download.sourceforge.net/project/offo/offo-hyphenation/2.2/offo-hyphenation.zip
#FIX-OPENSUSE: add xmlgraphics-commons to classpath
Source2: %{name}.script
Source3: %{name}-fontmetrics.script
Source4: %{name}-fontlist.script
# Manpage(s)
Source10: %{name}.xml
Source11: %{name}-fontmetrics.xml
Source12: %{name}-fontlist.xml
Patch1: xmlgraphics-fop-cli.patch
Patch2: hyphenation-more-stack.patch
Patch3: fix-javadoc-java8.patch
Patch4: java8-compatibility.patch
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- boo#1110024
Patch5: reproducible-build-manifest.patch
Patch6: fop-2.5-QDox-2.0.patch
Patch7: reproducible.patch
BuildRequires: ant >= 1.9.15
BuildRequires: apache-pdfbox >= 2.0.23
BuildRequires: commons-io >= 2.4
BuildRequires: commons-logging
BuildRequires: docbook-xsl-stylesheets
BuildRequires: glassfish-servlet-api
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: libxslt
BuildRequires: qdox >= 2.0
BuildRequires: unzip
BuildRequires: xml-commons-apis
BuildRequires: xmlgraphics-batik >= 1.14
BuildRequires: xmlgraphics-commons >= 2.6
#!BuildIgnore: saxon
Requires: java >= 1.8
Requires: xml-commons-apis
Provides: %{bname} = %{version}-%{release}
Obsoletes: %{bname} < %{version}-%{release}
Provides: fo-formatter = %{version}-%{release}
BuildArch: noarch
%description
FOP (Formatting Objects Processor) is driven by XSL formatting objects
(XSL-FO). It is a Java application that reads a formatting object (FO)
tree and renders the resulting pages to one of the following output
formats: PDF (primary output target), PCL, PS, SVG, XML (area tree
representation), Print, AWT, MIF, and TXT.
%prep
%setup -q -n %{bname}-%{version} -a1
ln -t fop/hyph offo-hyphenation/hyph/*.xml
find -name "*.jar" | xargs -t rm
%patch -P 1 -p1 -b .cli
%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 5 -p1
%patch -P 6 -p1
%patch -P 7 -p1
# Replace keyword "VERSION" in XML files with the real one:
for x in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do
sed -i "s=@VERSION@=%{version}=" $x
done
# When building with ant, the fop.jar is an all-in jar,
# so adapt the dependencies accordingly
# Remove dependencies on fop modules included in the jar
%pom_remove_dep :fop-events fop
%pom_remove_dep :fop-util fop
%pom_remove_dep :fop-core fop
# Add dependencies of fop modules included in the jar
%pom_add_dep com.thoughtworks.qdox:qdox:2 fop
%pom_add_dep commons-io:commons-io:1.3.1 fop
%pom_add_dep commons-logging:commons-logging:1.0.4 fop
%pom_add_dep javax.servlet:servlet-api:2.2 fop
%pom_add_dep org.apache.pdfbox:fontbox:2.0 fop
%pom_add_dep org.apache.xmlgraphics:batik-anim:1.14 fop
%pom_add_dep org.apache.xmlgraphics:batik-awt-util:1.14 fop
%pom_add_dep org.apache.xmlgraphics:batik-bridge:1.14 fop
%pom_add_dep org.apache.xmlgraphics:batik-extension:1.14 fop
%pom_add_dep org.apache.xmlgraphics:batik-gvt:1.14 fop
%pom_add_dep org.apache.xmlgraphics:batik-transcoder:1.14 fop
%pom_add_dep org.apache.xmlgraphics:xmlgraphics-commons:2.6 fop
%build
build-jar-repository -s fop/lib \
commons-io \
commons-logging \
fontbox \
glassfish-servlet-api \
batik-all \
xml-commons-apis \
xml-commons-apis-ext \
xmlgraphics-commons \
qdox
export CLASSPATH= LANG=en_US.UTF-8
%{ant} -f fop/build.xml \
-Djavac.source=1.8 -Djavac.target=1.8 \
package
# Build the manpage(s) and HTML
DB=%{_datadir}/xml/docbook/stylesheet/nwalsh/current
for m in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do
xsltproc $DB/manpages/docbook.xsl $m
# Only filename for HTML is needed, remove anything before /
xml=${m##*/}
xsltproc --output ${xml%%.xml}.html $DB/html/docbook.xsl $m
done
%install
# jars
mkdir -p %{buildroot}%{_javadir}
install -m 644 fop/build/%{bname}.jar %{buildroot}%{_javadir}/%{name}.jar
install -m 644 fop/build/%{bname}-hyph.jar %{buildroot}%{_javadir}/%{name}-hyph.jar
install -m 644 fop/build/%{bname}-sandbox.jar %{buildroot}%{_javadir}/%{name}-sandbox.jar
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
%{mvn_install_pom} fop/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap
# script
mkdir -p %{buildroot}%{_bindir}
cp -p %{SOURCE2} %{buildroot}%{_bindir}/%{name}
cp -p %{SOURCE3} %{buildroot}%{_bindir}/%{name}-fontmetrics
cp -p %{SOURCE4} %{buildroot}%{_bindir}/%{name}-fontlist
# compat symlink
ln -s %{name} %{buildroot}%{_bindir}/%{bname}
ln -s %{name}-fontmetrics %{buildroot}%{_bindir}/%{bname}-fontmetrics
ln -s %{name}-fontlist %{buildroot}%{_bindir}/%{bname}-fontlist
# data
install -D -m 644 fop/conf/fop.xconf %{buildroot}%{_sysconfdir}/fop.xconf
# Manpages
mkdir -p %{buildroot}%{_mandir}/man1
for m in *.1; do
gzip $m
done
cp -vi *.1.gz %{buildroot}%{_mandir}/man1
# Remove prefix xmlgraphics to make also the linked manpage version available
pushd %{buildroot}%{_mandir}/man1
for m in *.1.gz; do
ln -s $m ${m#*-}
done
popd
%files -f .mfiles
%{_javadir}/%{name}-hyph.jar
%{_javadir}/%{name}-sandbox.jar
%license LICENSE
%doc NOTICE README fop/known-issues.xml
%doc *.html
%attr(0755,root,root) %{_bindir}/%{name}
%{_bindir}/%{bname}
%attr(0755,root,root) %{_bindir}/%{name}-fontmetrics
%{_bindir}/%{bname}-fontmetrics
%attr(0755,root,root) %{_bindir}/%{name}-fontlist
%{_bindir}/%{bname}-fontlist
%{_mandir}/man1/*
%config(noreplace) %{_sysconfdir}/fop.xconf
%changelog

626
xmlgraphics-fop.xml Normal file
View File

@ -0,0 +1,626 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd"
[
<!ENTITY product "xmlgraphics-fop">
]>
<refentry id="fop">
<refentryinfo>
<productname>&product;</productname>
<authorgroup>
<corpcredit>Apache Foundation</corpcredit>
<author>
<firstname>Thomas</firstname>
<surname>Schraitle</surname>
<contrib>Manpage</contrib>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>&product;</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="version">1.1</refmiscinfo>
<!--<refmiscinfo class="source"></refmiscinfo>-->
<refmiscinfo class="manual"
>http://xmlgraphics.apache.org/fop/1.0/fonts.html#advanced</refmiscinfo>
</refmeta>
<refnamediv>
<refname>&product;</refname>
<refpurpose>Formatter for Printing XSLT Processed XML
Files</refpurpose>
</refnamediv>
<refsynopsisdiv id="fop.synopsis">
<title>Synopsis</title>
<para>Classname: <classname>org.apache.fop.cli.Main</classname></para>
<cmdsynopsis>
<command>&product;</command>
<group choice="opt">
<arg choice="plain">-fo</arg>
<arg choice="plain">-xml</arg>
</group>
<arg choice="plain">infile</arg>
<group choice="opt">
<arg choice="plain">-xsl file</arg>
</group>
<group choice="opt">
<arg choice="plain">-awt</arg>
<arg choice="plain">-pdf</arg>
<arg choice="plain">-mif</arg>
<arg choice="plain">-rtf</arg>
<arg choice="plain">-tiff</arg>
<arg choice="plain">-png</arg>
<arg choice="plain">-pcl</arg>
<arg choice="plain">-ps</arg>
<arg choice="plain">-txt</arg>
<arg choice="plain">-at <arg choice="opt">mime</arg></arg>
<arg choice="plain">-print</arg>
</group>
<arg choice="plain">outfile</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id="fop.options">
<title>Options</title>
<para>The following options in alphabetical order are
available:</para>
<variablelist>
<!-- A -->
<varlistentry>
<term><option>-a</option></term>
<listitem>
<para>enables accessibility features (Tagged PDF etc., default
off)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-afp <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered as AFP</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-at [mime] <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>representation of area tree as XML specify optional mime
output to allow the AT to be converted to final format
later</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-atin
<replaceable>INFILE</replaceable></option></term>
<listitem>
<para>area tree input file </para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-awt</option></term>
<listitem>
<para>input will be displayed on screen </para>
</listitem>
</varlistentry>
<!-- C -->
<varlistentry>
<term><option>-c</option>
<filename>cfg.xml</filename></term>
<listitem>
<para>use additional configuration file
<filename>cfg.xml</filename></para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-catalog</option></term>
<listitem>
<para>use XML catalog resolver for input XML and XSLT
files</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-conserve</option></term>
<listitem>
<para>enable memory-conservation policy (trades
memory-consumption for disk I/O) (Note: currently only
influences whether the area tree is serialized.)</para>
</listitem>
</varlistentry>
<!-- D -->
<varlistentry>
<term><option>-d</option></term>
<listitem>
<para>debug mode</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-dpi
<replaceable>XXX</replaceable></option></term>
<listitem>
<para>target resolution in dots per inch (dpi) where
<replaceable>XXX</replaceable> is a number</para>
</listitem>
</varlistentry>
<!-- F -->
<varlistentry>
<term><option>-fo
<replaceable>INFILE</replaceable></option></term>
<listitem>
<para>XSL-FO input file</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-foout <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>input will only be XSL transformed. The intermediate
XSL-FO file is saved and no rendering is performed. (Only
available if you use <option>-xml</option> and
<option>-xsl</option> parameters)</para>
</listitem>
</varlistentry>
<!-- I -->
<varlistentry>
<term><option>-if [mime] <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>representation of document in intermediate format XML
specify optional mime output to allow the IF to be converted
to final format later</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-ifin
<replaceable>INFILE</replaceable></option></term>
<listitem>
<para>intermediate format input file </para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-imagein
<replaceable>INFILE</replaceable></option></term>
<listitem>
<para>image input file (piping through stdin not
supported)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>infile</option></term>
<listitem>
<para>XSL-FO input file (use <option>-</option> for infile to
pipe input from stdin); same as <option>-fo</option></para>
</listitem>
</varlistentry>
<!-- L -->
<varlistentry>
<term><option>-l <replaceable>LANG</replaceable></option></term>
<listitem>
<para>use the language for user information</para>
</listitem>
</varlistentry>
<!-- M -->
<!-- N -->
<varlistentry>
<term><option>-noannotations</option></term>
<listitem>
<para>encrypt PDF file without edit annotation
permission</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-nocopy</option></term>
<listitem>
<para>encrypt PDF file without copy content permission</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-noedit</option></term>
<listitem>
<para>encrypt PDF file without edit content permission</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-noprint</option></term>
<listitem>
<para>encrypt PDF file without printing permission</para>
</listitem>
</varlistentry>
<!-- O -->
<varlistentry>
<term><option>-o
<replaceable>PASSWORD</replaceable></option></term>
<listitem>
<para>encrypt PDF file with option owner password</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-out mime <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered using the given MIME type.
Example: <option>-out application/pdf D:\out.pdf</option>
(Tip: <option>-out list</option> prints the list of
supported MIME types)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>outfile</option></term>
<listitem>
<para>input will be rendered as PDF into outfile (use
<option>-</option> for outfile to pipe output to
stdout)</para>
</listitem>
</varlistentry>
<!-- P -->
<varlistentry>
<term><option>-param <replaceable>NAME</replaceable>
<replaceable>VALUE</replaceable></option></term>
<listitem>
<para>
<replaceable>NAME</replaceable> to use for parameter
<replaceable>NAME</replaceable> in XSLT stylesheet (repeat
this option for each parameter)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-pcl <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered as PCL</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-pdf
<replaceable>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered as PDF (outfile required)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-pdfa1b
<replaceable>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered as PDF/A-1b compliant PDF
(outfile required, same as <option>-pdf outfile</option>
<option>-pdfprofile PDF/A-1b</option>)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-pdfprofile
<replaceable>PROF</replaceable></option></term>
<listitem>
<para>PDF file will be generated with the specified profile
(Examples for <replaceable>PROF</replaceable>: PDF/A-1b or
PDF/X-3:2003)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-png <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered as PNG</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-print</option></term>
<listitem>
<para>input file will be rendered and sent to the printer
see options with <option>-print help</option></para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-ps <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered as PostScript</para>
</listitem>
</varlistentry>
<!-- Q -->
<varlistentry>
<term><option>-q</option></term>
<listitem>
<para>quiet mode</para>
</listitem>
</varlistentry>
<!-- R -->
<varlistentry>
<term><option>-r</option></term>
<listitem>
<para>relaxed/less strict validation (where available)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-rtf <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered as RTF</para>
</listitem>
</varlistentry>
<!-- S -->
<varlistentry>
<term><option>-s</option></term>
<listitem>
<para>for area tree XML, down to block areas only</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-svg <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered as an SVG slides file.
Experimental feature; requires additional
<filename>fop-sandbox.jar</filename></para>
</listitem>
</varlistentry>
<!-- T -->
<varlistentry>
<term><option>-tiff <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered as TIFF</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-txt <replaceable
>OUTFILE</replaceable></option></term>
<listitem>
<para>input will be rendered as plain text</para>
</listitem>
</varlistentry>
<!-- U -->
<varlistentry>
<term><option>-u
<replaceable>PASSWORD</replaceable></option></term>
<listitem>
<para>encrypt PDF file with option user password</para>
</listitem>
</varlistentry>
<!-- V -->
<varlistentry>
<term><option>-v</option></term>
<listitem>
<para>run in verbose mode (currently simply print FOP version
and continue)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-version</option></term>
<listitem>
<para>print FOP version and exit</para>
</listitem>
</varlistentry>
<!-- X -->
<varlistentry>
<term><option>-x</option></term>
<listitem>
<para>dump configuration settings </para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-xml
<replaceable>INFILE</replaceable></option></term>
<listitem>
<para>XML input file, must be used together with
<option>-xsl</option>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-xsl
<replaceable>STYLESHEET</replaceable></option></term>
<listitem>
<para>XSLT stylesheet </para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="fop.config">
<title>FOP Configuration File</title>
<para>This is a small overview. More details can be found in <ulink
url="http://xmlgraphics.apache.org/fop/trunk/configuration.html#renderers"/>.</para>
<example>
<title>Excerpt FOP Configuration File</title>
<screen><![CDATA[<fop version="1.0">
<!-- Strict user configuration -->
<strict-configuration>true</strict-configuration>
<!-- Strict FO validation -->
<strict-validation>true</strict-validation>
<!-- Base URL for resolving relative URLs -->
<base>./</base>
<!-- Font Base URL for resolving relative font URLs -->
<font-base>./</font-base>
<!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
<source-resolution>72</source-resolution>
<!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution for generated bitmaps, default: 72dpi -->
<target-resolution>72</target-resolution>
<!-- default page-height and page-width, in case
value is specified as auto -->
<default-page-settings height="11in" width="8.26in"/>
<!-- Use file name nl_Bel instead of the default nl_BE -->
<hyphenation-pattern lang="nl" country="BE">nl_Bel</hyphenation-pattern>
<!-- etc. etc..... -->
</fop>]]></screen>
</example>
<table>
<title>Summary of the General Configuration Options</title>
<tgroup cols="4">
<colspec colname="c1"/>
<colspec colname="c2"/>
<colspec colname="c3"/>
<colspec colname="c4"/>
<thead>
<row>
<entry>Element</entry>
<entry>Data Type</entry>
<entry>Description</entry>
<entry>Default Value</entry>
</row>
</thead>
<tbody>
<row>
<entry><sgmltag>base</sgmltag></entry>
<entry>URL or directory</entry>
<entry>Specifies the base URL based on which relative URL will be resolved</entry>
<entry>current directory</entry>
</row>
<row>
<entry><sgmltag>font-base</sgmltag></entry>
<entry>URL or directory</entry>
<entry>Specifies the base URL based on which relative font URLs will be resolved</entry>
<entry>base URL/directory</entry>
</row>
<row>
<entry><sgmltag>hyphenation-base</sgmltag></entry>
<entry>URL or directory</entry>
<entry>Specifies the base URL based on which relative URLs<!--
--> to hyphenation pattern files will be resolved. If not<!--
--> specified, support for user-supplied hyphenation patterns<!--
--> remains disabled</entry>
<entry>disabled</entry>
</row>
<row>
<entry namest="c1" nameend="c4">Relative URIs for the above<!--
--> three properties are evaluated relative to the base URI of<!--
--> the configuration file. If the configuration is provided<!--
--> programmatically, the base URI can be set with<!--
--> <classname>FopFactory.setUserConfigBaseURI</classname>;<!--
--> default is the current working directory.</entry>
</row>
<row>
<entry><sgmltag>hyphenation-pattern</sgmltag></entry>
<entry>String, attribute lang, attribute country (optional)</entry>
<entry>Register a file name for the hyphenation pattern for the mentioned language and country. Language ll and country CC must both consist of two letters.</entry>
<entry>ll_CC</entry>
</row>
<row>
<entry><sgmltag>source-resolution</sgmltag></entry>
<entry>Integer</entry>
<entry>Resolution in dpi (dots per inch) which is used internally to determine the pixel size for SVG images and bitmap images without resolution information. </entry>
<entry>72dpi</entry>
</row>
<row>
<entry><sgmltag>target-resolution</sgmltag></entry>
<entry>Integer</entry>
<entry>Resolution in dpi (dots per inch) used to specify the output resolution for bitmap images generated by bitmap renderers (such as the TIFF renderer) and by bitmaps generated by Apache Batik for filter effects and such.
</entry>
<entry>72dpi</entry>
</row>
<row>
<entry><sgmltag>strict-configuration</sgmltag></entry>
<entry>Boolean</entry>
<entry>Setting this option to 'true' will cause FOP to strictly verify the contents of the FOP configuration file to ensure that defined resources (such as fonts and base URLs/directories) are valid and available to FOP. Any errors found will cause FOP to immediately raise an exception.</entry>
<entry>false</entry>
</row>
<row>
<entry><sgmltag>strict-validation</sgmltag></entry>
<entry>Boolean</entry>
<entry>Setting this option to 'false' causes FOP to be more forgiving about XSL-FO validity, for example, you're allowed to specify a border on a region-body which is supported by some FO implementations but is non-standard. Note that such a border would currently have no effect in Apache FOP.</entry>
<entry>true</entry>
</row>
<row>
<entry><sgmltag>break-indent-inheritance</sgmltag></entry>
<entry>Boolean</entry>
<entry>Setting this option to 'true' causes FOP to use an alternative rule set to determine text indents specified through margins, start-indent and end-indent. Many commercial FO implementations have chosen to break the XSL specification in this aspect. This option tries to mimic their behaviour. Please note that Apache FOP may still not behave exactly like those implementations either because FOP has not fully matched the desired behaviour and because the behaviour among the commercial implementations varies. The default for this option (i.e. false) is to behave exactly like the specification describes.</entry>
<entry>false</entry>
</row>
<row>
<entry><sgmltag>default-page-settings</sgmltag></entry>
<entry>n/a</entry>
<entry>Specifies the default width and height of a page if "auto" is specified for either or both values. Use "height" and "width" attributes on the default-page-settings element to specify the two values.</entry>
<entry>"height" 11 inches, "width" 8.26 inches</entry>
</row>
<row>
<entry><sgmltag>use-cache</sgmltag></entry>
<entry>Boolean</entry>
<entry>All fonts information that has been gathered as a result of "directory" or "auto-detect" font configurations will be cached for future rendering runs. This setting should improve performance on systems where fonts have been configured using the "directory" or "auto-detect" tag mechanisms. By default this option is switched on.</entry>
<entry>true</entry>
</row>
<row>
<entry><sgmltag>cache-file</sgmltag></entry>
<entry>String</entry>
<entry>This option specifies the file/directory path of the fop cache file. This file is currently only used to cache font triplet information for future reference.</entry>
<entry>${base}/conf/fop.cache</entry>
</row>
<row>
<entry><sgmltag>renderers</sgmltag></entry>
<entry>MIME</entry>
<entry>Contains the configuration for each renderer</entry>
<entry>n/a</entry>
</row>
</tbody>
</tgroup>
</table>
</refsect1>
<refsect1 id="fop.files">
<title>Files</title>
<variablelist>
<varlistentry>
<term><filename>/etc/fop.conf</filename></term>
<listitem>
<para>System-wide configuration</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>~/.foprc</filename></term>
<listitem>
<para>User configuration</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>fop.xconf</filename></term>
<listitem>
<para>Example configuration file; can be handed over with
<option>-c</option> option. See <xref linkend="fop.config"/>
for details.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="fop.examples">
<title>Examples</title>
<itemizedlist>
<listitem>
<para>Transforms the <filename>foo.fo</filename> FO file into
PDF:</para>
<screen>fop foo.fo foo.pdf</screen>
</listitem>
<listitem>
<para>Does the same as the previous line:</para>
<screen>fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf</screen>
</listitem>
<listitem>
<para>Transforms and formats <filename>foo.xml</filename> with
the help of the XSLT stylesheet <filename>foo.xsl</filename>
into the PDF file <filename>foo.pdf</filename>:</para>
<screen>fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf</screen>
</listitem>
<listitem>
<para>Only transforms, but don't format:</para>
<screen>fop -xml foo.xml -xsl foo.xsl -foout foo.fo</screen>
</listitem>
<listitem>
<para>Formats <filename>foo.fo</filename> into FRTF:</para>
<screen>fop foo.fo -mif foo.rtf</screen>
</listitem>
<listitem>
<para>Input file is send to the printer:</para>
<screen>fop foo.fo -print</screen>
</listitem>
</itemizedlist>
</refsect1>
</refentry>