Re: Font-Problem depending on Java-VM
Chris Bowditch wrote: Matthias Schäfer wrote: Hello, printing Text with or ' with IBM 1.3.0 works fine. Trying SUN 1.3.1_08 or SUN 1.3.1_09 I get squares instead of the expected Characters. This sounds like an encoding issue. What is the encoding of your FO file (or XML and XSL files) Also, what font are you using? The result of converting a RTF-File from MS-Word with RTF2FO (rtf2fo.com) is a FO-File in UTF-8. Changing Times to Helvetica doesn't change anything. Saving the FO-File with XML-Spy as ISO-8859-1 recognize the Characters 0x201E, 0x201C, 0x201A, 0x2019 as not representable. Replacing it with _ shows _ as expected. Changing this Character in XML-Spy with (0x0034) and ' (0x0039) shows this Characters. But there is one vital Difference. The Chars I entered are aligned at the top. The Original a aligned one at bottom, one at top. In my next Test I entered the Chars (0x0034) and ' (0x0039) again in a Textfile with Notepad. After saving this File with Word as RTF I convert it with RTF2FO. Now I get the Characters as I typed in. So the problem seems to be the special Chars of Unicode-Table 20. But is it FOP or is it the Java-VM ? With SUN 1.4.2_01 it works only with fop-0.20.5rc2, but not with fop-bidi (from Oleg Tkachenko) because of java.lang.NoClassDefFoundError: sun/awt/font/Bidi. Unfortunately I need the Bidi-Version ! The bidi classes are only available since JDK 1.4. You will need to compile and run using JDK 1.4 or later. I guess I have to use the JDK-Class in java.text.Bidi instead of sun/awt/font/Bidi used with older JDK's ? snip/ Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Font-Problem depending on Java-VM
Chris Bowditch wrote: Matthias Schäfer wrote: Hello, printing Text with or ' with IBM 1.3.0 works fine. Trying SUN 1.3.1_08 or SUN 1.3.1_09 I get squares instead of the expected Characters. This sounds like an encoding issue. What is the encoding of your FO file (or XML and XSL files) Also, what font are you using? The result of converting a RTF-File from MS-Word with RTF2FO (rtf2fo.com) is a FO-File in UTF-8. Changing Times to Helvetica doesn't change anything. Saving the FO-File with XML-Spy as ISO-8859-1 recognize the Characters 0x201E, 0x201C, 0x201A, 0x2019 as not representable. Replacing it with _ shows _ as expected. Changing this Character in XML-Spy with (0x0034) and ' (0x0039) shows this Characters. But there is one vital Difference. The Chars I entered are aligned at the top. The Original a aligned one at bottom, one at top. In my next Test I entered the Chars (0x0034) and ' (0x0039) again in a Textfile with Notepad. After saving this File with Word as RTF I convert it with RTF2FO. Now I get the Characters as I typed in. So the problem seems to be the special Chars of Unicode-Table 20. But is it FOP or is it the Java-VM ? With SUN 1.4.2_01 it works only with fop-0.20.5rc2, but not with fop-bidi (from Oleg Tkachenko) because of java.lang.NoClassDefFoundError: sun/awt/font/Bidi. Unfortunately I need the Bidi-Version ! The bidi classes are only available since JDK 1.4. You will need to compile and run using JDK 1.4 or later. I guess I have to use the JDK-Class in java.text.Bidi instead of sun/awt/font/Bidi used with older JDK's ? snip/ Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Font-Problem depending on Java-VM
Hello, printing Text with or ' with IBM 1.3.0 works fine. Trying SUN 1.3.1_08 or SUN 1.3.1_09 I get squares instead of the expected Characters. With SUN 1.4.2_01 it works only with fop-0.20.5rc2, but not with fop-bidi (from Oleg Tkachenko) because of java.lang.NoClassDefFoundError: sun/awt/font/Bidi. Unfortunately I need the Bidi-Version ! Plattform is W2K. Hope someone could give me a hint. Matthias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
printing of bmp images
Hello List, I try to print a .bmp on w2k / XP with fop 0.20.5rc2, without success. Trying the following fo-code, shows only the gif. Both files are in the base directory an are less than 1kb. fo:block text-align=left BMP fo:external-graphic src=file:test1.bmp/ /fo:block fo:block text-align=left GIF fo:external-graphic src=file:test1.gif/ /fo:block I found on http://xml.apache.org/fop/graphics.html#bmp the notice: FOP native support for BMP images is limited to the RGB color-space. Is this my problem ? How can I check this ? I can provide the Image I used for testing. In real Applictaion I would create the Image with the following Code: hdcMem = CreateCompatibleDC(hdc); //' Call DSCreateDIBSection() from the DLL. //' You can use the desired BPP in the last parameter(for example, 24) DibSection = DSCreateDIBSection(width, height, 24); hOldBitmap = SelectObject(hdcMem, DibSection); Ret = StretchBlt(hdcMem, 0, 0, width, height, hdc, 0, 0, width, height, SRCCOPY); hOldBitmap = SelectObject(hdcMem, hOldBitmap); //' Call DSStoreDIBSectionInBMPFile() from the DLL. //' Add error handling. Ret = DSStoreDIBSectionInBMPFile(test.bmp, DibSection); Matthias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Different VM causes different printing of Blanks in tables
Clay Leeds wrote: J.Pietschmann wrote: Matthias Schäfer wrote: I guess you had problems with this in the past. I never used any IBM JVM with AWT stuff, others reported this last year, look into the mailing list archives. The solutions were upgrade or switch to Sun JVM (unless on AIX, where the IBM JVM is the only viable choice). Upgrade to ??? Is there a IBM-JVM other than 1.3.0 or 1.3.1 without that problems ? If you switch to Sun's JVM: some 1.3.0 releases and basically all 1.4.0 beta releases are said to have a variety of problems with AWT text rendering, the latter most notable with character width calculations. Use 1.3.1 or 1.4.1/1.4.2. For details, consult Sun's BugParade. In my experience, Sun JVM 1.4.0_06 and later correctly output font-kerning using -awt (and -print, since it uses AWT). On the IBM side, IBM JVM 1.3.x worked OK on AIX. In fact, we've been telling our clients to use Sun Java 1.4.0_06+, or IBM Java 1.3+. However, since you're having problems, with IBM Java 1.3.x, I may have to revisit that advice. Out of curiosity, are all fonts affected or is it just one or two, and if so, which font(s) have you tested? The problems occur, when I choose no font (wich seems to be Helvetica) and with Helvetica. Using Courier or Times in the table-rows is ok, but produces problems on my table-header. So I tested to use Helvetica on table-header and Times on the rows. In this combination I see no problems. Of course it is not ideal to mix fonts. Is there any other font shipped with fop I can use, or is importing a font a solution ? FWIW, I've used Sun 1.4.1_01-b01 successfully on Win32, and as mentioned java130 on AIX. Our Linux box is using 1.4.0_02. All of these installations output Courier and Times acceptably. I have yet to run any tests with Sun 1.4.2... Hope someone finds at least a portion of this informative... Web Maestro Clay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Different VM causes different printing of Blanks in tables
J.Pietschmann wrote: Matthias Schäfer wrote: I use fop 0.20.5RC2 on a german W2K from a java-application. Printing text inside and outside a table shows differences on blanks. Inside the table the words have different distances (from normal to overlapping last and first letter) when running with What's your output? I guess AWT? java version 1.3.0 That's *old* and has a huge number of known bugs, in particular the IBM version is known to mangle AWT text rendering. I guess you had problems with this in the past. How did you solve them ? I tried also Classic VM (build 1.3.1, J2RE 1.3.1 IBM Windows 32 build cn131-20021107 (JIT enabled: jitc)) which is Part of IBM WebSphere SDK for Web Services, but it shows the same effect. Is there a Patch or a newer Version (this is from 7.11.2002) available for the IBM-VM ? Is there any Solution with a IBM-VM ? Can I use a Workaround ? The Sun VM has its own number of problems. If you are tied to JDK 1.3, you should upgrade to the last patch level of a 1.3.1 VM. So I experimented with addional de.hyp and de_DR.hyp build from de.xml and de_DR.xml of fop 0.20.3 and a setting of hyphenation-dir in userconfig.xml without success. Nice try, but what kind of success did you expect? Hyphenation is, well, for hyphenation only, not for character placement calculation. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Convert existing PDF to XSL-FO tool
Ganesh wrote: Hi, Thank you for the reply. I am not using XSL-FO from XSLT. I using Apache Velocity which has an inbuilt template language (VTL) to fetch data from Java Beans on to any text file. The dynamic data are merged with XSL-FO template using Velocity and the resulting XSL-FO file is then given to FOP for generating PDF. I agree that reverse compiler are not precise, but I am a novice in XSL-FO template creation. It would be of great help if any tool can provide a good start on which I can build on. It would be good enough if I could copy-paste the PDF file content onto some XSL-FO editor and it generates the XSL-FO for me. Is anybody aware of such a XSL-FO editor?. Have a look on AbiWord. It could read and write *.fo and many other formats. I heard of XMLSpy, when I searched the Google, but not sure which is best for my requirement(ie., with existing PDF and free if possible). Regards, Ganesh -Original Message- From: Glen Mazza [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 5:02 PM To: [EMAIL PROTECTED] Subject: Re: Convert existing PDF to XSL-FO tool Reverse compilers, for whatever languages, are quite rare and usually buggy, wouldn't you say? Furthermore, editing XSL FO directly is cumbersome, so you would probably want an XML source instead that you can run against an XSLT stylesheet to generate your XSL FO. It may be better to try to access the original documents that made the PDF to begin with--Microsoft Word, perhaps. (Or, copy and paste your PDF into text format.) Convert--manually if need be--into XML, then create modify your XSLT stylesheet to generate the output desired. If you're starting from scratch Docbook may be the best option as an XML format for your documents--although FOP cannot completely handle its standard stylesheets at this time. Glen --- Ganesh [EMAIL PROTECTED] wrote: Hi Genies, I would like to know if there is anyway to convert the existing PDF file to XSL-FO file. This is basically for migrating the manual process of creating PDF to XSL-FO way. I already have a PDF which is created through manual process, I want to convert the same to XSL-FO and then manipulate it later. It will be great if any of you knows such tools. Thank you. Regards, Ganesh __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Different VM causes different printing of Blanks in tables
Thanks for your reply... J.Pietschmann wrote: Matthias Schäfer wrote: I use fop 0.20.5RC2 on a german W2K from a java-application. Printing text inside and outside a table shows differences on blanks. Inside the table the words have different distances (from normal to overlapping last and first letter) when running with What's your output? I guess AWT? Yes. java version 1.3.0 That's *old* and has a huge number of known bugs, in particular the IBM version is known to mangle AWT text rendering. If I know this sooner... The Sun VM has its own number of problems. If you are tied to JDK 1.3, you should upgrade to the last patch level of a 1.3.1 VM. I suggest my cosutomer to use a newer VM. If possible the latest 1.4.2. So I experimented with addional de.hyp and de_DR.hyp build from de.xml and de_DR.xml of fop 0.20.3 and a setting of hyphenation-dir in userconfig.xml without success. Nice try, but what kind of success did you expect? Hyphenation is, well, for hyphenation only, not for character placement calculation. Your right, but while I guess it was dependet on the language of the VM I try this. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Different VM causes different printing of Blanks in tables
Hello, I use fop 0.20.5RC2 on a german W2K from a java-application. Printing text inside and outside a table shows differences on blanks. Inside the table the words have different distances (from normal to overlapping last and first letter) when running with java version 1.3.0 Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0) Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cn130-20010925 (JIT enabled: jitc)) Running the same with java version 1.3.0 Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C) Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode) everything is ok. I found the following difference between the VMs: The IBM-VM bring up german Buttons in JOptionPane. The SUN-VM shows english Buttons at this point. So I experimented with addional de.hyp and de_DR.hyp build from de.xml and de_DR.xml of fop 0.20.3 and a setting of hyphenation-dir in userconfig.xml without success. The System-Property user.language is de and System.out.println(Locale.getDefault()) prints de_DE. Executing this Snippet show also no change in the described behavior. Locale.setDefault(Locale.GERMANY); UIManager.setLookAndFeel(UIManager.getLookAndFeel()); // !! Is there anybody who can point me towards a solution where I can use the IBM-VM ? Matthias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Printing PDF ?!?
Hello Benjamin, your Stacktrace looks like one of mine a few weeks ago. Oleg Tkachenko pointed me to change: xsl:value-of select=@data/ fo:block/ xsl:value-of select=@bindata/ to this (which is roughly equivalent): fo:blockxsl:value-of select=@data//fo:block fo:blockxsl:value-of select=@bindata//fo:block That was the solution for my problem. Maybe you can check if there is something like that with your files ... Matthias Benjamin Wischek wrote: Hi Chris! Sorry, I got your mail when I was at home, so I couldn't mail you back with the wanted information. So here it is. I added the svg from Krysalis and a text-file with the exception as attachment. BTW: I started FOP from the command line... Greetings, Ben [ERROR] java.lang.NullPointerException org.apache.fop.apps.FOPException: java.lang.NullPointerException at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:111) at org.apache.fop.apps.Fop.main(Fop.java:62) - java.lang.RuntimeException: java.lang.NullPointerException at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3170) at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:433) at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TrAXFilter.parse(TrAXFilter.java:134) at org.apache.fop.apps.Driver.render(Driver.java:498) at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:106) at org.apache.fop.apps.Fop.main(Fop.java:62) - java.lang.RuntimeException: java.lang.NullPointerException at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3170) at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:433) at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(Unknown Source) at org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TrAXFilter.parse(TrAXFilter.java:134) at org.apache.fop.apps.Driver.render(Driver.java:498) at org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:106) at org.apache.fop.apps.Fop.main(Fop.java:62) ?xml version=1.0? svg:svg xmlns:svg=http://www.w3.org/2000/svg; height=15mm width=36.67mm svg:g style=fill:black; stroke:none svg:rect height=12.1781mm width=0.19mm x=1.9mm y=0mm/ svg:rect height=12.1781mm width=0.19mm x=2.565mm y=0mm/ svg:rect height=12.1781mm width=0.475mm x=2.945mm y=0mm/ svg:rect height=12.1781mm width=0.475mm x=3.61mm y=0mm/ svg:rect height=12.1781mm width=0.19mm x=4.275mm y=0mm/ svg:rect height=12.1781mm width=0.19mm x=4.655mm y=0mm/ svg:rect height=12.1781mm width=0.19mm x=5.035mm y=0mm/ svg:rect height=12.1781mm width=0.475mm x=5.7mm y=0mm/ svg:rect height=12.1781mm width=0.475mm x=6.365mm y=0mm/ svg:rect height=12.1781mm width=0.19mm x=7.03mm y=0mm/ svg:rect height=12.1781mm width=0.475mm x=7.41mm y=0mm/ svg:rect height=12.1781mm width=0.19mm x=8.075mm y=0mm/ svg:rect height=12.1781mm width=0.19mm x=8.74mm y=0mm/ svg:rect