Accepting request 84394 from Java:packages

add OFFO hyphenation pattterns, other minor fixes (forwarded request 83010 from yecril71pl)

OBS-URL: https://build.opensuse.org/request/show/84394
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xmlgraphics-fop?expand=0&rev=8
This commit is contained in:
Sascha Peilicke 2011-09-26 08:23:13 +00:00 committed by Git OBS Bridge
commit aefd43006c
10 changed files with 1210 additions and 166 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79d341820583aa5b77ee00dc7da59bfafb92adceb88c7a1922fe300a90a22c4e
size 858046

View File

@ -0,0 +1,43 @@
diff -aur o/src/java/org/apache/fop/accessibility/StructureTreeBuilder.java n/src/java/org/apache/fop/accessibility/StructureTreeBuilder.java
--- o/src/java/org/apache/fop/accessibility/StructureTreeBuilder.java 2010-07-12 21:34:46.000000000 +0200
+++ n/src/java/org/apache/fop/accessibility/StructureTreeBuilder.java 2011-09-08 21:55:30.079000000 +0200
@@ -31,7 +31,7 @@
/**
* Helper class that re-builds a structure tree from what is stored in an
- * intermediate XML file (IF XML or Area Tree XML).
+ * intermediate XML file (IF XML or Area Tree XML).
*/
public final class StructureTreeBuilder {
diff -aur o/src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java n/src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java
--- o/src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java 2010-07-12 21:34:39.000000000 +0200
+++ n/src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java 2011-09-08 22:00:40.773000019 +0200
@@ -107,7 +107,7 @@
* a character rotation other than 0, ascender height loses its
* meaning when the character is lying on its side or is upside down
* with respect to normal viewing orientation. For the general case,
- * Ascender Height is the character<65>s most positive y-axis value.
+ * Ascender Height is the characters most positive y-axis value.
* For bounded character boxes, for a given character having an
* ascender, ascender height and baseline offset are equal.
* @return the ascender value in millipoints
diff -aur o/src/java/org/apache/fop/afp/fonts/FopCharacterSet.java n/src/java/org/apache/fop/afp/fonts/FopCharacterSet.java
--- o/src/java/org/apache/fop/afp/fonts/FopCharacterSet.java 2010-07-12 21:34:39.000000000 +0200
+++ n/src/java/org/apache/fop/afp/fonts/FopCharacterSet.java 2011-09-08 22:02:28.757999999 +0200
@@ -55,7 +55,7 @@
* a character rotation other than 0, ascender height loses its
* meaning when the character is lying on its side or is upside down
* with respect to normal viewing orientation. For the general case,
- * Ascender Height is the character<65>s most positive y-axis value.
+ * Ascender Height is the characters most positive y-axis value.
* For bounded character boxes, for a given character having an
* ascender, ascender height and baseline offset are equal.
* @return the ascender value in millipoints
@@ -135,4 +135,4 @@
return charSet.mapChar(c);
}
-}
\ Brak znaku nowej linii na końcu pliku
+}

View File

@ -0,0 +1,32 @@
#!/bin/bash
# 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
# Rest of the configuration
MAIN_CLASS=org.apache.fop.tools.fontlist.FontListMain
BASE_JARS="xmlgraphics-fop xmlgraphics-commons batik-all excalibur/avalon-framework 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 "$@"

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">@VERSION@</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,44 @@
#!/bin/bash
# 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
# 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 commons-io commons-logging excalibur/avalon-framework xml-commons-jaxp-1.3-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 "$@"

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-fontmetric">
]>
<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">@VERSION@</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>

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
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

View File

