You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Fred <fr...@googlemail.com> on 2016/01/22 23:44:14 UTC
Boxes around each character
Hi,
we have the same problem as Urmo Rae (see, “Strange behaviour when rendering SVG texts under java program vs jruby” from 19 Jan 2016 ).
We are using FOP to render XSL-FO, with some instream SVG graphics into PDF.
All worked very well with FOP 1.0 and Batik 1.7.
Since we have updated to FOP 2.0 (and now 2.1) and Batik 1.8, we get boxes around every single character when the text is in the SVG Part of the document.
But the problem only occurs when executed from a servlet on tomcat 6.
When FOP is called standalone from the command line on the same machine, the PDF looks fine.
Please have a look to the attached example.
Thanks a lot
Fred
RE: Boxes around each character
Posted by Martin Gainty <mg...@hotmail.com>.
> Date: Wed, 27 Jan 2016 21:05:11 +0100
> From: fred.frstn@googlemail.com
> To: batik-users@xmlgraphics.apache.org
> CC: mgainty@hotmail.com
> Subject: Re: Boxes around each character
>
> Hi Martin,
>
> i could solve the problem today.
>
> ==> It seems this boxes are for debug purpose.
>
> I was able to reproduce the effect by adding a not properly (or not at all) configured log4j to my test project.
> Our application did not use log4j, so there was no log4j.properties. But tomcat does.
>
> The boxes vanished with a proper configuration.
>
> If I set
>
> log4j.logger.org.apache.fop = DEBUGMG>which version Log4j are you implementinh?
>
> the boxes appear againg
>
> I'm not sure if the behavior in FOP/Batik is as expected.
> Debug should not be the default, if not configured. Also it could be a good idea using a special property for debug output which would be visible to the user, because someone might want do debug in a production environment.
>
> Best regards and thank you for your support
> FredMG>Glad to hear you have a solution!
>
>
>
>
> On Sat, 23 Jan 2016 10:45:44 -0500
> Martin Gainty <**...@hotmail.com> wrote:
>
> > Morning' Fred
> >
> > I am unable to display debug information from the attached files
> > If you set CLASSPATH=
> > then run execution from either your maven pom.xml or ant build.xml (displaying the dependency list)
> > redirect execution output to a (tee) file and post it here so we can narrow down the problem..specifically:
> > what version batik produces this anomaly?
> > what version FOP produces this anomaly?
> > what version servlet-api produces this anomaly?
> >
> > I will provide you a working pom.xml for apache-fop 1.0 which produces non-boxed output for servlet-api 3.1.0
> >
> > <project>
> > <modelVersion>4.0.0</modelVersion>
> > <groupId>org.apache</groupId>
> > <artifactId>fop</artifactId>
> > <version>1.0</version>
> > <build>
> > <plugins>
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-compiler-plugin</artifactId>
> > <configuration>
> > <!-- source>1.8</source -->
> > <!-- target>1.8</target -->
> > </configuration>
> > </plugin>
> > </plugins>
> > </build>
> > <dependencies>
> > <dependency>
> > <groupId>org.apache.fop</groupId>
> > <artifactId>fop</artifactId>
> > <version>${project.version}</version> <!-- assumes repo with apache-fop 1.0 is available to this execution environment -->
> > </dependency>
> > <dependency>
> > <groupId>xerces</groupId>
> > <artifactId>xercesImpl</artifactId>
> > <version>2.9.1</version>
> > </dependency>
> > <dependency>
> > <groupId>org.apache.ant</groupId>
> > <artifactId>ant-junit</artifactId>
> > <version>1.9.4</version> <!-- ant version is 1.9.4 -->
> > </dependency>
> > <dependency>
> > <groupId>junit</groupId>
> > <artifactId>junit</artifactId>
> > <version>4.8.2</version> <!-- junit is 4.8.2 -->
> > </dependency>
> > <dependency>
> > <groupId>org.apache.avalon.framework</groupId>
> > <artifactId>avalon-framework-api</artifactId>
> > <version>4.3.1</version>
> > </dependency>
> > <dependency>
> > <groupId>org.apache.ant</groupId>
> > <artifactId>ant</artifactId>
> > <version>1.9.4</version> <!-- ant version is 1.9.4 -->
> > </dependency>
> > <dependency>
> > <groupId>org.apache.batik</groupId>
> > <artifactId>batik-extension</artifactId>
> > <version>1.7</version> <!-- batik version is 1.7 -->
> > </dependency>
> > <dependency>
> > <groupId>org.apache.batik</groupId>
> > <artifactId>batik-all</artifactId>
> > <version>1.7</version> <!-- batik version is 1.7 -->
> > </dependency>
> > <dependency>
> > <groupId>javax.media</groupId>
> > <artifactId>jai-core</artifactId>
> > <version>1.1.3-alpha</version>
> > </dependency>
> > <dependency>
> > <groupId>commons-logging</groupId>
> > <artifactId>commons-logging</artifactId>
> > <version>1.2</version>
> > </dependency>
> > <dependency>
> > <groupId>javax.servlet</groupId>
> > <artifactId>servlet-api</artifactId>
> > <version>3.1.0</version> <!-- servlet-api 3.1.0 requires Tomcat 8.0.30 http://tomcat.apache.org/whichversion.html -->
> > </dependency>
> > </dependencies>
> > </project>
> >
> > Martin Gainty
> > ______________________________________________
> > _____ _ _____ _ _____ ___ _ _____ _ _ _
> > |_ _| |_ ___ | _ |___ ___ ___| |_ ___ | __|___| _| |_ _ _ _ ___ ___ ___ | __|___ _ _ ___ _| |___| |_|_|___ ___
> > | | | | -_| | | . | .'| _| | -_| |__ | . | _| _| | | | .'| _| -_| | __| . | | | | . | .'| _| | . | |
> > |_| |_|_|___| |__|__| _|__,|___|_|_|___| |_____|___|_| |_| |_____|__,|_| |___| |__| |___|___|_|_|___|__,|_| |_|___|_|_|
> > |_|
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
Re: Boxes around each character
Posted by Fred <fr...@googlemail.com>.
Hi Martin,
i could solve the problem today.
==> It seems this boxes are for debug purpose.
I was able to reproduce the effect by adding a not properly (or not at all) configured log4j to my test project.
Our application did not use log4j, so there was no log4j.properties. But tomcat does.
The boxes vanished with a proper configuration.
If I set
log4j.logger.org.apache.fop = DEBUG
the boxes appear again.
I'm not sure if the behavior in FOP/Batik is as expected.
Debug should not be the default, if not configured. Also it could be a good idea using a special property for debug output which would be visible to the user, because someone might want do debug in a production environment.
Best regards and thank you for your support
Fred
On Sat, 23 Jan 2016 10:45:44 -0500
Martin Gainty <**...@hotmail.com> wrote:
> Morning' Fred
>
> I am unable to display debug information from the attached files
> If you set CLASSPATH=
> then run execution from either your maven pom.xml or ant build.xml (displaying the dependency list)
> redirect execution output to a (tee) file and post it here so we can narrow down the problem..specifically:
> what version batik produces this anomaly?
> what version FOP produces this anomaly?
> what version servlet-api produces this anomaly?
>
> I will provide you a working pom.xml for apache-fop 1.0 which produces non-boxed output for servlet-api 3.1.0
>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <groupId>org.apache</groupId>
> <artifactId>fop</artifactId>
> <version>1.0</version>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <!-- source>1.8</source -->
> <!-- target>1.8</target -->
> </configuration>
> </plugin>
> </plugins>
> </build>
> <dependencies>
> <dependency>
> <groupId>org.apache.fop</groupId>
> <artifactId>fop</artifactId>
> <version>${project.version}</version> <!-- assumes repo with apache-fop 1.0 is available to this execution environment -->
> </dependency>
> <dependency>
> <groupId>xerces</groupId>
> <artifactId>xercesImpl</artifactId>
> <version>2.9.1</version>
> </dependency>
> <dependency>
> <groupId>org.apache.ant</groupId>
> <artifactId>ant-junit</artifactId>
> <version>1.9.4</version> <!-- ant version is 1.9.4 -->
> </dependency>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>4.8.2</version> <!-- junit is 4.8.2 -->
> </dependency>
> <dependency>
> <groupId>org.apache.avalon.framework</groupId>
> <artifactId>avalon-framework-api</artifactId>
> <version>4.3.1</version>
> </dependency>
> <dependency>
> <groupId>org.apache.ant</groupId>
> <artifactId>ant</artifactId>
> <version>1.9.4</version> <!-- ant version is 1.9.4 -->
> </dependency>
> <dependency>
> <groupId>org.apache.batik</groupId>
> <artifactId>batik-extension</artifactId>
> <version>1.7</version> <!-- batik version is 1.7 -->
> </dependency>
> <dependency>
> <groupId>org.apache.batik</groupId>
> <artifactId>batik-all</artifactId>
> <version>1.7</version> <!-- batik version is 1.7 -->
> </dependency>
> <dependency>
> <groupId>javax.media</groupId>
> <artifactId>jai-core</artifactId>
> <version>1.1.3-alpha</version>
> </dependency>
> <dependency>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> <version>1.2</version>
> </dependency>
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>servlet-api</artifactId>
> <version>3.1.0</version> <!-- servlet-api 3.1.0 requires Tomcat 8.0.30 http://tomcat.apache.org/whichversion.html -->
> </dependency>
> </dependencies>
> </project>
>
> Martin Gainty
> ______________________________________________
> _____ _ _____ _ _____ ___ _ _____ _ _ _
> |_ _| |_ ___ | _ |___ ___ ___| |_ ___ | __|___| _| |_ _ _ _ ___ ___ ___ | __|___ _ _ ___ _| |___| |_|_|___ ___
> | | | | -_| | | . | .'| _| | -_| |__ | . | _| _| | | | .'| _| -_| | __| . | | | | . | .'| _| | . | |
> |_| |_|_|___| |__|__| _|__,|___|_|_|___| |_____|___|_| |_| |_____|__,|_| |___| |__| |___|___|_|_|___|__,|_| |_|___|_|_|
> |_|
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org