Re: Error messages from fop

2011-09-17 Thread Lars Bjørndal
Hi, Simon!

You wrote:

> The problem does not occur in fop-1.0, nor in the current development
> version of fop. It may be bug 46386 (see 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=46386). That bug
> report suggests that the problem is due to an empty inline with an id.
> You may either remove such elements, or upgrade to fop-1.0.
>
> We recently discussed with fedora how to solve the problem that they
> had with building fop-1.0, so I hope it is now available in fedora.

I upgraded fop from the update-testing repository, and now, I have
fop-1.0-13.fc14 installed. Unfortunately and surprisingly, I get the
following errors when giving the command 'fop -h' or other fop commands:

Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/xmlgraphics/util/uri/CommonURIResolver
at org.apache.fop.apps.FOURIResolver.(FOURIResolver.java:56)
at org.apache.fop.apps.FopFactory.(FopFactory.java:155)
at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:177)
at 
org.apache.fop.cli.CommandLineOptions.(CommandLineOptions.java:121)
at org.apache.fop.cli.Main.startFOP(Main.java:157)
at org.apache.fop.cli.Main.main(Main.java:204)
Caused by: java.lang.ClassNotFoundException: 
org.apache.xmlgraphics.util.uri.CommonURIResolver
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 6 more

Is there some missing dependency packages on my system?

Thanks

Lars

> On Wed, Sep 14, 2011 at 11:13:42AM +0200, Lars Bjørndal wrote:
>> Hello
>> 
>> I'd like to convert the following file into PDF, using fop version 0.95.
>> 
>>   
>> 
>> The fo file is generated from an Docbook XML file with xsltproc. The
>> rest of this mail shows the output from fop, and I hope someon could
>> help me find a way out...
>> 
>> The CLASSPATH variable is set to:
>> /usr/share/java/commons-io.jar:/usr/share/java/batik-all.jar:/usr/share/java/avalon-framework.jar:/usr/share/java/xmlgraphics-commons.jar:/usr/share/java/commons-logging.jar:/usr/share/java/fop.jar::/usr/share/java/xml-commons-apis-ext.jar:/home/lrs/fop/fop-hyph.jar
>> 
>> Here's the output:

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: running fop tests

2011-09-17 Thread Simon Pepping
I constructed an ant target junit-jar-main, which depends on a
selection of junit tests which are relevant for fop.jar. I made the
following modifications to the build file:

Index: build.xml
===
--- build.xml   (revision 963413)
+++ build.xml   (working copy)
@@ -116,24 +116,36 @@
 
 
   
+  
   
-
-  
-
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
   
   
   
 
-
-  
-
+   
+   
+   
+   
+   
+   
+   
+   
+   
   
   
 
-
-  
-  
-
+   
   
   
 
@@ -985,6 +997,18 @@
 All Junit tests passed!
 Use the "junit-reports" target to generate HTML test reports
   
+  
+
+NOTE:
+**
+* One or more of the Junit tests had Failures or Errors or were skipped! *
+* Please check the output above for relevant messages.   *
+*Or use the "junit-reports" target to generate HTML test reports.*
+**
+
+All Junit tests for the main jar file passed!
+Use the "junit-reports" target to generate HTML test reports
+  
 
   
 

In the first part I modify the class paths, as described on the wiki
page. In the second part I define a target junit-jar-main.

I built fop.jar and ran the tests successfully in a fop source directory.

Best, Simon

On Sat, Sep 17, 2011 at 12:28:52PM +0200, Simon Pepping wrote:
> Re junit tests: ant junit runs many tests which are not related to
> fop.jar. Other jar files such as sandbox and transcoder are built, and
> irrelevant tests are run.
> 
> The following tests are relevant to the functioning of fop.jar:
> 
> junit-basic Runs FOP's JUnit basic tests
> junit-intermediate-format   Runs FOP's intermediate format JUnit tests
> junit-layout-standard   Runs FOP's standard JUnit layout tests
> junit-text-linebreakRuns FOP's JUnit unicode linebreak tests
> junit-userconfigRuns FOP's user config JUnit tests
> junit-area-tree-xml-format
> junit-render-pdf
> 
> The following test is irrelevant:
> junit-transcoder
> 
> The following test cannot be run without hyphenation patterns, and
> causes the junit target to report failure:
> junit-layout-hyphenation
> 
> Note that only the target junit reports success or failure; other
> junit targets report success even if the test reports failure.
> 
> One could construct a test junit-package which only includes tests
> relevant to fop.jar.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Apache FOP XML to PDF problem with CJK Unified Ideographs Extension B character

2011-09-17 Thread Glenn Adams
In general, FOP does not support the use of characters outside the Unicode
Base Multilingual Plane (BMP), i.e., characters whose scalar value is
greater than 65535 (decimal).

Support for extra-BMP Unicode codepoints will require an upgrade to the
current code base. As you can see by the error messages below, it is
attempting to treat individual UTF-16 surrogate pair codes as distinct code
points, and not as a UTF-16 encoding of an extra-BMP code point.

Regards,
Glenn

