line height defaulting (0.20 vs 0.95)
Hi, I'm helping a customer upgrading from 0.20.4 to 0.95, and we discovered a difference in line-height defaulting. It appears that even when line-height is set explicitly, FOP 0.95 makes the inter line space *slightly* bigger. I'll assume that 0.95's behavior is the correct one, but I wonder - what exactly is going on, and - whether there's another property that could be set to get identical results (which would be good during a transition period). Best regards, Julian test095.pdf Description: Adobe PDF document test0205.pdf Description: Adobe PDF document ?xml version=1.0 encoding=utf-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=hello page-height=11in page-width=8.5in margin-top=1in margin-bottom=1in margin-left=1in margin-right=1in fo:region-body margin-top=1in margin-bottom=.5in/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=hello fo:flow flow-name=xsl-region-body fo:block 18pt, default /fo:block fo:block font-size=18pt The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. /fo:block fo:block 18pt, 1.0 /fo:block fo:block font-size=18pt line-height=1.0 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. /fo:block fo:block 18pt, 1.1 /fo:block fo:block font-size=18pt line-height=1.1 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. /fo:block fo:block 18pt, 1.2 /fo:block fo:block font-size=18pt line-height=1.2 The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. /fo:block fo:block 18pt, 18pt /fo:block fo:block font-size=18pt line-height=18pt The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. /fo:block /fo:flow /fo:page-sequence /fo:root - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: FOP trunk error message when run from ant
Eric, In our case, we get data from database as XML, apply the reports specific xsl-fo template (.xsl file) and generate a PDF report. That's our requirement and the solution I mentioned works very well for us. All we need is create FOP Factory instance, specify the configuration file location, specify transformer (XSLT), provide source XML file and we have what we need a PDF report. Also we keep our application related fonts in a separate folder than windows folder. Regards, Jayant | | From: | | --| |Eric Douglas edoug...@blockhouse.com | --| | | To:| | --| |fop-users@xmlgraphics.apache.org | --| | | Date: | | --| |07/01/2010 04:12 PM | --| | | Subject: | | --| |RE: FOP trunk error message when run from ant | --| That doesn't seem right at all. You explain how to get the fonts into the xconf reference path then show an embedded example. If you're using the classes and embedding the code you don't need that. I pull in fonts like this: 1) Create a TTFFontLoader using the font file name with URI path and a DefaultFontResolver 2) If it's one font per file just use getFont() to create a CustomFont, if you need to query any font details from the file 3) Build a new FontTriplet and add it into a Java ArrayList 4) Create a new EmbedFontInfo object using the FOP generated metrics file (URI), the KerningEnabled value (can be queried from CustomFont), the font triplet array, the font file (URI), and the sub font name (may be null) 5) Create another Java ArrayList and add in the EmbedFontInfo 6) Generate a Renderer and pass the font ArrayList to setFontList() 7) Put the Renderer into the UserAgent (setRendererOverride) Then you shouldn't even need the xconf file. I suggest never referring to fonts as files which should be installed on the client OS. We had a program years ago running on Windows 98 referencing a Courier font that didn't come out right because somehow the same font file had a different looking font in it on different clients. I avoid that problem now pulling the font from the server. -Original Message- From: Jayant Ghagre [mailto:jayant.gha...@ambest.com] Sent: Thursday, July 01, 2010 2:40 PM To: fop-users@xmlgraphics.apache.org Subject: RE: FOP trunk error message when run from ant Mario, Here's how I am using custom fonts. In my application folder I have created a folder MyAppFonts and copied all custom fonts in that folder. You can either refer to operating systems folder such as c:\windows\fonts. Copy fop.xconf file to your application folder and then rename to YourAppNameConfig.xml Open the YourAppNameConfig.xml in any editor and add you MyAppFonts folder as shown below fonts !-- embedded fonts -- !-- register all the fonts found in a directory -- directory.\MyAppFonts/directory !-- register all the fonts found in a directory and all of its sub directories (use with care) -- directory recursive=true.\MyAppFonts/directory !-- automatically detect operating system installed fonts auto-detect/ -- /fonts Sample java code // configure fopFactory as desired FopFactory
RE: FOP trunk error message when run from ant
I'm not suggesting that it wouldn't work, just that it sounds like some ugly hack to combine the two methods, that the xconf file should be required if you're calling FOP from a command prompt and if you're using the classes with embedded code you could skip the xconf file and use the proper code to import the font with the FontLoader. In my case there's an additional benefit to using the FontLoader, because I'm using the classes in embedded dynamic code. I wrote a program which puts all the data to be printed into an XML file. It writes the data with made up tags to specify coordinates on a page to print each piece of text with absolute locations. I tell it how many characters I want to print across the page and it dynamically adjusts the font size to fit. I'm using a fixed point font, so I get the font size from the TTFLoader. It reads the font into a CustomFont which implements FontDescriptor which extends FontMetrics which has a method getWidth. -Original Message- From: Jayant Ghagre [mailto:jayant.gha...@ambest.com] Sent: Friday, July 02, 2010 8:22 AM To: fop-users@xmlgraphics.apache.org Subject: RE: FOP trunk error message when run from ant Eric, In our case, we get data from database as XML, apply the reports specific xsl-fo template (.xsl file) and generate a PDF report. That's our requirement and the solution I mentioned works very well for us. All we need is create FOP Factory instance, specify the configuration file location, specify transformer (XSLT), provide source XML file and we have what we need a PDF report. Also we keep our application related fonts in a separate folder than windows folder. Regards, Jayant | | From: | | --- ---| |Eric Douglas edoug...@blockhouse.com | --- ---| | | To:| | --- ---| |fop-users@xmlgraphics.apache.org | --- ---| | | Date: | | --- ---| |07/01/2010 04:12 PM | --- ---| | | Subject: | | --- ---| |RE: FOP trunk error message when run from ant | --- ---| That doesn't seem right at all. You explain how to get the fonts into the xconf reference path then show an embedded example. If you're using the classes and embedding the code you don't need that. I pull in fonts like this: 1) Create a TTFFontLoader using the font file name with URI path and a DefaultFontResolver 2) If it's one font per file just use getFont() to create a CustomFont, if you need to query any font details from the file 3) Build a new FontTriplet and add it into a Java ArrayList 4) Create a new EmbedFontInfo object using the FOP generated metrics file (URI), the KerningEnabled value (can be queried from CustomFont), the font triplet array, the font file (URI), and the sub font name (may be null) 5) Create another Java ArrayList and add in the EmbedFontInfo 6) Generate a Renderer and pass the font ArrayList to setFontList() 7) Put the Renderer into the UserAgent (setRendererOverride) Then you shouldn't even need the xconf file. I suggest never referring to fonts as files which should be installed on the client OS. We had a program years ago running on Windows 98 referencing a Courier font that didn't come out right because somehow the same font file had a different looking font in it on different clients. I avoid that problem now pulling the font from the server. -Original Message- From: Jayant Ghagre [mailto:jayant.gha...@ambest.com] Sent: Thursday, July 01, 2010 2:40 PM To: fop-users@xmlgraphics.apache.org Subject: RE: FOP trunk error message when run from ant Mario, Here's how I am using custom fonts. In my application folder I have created a folder MyAppFonts and copied all custom fonts in that folder. You can either refer to operating systems folder such as c:\windows\fonts. Copy fop.xconf file to
How to Get Borders to Work
I notice there is an open bug about borders not fully working on some objects. I can't get them to work on blocks or block containers (using trunk). Has anyone got it to work on either block or block container? If so, can you show the exact syntax that worked for you? Thanks. -Tom Thomas M. Browder, Jr. Niceville, Florida USA - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
NoClassDefFoundError: SVGDOMImplementation (initialization failure)
Hi All, I am trying to convert fo document to PCL using fop and getting following error while instantiating FOPFactory : java.lang.NoClassDefFoundError: org.apache.batik.dom.svg.SVGDOMImplementation (initialization failure) at java.lang.J9VMInternals.initialize(J9VMInternals.java:134) at java.lang.Class.forNameImpl(Native Method) at java.lang.Class.forName(Class.java:130) at org.apache.fop.image.loader.batik.BatikUtil.isBatikAvailable(BatikUtil.java:33) at org.apache.fop.image.loader.batik.ImageLoaderFactorySVG.isAvailable(ImageLoaderFactorySVG.java:60) at org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry.registerLoaderFactory(ImageImplRegistry.java:163) at org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry.discoverClasspathImplementations(ImageImplRegistry.java:97) at org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry.init(ImageImplRegistry.java:70) at org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry.getDefaultInstance(ImageImplRegistry.java:79) at org.apache.xmlgraphics.image.loader.ImageManager.init(ImageManager.java:48) at org.apache.fop.apps.FopFactory.init(FopFactory.java:154) at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:166) I am running code on Weblogic 9.2 and all the required libraries (fop.jar, batik-all.jar and xmlgraphics-commons-1.3.1.jar) are in class path. I am using FOP version 0.95 This error does not comes when i run this as a stand-alone program. And in Weblogic, it appears on a random basis not always. Any help in this regard will be much appreciated. Thanks! Sanjeev - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: How to Get Borders to Work
On 3/07/2010 2:45 AM, Tom Browder wrote: I notice there is an open bug about borders not fully working on some objects. URL? I can't get them to work on blocks or block containers (using trunk). Border work fine for me on blocks in 0.95 and trunk. Have a look at the test cases in fop for some examples. If so, can you show the exact syntax that worked for you? I just set a border style, width and color. I don't have an example immediately to hand, but will post one later if you still have problems. -- Craig Ringer - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org