@ -22,18 +22,28 @@
%define section free
%define bname fop
%bcond_with tests
Name: xmlgraphics-fop
Version: 1.0
Release: 8
Release: 11
Summary: Formatter for Printing XSLT Processed XML Files
License: ASLv..
Group: Productivity/Publishing/XML
Source0: http://www.apache.org/dist/xmlgraphics/fop/source/fop-%{version}-src.tar.gz
Source0: http://ftp.halifax.rwth-aachen.de/apache/xmlgraphics/fop/source/fop-1.0-src.tar.gz
#FIX-OPENSUSE: add xmlgraphics-commons to classpath
Source1: %{name}.script
Source2: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/xmlgraphics-fop-pom-template.pom
Source2: http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_0/xmlgraphics-fop-pom-template.pom
Source3: %{name}-fontmetrics.script
Source4: %{name}-fontlist.script
Source5: http://heanet.dl.sourceforge.net/project/offo/offo-hyphenation/2.0/offo-hyphenation_v2.0.zip
# Manpage(s)
Source10: %{name}.xml
Source11: %{name}-fontmetrics.xml
Source12: %{name}-fontlist.xml
Patch0: xmlgraphics-fop-build.patch
Patch1: xmlgraphics-fop-cli.patch
Patch2: xmlgraphics-fop-asf51789.patch
Url: http://xmlgraphics.apache.org/fop/
Requires(post): jpackage-utils >= 1.7.4
Requires(postun): jpackage-utils >= 1.7.4
@ -47,6 +57,7 @@ Requires: xalan-j2
Requires: xerces-j2
Requires: xmlgraphics-commons
Requires: xml-commons-jaxp-1.3-apis
BuildRequires: unzip
BuildRequires: jpackage-utils >= 1.7.4
BuildRequires: java-devel >= 1.5.0
BuildRequires: java-javadoc
@ -66,6 +77,7 @@ BuildRequires: xmlgraphics-commons >= 1.2
BuildRequires: xmlunit
BuildRequires: xml-commons-jaxp-1.3-apis
BuildRequires: qdox
BuildRequires: docbook-xsl-stylesheets libxslt
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
#!BuildIgnore: saxon
@ -85,14 +97,16 @@ Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
Javadoc for %{name}.
API documentation for %{name} automatically extracted from comments in source files.
%prep
%setup -q -n %{bname}-%{version}
%setup -q -n %{bname}-%{version} -a5
ln -thyph offo-hyphenation/hyph/*.xml
find -name "*.jar" | xargs -t rm
%patch0 -p0 -b .build
%patch1 -p1 -b .cli
%patch2 -p1
pushd lib
ln -s $(build-classpath excalibur/avalon-framework-api)
@ -125,14 +139,32 @@ ln -s $(build-classpath xmlunit)
ln -s $(build-classpath qdox)
popd
cp %{SOURCE2} .
cp %{SOURCE2} %{SOURCE3} %{SOURCE4} .
# Replace keyword "VERSION" in XML files with the real one:
for x in %{SOURCE10} %{SOURCE11} %{SOURCE12}; do
sed -i "s=@VERSION@=%{version}=" $x
done
%build
export CLASSPATH=
export CLASSPATH= LANG=en_US.UTF-8
export OPT_JAR_LIST=`%{__cat} %{_sysconfdir}/ant.d/{junit,trax}`
%{ant} \
-Dbatik.javadoc=%{_javadocdir}/xmlgraphics-batik \
package junit maven-artifacts
package \
%if %{with tests}
junit \
%endif
maven-artifacts
# false
# Build the manpage(s) and HTML
DB=/usr/share/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
@ -148,8 +180,12 @@ install -pm 644 build/maven/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%
# script
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/%{name}-fontmetrics
cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_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
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
@ -161,6 +197,20 @@ mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
# Manpages
mkdir -p $RPM_BUILD_ROOT%_mandir/man1
for m in *.1; do
gzip $m
done
cp -vi *.1.gz $RPM_BUILD_ROOT%_mandir/man1
# Remove prefix xmlgraphics to make also the linked manpage version available
pushd $RPM_BUILD_ROOT%_mandir/man1
for m in *.1.gz; do
ln -s $m ${m#*-}
done
popd
%clean
rm -rf $RPM_BUILD_ROOT
@ -173,13 +223,19 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(0644,root,root,0755)
%doc NOTICE LICENSE README known-issues.xml status.xml
%doc *.html
%attr(0755,root,root) %{_bindir}/%{name}
%attr(0755,root,root) %{_bindir}/%{bname}
%attr(0755,root,root) %{_bindir}/%{name}-fontmetrics
%attr(0755,root,root) %{_bindir}/%{bname}-fontmetrics
%attr(0755,root,root) %{_bindir}/%{name}-fontlist
%attr(0755,root,root) %{_bindir}/%{bname}-fontlist
%{_javadir}/%{name}*.jar
%{_datadir}/%{name}
%{_datadir}/maven2/*
%{_mavendepmapfragdir}/*
%config %{_mavendepmapfragdir}/*
%{_mandir}/man1/*
%files javadoc
%defattr(0644,root,root,0755)

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">@VERSION@</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>