AW: error
that error always occured when i had characters in the document thatare no supported by the encoding: ?xml version="1.0" encoding="ISO-8859-1"? try to changeit to something else Alex -Ursprüngliche Nachricht-Von: amar [mailto:[EMAIL PROTECTED]Gesendet: Donnerstag, 12. Juni 2003 19:31An: [EMAIL PROTECTED]Betreff: error hello any one knows what this error means the same application is working fine on win32 machine but when porting the application to unix i get the following An invalid XML character (Unicode: 0x92) was found in the element content of the document.
AW: xsl:fo to svg rendering with raster images
The paths to the images are not the problem. They are absolute paths to a lokal image file on the hard disk. But I think the other 2 possibilities are the cause of the problem. I didn't declare the xlink namespace. And one image I use has a cmyk colorspace. I get the following exception while rendering: sun.awt.image.ImageFormatException: Unsupported color conversion request at sun.awt.image.JPEGImageDecoder.readImage(Native Method) at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:144) at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:257 ) at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:168) at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) I got the same exception with AWTRenderer, which I used for a preview. So I tried to do the preview with SVG and JSVGCanvas from Batik. But the problem with the images is the same. (and I want to replace AWTRenderer with something else because the font rendering quality is really bad). I added my fo file and the produced svg file to this mail. Maybe you can take a look at it, and hopefully tell me whats wrong. Don't bother about the $data.getXXX() functions in the fo file. They come from Velocity which I use to fill my fo templates with data. Everything works fine with pdf creation but not with svg output. btw. svg creation is done with this function: public void renderToSvg(byte []foFile, File file) { try { FileOutputStream outStream; driver.setInputSource(new InputSource(new ByteArrayInputStream(foFile))); driver.setOutputStream(outStream = new FileOutputStream(file)); driver.setRenderer(Driver.RENDER_SVG); driver.run(); outStream.flush(); outStream.close(); } catch (FileNotFoundException fnfex) {fnfex.printStackTrace();} catch (IOException ioex) {ioex.printStackTrace();} catch (FOPException fopex) {fopex.printStackTrace();} } Could be I forgot something here as well. TIA Alex -Ursprungliche Nachricht- Von: J.Pietschmann [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 13. Marz 2003 00:11 An: [EMAIL PROTECTED] Betreff: Re: xsl:fo to svg rendering with raster images Alexander Koppelhuber wrote: I tried to render my fo files to svg, which works fine for text. But none of the external images makes it to the svg file. Batik can produce image tags with links to external images. Is this a limitation in fop? (producing a pdf with the same fo file works fine). Most likely your images weren't found. Check whether the source URLs would work with an fo:external-graphic. You might need to use absolute URLs. Other possiblities: - The image file formats are not supported. I'm not sure but perhaps installing Jimi (see FOP FAQ) helps with this issue. - You forgot to declare the xlink namespace. A code sample would have helped in diagnosing the problem. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ?xml version=1.0 encoding=ISO-8859-1? !-- Document : Visitenkarte.fo.xml Created on : 15. Februar 2003, 02:49 Author : Alexander Koppelhuber Description: Purpose of the document follows. -- fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=basic page page-height=55mm page-width=170mm margin-top=0cm margin-bottom=0cm margin-left=0mm margin-right=0mm fo:region-body margin-top=0cm margin-right=0mm/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=basic page fo:flow flow-name=xsl-region-body !--fo:block-container width=85mm height=55mm top=-1mm position=absolute fo:block fo:external-graphic src=url('$data.getBackground()') width=85mm height=55mm scaling=uniform/ /fo:block /fo:block-container -- fo:block-container width=85mm height=11mm left=85mm top=44mm position=absolute fo:block fo:external-graphic src=url('$data.getImage(0)') width=85mm height=11mm scaling=uniform/ /fo:block /fo:block-container fo:block-container width=31.16mm height=45mm left=85mm top=-1mm position=absolute fo:block fo:external-graphic src=url('$data.getImage(1)') width=31.16mm height=45mm scaling=uniform
AW: FOP in production app
I use FOP on the client side. The application (not applet) offers templates for different kinds of documents e.g. invitations, advertisements etc. The user can enter text and choose from an image list (remote db and local files) and the app produces a pdf. In my case it was better to use fop on the client side because the images are rather big and once used are saved on the clients hard disk. So every subsequent use of the same template and pictures takes place on the client side with no further downloading. So far everything works fine with fop. But I can't tell you much about big documents because I only have single page documents. And there are only images and texts, so fop is sufficient for my needs. Compared to the prize of xep, I think fop is the library of choice. Alex -Ursprüngliche Nachricht- Von: Van Camp, Kenneth (Exchange) [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 12. März 2003 14:56 An: '[EMAIL PROTECTED]' Betreff: RE: FOP in production app I saw a number of posted responses to David's query but it seems like most respondents are using FOP on the server side. Is there much experience in using FOP on the client side, say inside of an applet? I am interested in streaming XSLT to the user's browser and having an applet transform it into a PDF, then invoke Acrobat reader to render it on the desktop. Is this a common application? It is related to this thread in that I am concerned about production support in such an environment. Is there a better way? Thanks. Ken Van Camp [EMAIL PROTECTED] -Original Message- From: Holk, David A [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 12:37 PM To: '[EMAIL PROTECTED]' Subject: FOP in production app Is anyone using FOP in a production app? Should I expect a commercial product like XEP or XSLFormatter to be more robust in a production application? Any experiences/comments appreciated. David Holk LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. *** - 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]
xsl:fo to svg rendering with raster images
I tried to render my fo files to svg, which works fine for text. But none of the external images makes it to the svg file. Batik can produce image tags with links to external images. Is this a limitation in fop? (producing a pdf with the same fo file works fine). Regards Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: security exception with font metrics creation - OBSOLETE
Ok, the problem's source is somewhere else. It just looked like it had something to do with the metrics creation. -Ursprüngliche Nachricht- Von: Alexander Koppelhuber [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 06. Februar 2003 00:56 An: FOP Betreff: security exception with font metrics creation I tried to create a font metrics file from a true type font and got the following exception: This font contains no embedding license restrictions java.lang.SecurityException: class org.apache.fop.fo.Unknown$Maker's signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:568) at java.lang.ClassLoader.defineClass(ClassLoader.java:496) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) What does this mean? Where's the problem when the font contains no license restrictions? Any ideas? Regards, Alex - 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]
security exception with font metrics creation
I tried to create a font metrics file from a true type font and got the following exception: This font contains no embedding license restrictions java.lang.SecurityException: class org.apache.fop.fo.Unknown$Maker's signer information does not match signer information of other classes in the same package at java.lang.ClassLoader.checkCerts(ClassLoader.java:568) at java.lang.ClassLoader.defineClass(ClassLoader.java:496) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:250) at java.net.URLClassLoader.access$100(URLClassLoader.java:54) at java.net.URLClassLoader$1.run(URLClassLoader.java:193) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:186) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) What does this mean? Where's the problem when the font contains no license restrictions? Any ideas? Regards, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Previewer
I'm using the AWTRenderer the following way to produce a preview image in a JPanel. public void renderToImage(byte []foFile,ImagePanel panel) { try { driver.setInputSource(new InputSource(new ByteArrayInputStream(foFile))); URL url = getClass().getResource(/org/apache/fop/viewer/resources/messages.en); AWTRenderer renderer = new AWTRenderer(new SecureResourceBundle(url.openStream())); renderer.setComponent(panel); driver.setRenderer(renderer); String baseDir = file:///+ResourcePool.getInstance().getImageDirectory().getAbsolutePath()+ /; Configuration.put(baseDir, baseDir); driver.run(); panel.setImage(renderer.getLastRenderedPage()); panel.repaint(); } catch (FileNotFoundException fnfex) {fnfex.printStackTrace();} catch (IOException ioex) {ioex.printStackTrace();} catch (FOPException fopex) {fopex.printStackTrace();} } ImagePanel is a simple JPanel that displays a (Buffered)Image in its paint() method. Alex -Ursprüngliche Nachricht- Von: alex elsholz [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 31. Dezember 2002 12:49 An: [EMAIL PROTECTED] Betreff: Previewer Hi, whats the reason placing the report on a frame and not on a panel? i think here should be a panel and a controller-class for this. because some developer want use the previewer on a dialog, some other in a internal frame ... mfg alex -- +++ GMX - Mail, Messaging more http://www.gmx.net +++ NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen! - 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]
AW: AW: Reuse of fo-tree
Well, it was probably a bad guess, but within my app it works perfactly well. The first rendering to AWT is a little bit slow. But all subsequent renderings (also to pdf) are much faster. Maybe using Velocity uses a lot of the part where I fill the fo:xml file with dynamic content the first time, but all in all everything works perfectly well, considering my very old system, being a P2 350. A combination of Axis, fop, velocity, tomcat and jTDS (to get a connection to ms sql server) works without any big problems, and considerably fast. -Ursprungliche Nachricht- Von: J.Pietschmann [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 03. Dezember 2002 22:22 An: [EMAIL PROTECTED] Betreff: Re: AW: Reuse of fo-tree Alexander Koppelhuber wrote: I don't have an answer to your question, but my observation with fop is that subsequent rendering is much faster than the first one. Even if you change the content (texts, images). And also if you render to AWT first, and then to pdf. So I guess that reuse of a fop tree or caching is done internally. Bad guess. Except for the caching images bit, it is most likely the effect of HotSpot kicking in. The FO tree is completely discarded after rendering. 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]
AW: Reuse of fo-tree
I don't have an answer to your question, but my observation with fop is that subsequent rendering is much faster than the first one. Even if you change the content (texts, images). And also if you render to AWT first, and then to pdf. So I guess that reuse of a fop tree or caching is done internally. -Ursprngliche Nachricht-Von: Henrik Olsson [mailto:[EMAIL PROTECTED]Gesendet: Dienstag, 03. Dezember 2002 11:36An: [EMAIL PROTECTED]Betreff: Reuse of fo-treeHi, are there any possibility to reuse a fo-tree in the fop and run it throw more then one renderer? For example I want a printout PCL or PostSript and then I want to store a pdf in an archive, since the document can be quite big I dont want to rebild the tree more than once. /Henrik Olsson
AWTRenderer/progressListener
Q1: AWTRenderer does not call its progressListeners methods. So I guess that this feature is no implemented yet. Will it be included in the next release, or do I have to rely on the logging messages (because its not part of the Renderer interface anyway)? Are the logging messages the only way to get information about the progress? Q2: I'm using AWTRenderer to produce a preview image before rendering to a pdf file, because I could not find a good (and cheap) java pdf viewer. And both, adobe pdf and jpedal, were not able to load and display all pdf files correctly. Is there some other solution to produce preview images? I'm not very satisfied with the rendering quality of the fonts when using AWTRenderer. Regards, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Landscape format
Simply set page-height and page-width to the right values. (or just switch the values) The following part gives you a DIN A4 page in landscape. fo:layout-master-set fo:simple-page-master master-name=basic page page-height=210mm page-width=297mm margin-top=0cm margin-bottom=0cm margin-left=0mm margin-right=0mm fo:region-body margin-top=0cm margin-right=5mm/ !--fo:region-after extent=2cm/ -- /fo:simple-page-master /fo:layout-master-set -Ursprungliche Nachricht- Von: Sylvie Picouet [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 29. November 2002 18:18 An: '[EMAIL PROTECTED]' Betreff: Landscape format How is it possible to get some pages of a pdf document in the landscape format ? Thanks for your help. Sylvie. - 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]
AW: Landscape format
Take a look at this tutorial: http://www.renderx.com/Tests/doc/fo/tutorial.pdf Chapter 6 contains some explanation and examples for page layouts. Should help you with your problem, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
automatic image scaling
In my fo file I have the following part: fo:block-container width=118mm height=502px top=107mm position=absolute fo:block fo:external-graphic src=url('../img/martina.jpg') content-height=auto content-width=auto/ /fo:block /fo:block-container With this settings of the block-container everything works fine. The image is larger in width an gets scaled correctly. However, if I change the height parameter of the container to my desired value no image will be rendered. The image is slightly larger than the needed size of the container. It seems that automatic scaling of an image only works if the height of the block container is the exact height of the image. Other combinations (block.width = img.width + block.heightimg.height || block.height/block.height img.width/img.height) don't work, and no image gets rendered. Any workarounds for this bug (if it is one)? This is not a big problem but a litte bit annoying, because part of the fo file gets generated by my application (different images can be used with varying size). Regards, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: automatic image scaling
if block-container.height = img.height and block-container.width img.width then the image gets scaled to the width of the block-containter (gets smaller); if bloc-container.height = img.height and block-container.width = img.width then the image gets rendered according to the image size (no scaling is done) if bloc-container.height img.height then no image is rendered no matter which values are used for width content-width and content-height do not have any effect at all I hope that this behaviour isn't just coincidence. -Ursprüngliche Nachricht- Von: Keiron Liddle [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 27. November 2002 15:31 An: [EMAIL PROTECTED] Betreff: Re: automatic image scaling On Wed, 2002-11-27 at 15:11, Alexander Koppelhuber wrote: In my fo file I have the following part: fo:block-container width=118mm height=502px top=107mm position=absolute fo:block fo:external-graphic src=url('../img/martina.jpg') content-height=auto content-width=auto/ /fo:block /fo:block-container IIRC the content-width and content-height of auto means that it should use the width and height of the image. It does not have an relation to the surrounding block, that would be width=100% and height=100% I think. These things are not currently implemented. With this settings of the block-container everything works fine. The image is larger in width an gets scaled correctly. However, if I change the height parameter of the container to my desired value no image will be rendered. The image is slightly larger than the needed size of the container. It seems that automatic scaling of an image only works if the height of the block container is the exact height of the image. Other combinations (block.width = img.width + block.heightimg.height || block.height/block.height img.width/img.height) don't work, and no image gets rendered. Any workarounds for this bug (if it is one)? I suspect that if it does not fit, ie. smaller than the block-container, it will not display anything. Can you simply make the block-container larger so it will fit all images. If there is scaling happening then I'm not sure exactly what attributes are making it work. If you want all images to be the same size can you set the width and height attributes to a pt value and will that work? This is not a big problem but a litte bit annoying, because part of the fo file gets generated by my application (different images can be used with varying size). Regards, Alex - 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]