2011/9/16 BRUCE Y L LEE 

> Hi
>
> I would like to transform XML to PDF using Apache FOP.
> CJK Unified Ideographs Extension B characters is included in the XML (e.g.
> 𠀀), I had add the font "Simsun (Founder Extended)" for Apache FOP
> but it cannot render the CJK Unified Ideographs Extension B characters,
> please help.
>
> CJK_ExtB.xml
> [code]
> 𠀀
> [/code]
>
> CJK_ExtB_FO.xsl
> [code]
> 
> http://www.w3.org/1999/XSL/Transform"; xmlns:fo="
> http://www.w3.org/1999/XSL/Format";>
>  
> 
> 
>   page-width="21.0cm" margin="2cm">
> 
>  
> 
> 
>  
> 測試 select="CJK_ExtB"/>測試
>  
> 
> 
>  
> 
> [/code]
>
> fop.xconf
> [code]
> 
>   
> flate
>   
>   
>  embed-url="file:///D:/fop-1.0/fonts/SURSONG.ttf">
>   weight="normal"/>
>  weight="bold"/>
>   weight="normal"/>
>  weight="bold"/>
>  
>   
> 
> [/code]
>
> cmd
> [code]
> D:\fop-1.0>fop -c conf\fop.xconf -xml CJK_ExtB.xml -xsl CJK_ExtB_FO.xsl
> -pdf CJK_ExtB.pdf
> 9月 15, 2011 2:32:20 下午 org.apache.fop.apps.FopFactoryConfigurator configure
> INFO: Default page-height set to: 11in
> 9月 15, 2011 2:32:20 下午 org.apache.fop.apps.FopFactoryConfigurator configure
> INFO: Default page-width set to: 8.26in
> 9月 15, 2011 2:32:23 下午 org.apache.fop.events.LoggingEventListener
> processEvent WARNING: Glyph "?" (0xd840) not available in font
> "FZSY--SURROGATE-0".
> 9月 15, 2011 2:32:23 下午 org.apache.fop.events.LoggingEventListener
> processEvent WARNING: Glyph "?" (0xdc00) not available in font
> "FZSY--SURROGATE-0".
> [/code]
>
>
> Regards,
> Bruce


Re: running fop tests

2011-09-17 Thread Simon Pepping
Re compilation errors: fop-1.0 is java 1.4 compliant and does not
contain generics. The code below is not from fop-1.0.

You can switch target version without harm.

Re junit tests: ant junit runs many tests which are not related to
fop.jar. Other jar files such as sandbox and transcoder are built, and
irrelevant tests are run.

The following tests are relevant to the functioning of fop.jar:

junit-basic Runs FOP's JUnit basic tests
junit-intermediate-format   Runs FOP's intermediate format JUnit tests
junit-layout-standard   Runs FOP's standard JUnit layout tests
junit-text-linebreakRuns FOP's JUnit unicode linebreak tests
junit-userconfigRuns FOP's user config JUnit tests
junit-area-tree-xml-format
junit-render-pdf

The following test is irrelevant:
junit-transcoder

The following test cannot be run without hyphenation patterns, and
causes the junit target to report failure:
junit-layout-hyphenation

Note that only the target junit reports success or failure; other
junit targets report success even if the test reports failure.

One could construct a test junit-package which only includes tests
relevant to fop.jar.

ON this wiki page,
http://wiki.apache.org/xmlgraphics-fop/HowTo/BuildFOPAlternatively, I
describe a method to run some tests without ant, to avoid dependencies
in the build file. But it includes only one target.

Best, Simon

On Fri, Sep 16, 2011 at 02:47:56PM +0200, Mathieu Malaterre wrote:
> Hi Simon,
> 
> On Mon, Aug 29, 2011 at 1:37 PM, Simon Pepping  wrote:
> > It would be good if alternative builds of fop would run a number of
> > our junit tests. The fop team should look into this to formulate a
> > recommendation.
> 
> AFAIK running fop tests simply involved running the 'junit' ant target
> ? Right ? In this case the code does not compile for me:
> 
> [javac]
> /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/util/text/LocatorFormatter.java
> [javac] 
> /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:64:
> generics are not supported in -source 1.4
> [javac] (use -source 5 or higher to enable generics)
> [javac] private List charMetrics = new
> java.util.ArrayList();
> [javac] ^
> [javac] 
> /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:418:
> for-each loops are not supported in -source 1.4
> [javac] (use -source 5 or higher to enable for-each loops)
> [javac] for (Map.Entry>
> entryFrom : this.kerningMap.entrySet()) {
> [javac]   
>  ^
> [javac] 
> /home/mathieu/debian/pkg-java/trunk/fop/fop-1.0/src/java/org/apache/fop/fonts/type1/AFMFile.java:500:
> annotations are not supported in -source 1.4
> [javac] (use -source 5 or higher to enable annotations)
> [javac] @Override
> [javac]  ^
> [javac] 3 errors
> 
> 
> Can I switch the target version ?
> 
> Thanks
> -- 
> Mathieu
> 
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
> 

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org