Rotating External-Graphic
Hello World, I actually create a XSL:FO file an are now facing a little problem. Many thanks in advance, if you could help me with this. I have many EPS graphic files to include in the document. Because of the dimension of the pages, the EPS files need to be rotated. I see two possibilities to do this: A) Rotating the EPS graphics inside the XSL:FO -- is there any attribute to do this in fo:external-graphic or any other higher element? I have not found any yet. B) Rotating the EPS graphics with an image editor... This would be o.k. for me because I need the files only once. Does anybody of you know an image editor that can rotate EPS files within a batch-job? I tried ACDsee and Freehand trials. ACDsee can rotate multiple images at the same time, but cannot handle with EPS. Freehand can rotate EPS, but not as a macro or batch. Do you have any ideas? There are too many EPS to rotate them manually. Thank you very much and hava a nice day Ralph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with transformation
Thank you very much for the hint and the google phrase, that solved it. Johan Andersson J.Pietschmann wrote: Johan Andersson wrote: I'm trying to transform the XML snippet below to a FO table with a width of 3 columns. The list contain a maximum of 9 elements. Each cell should contain an image and its description. I would appreciate any advice on how to implement such a transformation. XSLT questions usually get better responses on the XSL list http://www.mulberrytech.com/xsl/xsl-list/ You problem is actualy a FAQ, the soution is called grouping by position (google for details). Hint: xsl:template match=list fo:table ... ... column decl ... fo:table-body xsl:apply-templates select= list-label[position() mod 3=1]/ /fo:table-body /fo:table /xsl:template xsl:template match=list-label fo:table-row xsl:for-each select=.|following-sibling::list-label [position()3] fo:table-cell fo:block fo:external-graphics src=./ /fo:block fo:block xsl:apply-templates select=following-sibling:: list-text[1]/ /fo:block /fo:table-cell /xsl:for-each fo:table-row ... 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: FW: OutOfMemoryError by large tables: Alternative solution?
Thanks to the input from the honorable fop-user's and the posting http://www.biglist.com/lists/xsl-list/archives/200212/msg00917.html I managed to put something together. To make the thread complete here is the Perl script to generate the XML (again, you might has to change the first line of table.pl (#!/usr/local/bin/perl)) and a XSL stylesheet generating multiple page sequences. The pages are numbered, I was suprised that the numbering works without tampering the initial-page-number... Regards, Anders Malmborg --- table.pl - #!/usr/local/bin/perl use strict; if ($#ARGV != 0) { die Usage $0 positions \n; } open POS, table.xml or die $!; print POS '?xml version=1.0 encoding=UTF-8 ?'.\n; print POS table\n; for (my $i = 0;$i $ARGV[0];$i++) { print POS posnr$i/nrdescPosition$i/desc/pos\n; } print POS /table\n; close POS; - --- table.xsl - ?xml version=1.0? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:variable name=pos_in_set select='20'/ xsl:template match=table fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=A4-Portrait page-width=210mm page-height=297mm margin-top=1.2cm margin-bottom=1cm margin-left=1cm margin-right=1cm fo:region-body margin-top=2cm margin-bottom=2cm/ fo:region-after extent=2cm/ /fo:simple-page-master fo:page-sequence-master master-name=repA4 fo:repeatable-page-master-reference master-reference=A4-Portrait/ /fo:page-sequence-master /fo:layout-master-set xsl:for-each select=pos[position() mod $pos_in_set = 1] fo:page-sequence master-reference=repA4 font-family=Helvetica font-size=8pt fo:static-content flow-name=xsl-region-after font-family=Helvetica font-size=8pt font-weight=normal text-align=right fo:block font-size=8pt Seite fo:page-number / /fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:table table-layout=fixed text-align=right fo:table-column column-width=50mm/ fo:table-column column-width=50mm/ fo:table-body xsl:for-each select=.|following::pos[position() lt; $pos_in_set] xsl:apply-templates select=./ /xsl:for-each /fo:table-body /fo:table /fo:flow /fo:page-sequence /xsl:for-each /fo:root /xsl:template xsl:template match=pos fo:table-row fo:table-cell fo:block xsl:value-of select=./nr/ /fo:block /fo:table-cell fo:table-cell fo:block xsl:value-of select=./desc/ /fo:block /fo:table-cell /fo:table-row /xsl:template /xsl:stylesheet - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with transformation
Thank you for your comments regarding the structure of my XML snippet. The orignal XML document is actually formated as you suggest. I don't know why I missed that when I wrote the question, have to blame it on the fact that it was friday. ;-) Johan Andersson Zaleski, Matthew (M.E.) wrote: This question seems to fall into an XSLT category rather than XSL-FO. One comment I would make is that the structure of your XML is weak. If picture1 and description1 belong together, the xml should indicate that. You could add a another layer like this list list-item list-labelpicture1.eps/list-label list-textdescription1/list-text /list-item list-item list-labelpicture2.eps/list-label list-textdescription2/list-text /list-item /list Or you could make 'label' or 'text' an attribute of the other. I don't know the details of your problem domain so you would have to make the determination. If your xml format is locked, then you need to look at using the sibling axis in Xpath to get some association between the labels and the text. That question belongs in an XSLT list though. -Original Message- From: Johan Andersson [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 4:06 AM To: Apache FOP Mailinglist Subject: Problem with transformation Hi all, I'm trying to transform the XML snippet below to a FO table with a width of 3 columns. The list contain a maximum of 9 elements. Each cell should contain an image and its description. I would appreciate any advice on how to implement such a transformation. snippet ... list list-labelpicture1.eps/list-label list-textdescription/list-text list-labelpicture2.eps/list-label list-textdescription/list-text list-labelpicture3.eps/list-label list-textdescription/list-text list-labelpicture4.eps/list-label list-textdescription/list-text ... /list ... /snippet Regards, Johan Andersson - 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: What XSLT and XSL-FO editor do you use?
Roger wrote: Do you know of any good wysiwyg editor for FO, and one that allows you to edit or import the code? I don't expect Dreamweaver quality. Other good tools are also welcome. XMLSpy works fine to create an XSD, but I've seen a lot of tools out there, so I'm wondering what your experiences are, what tips you have. I have given up on Altova too. Currently I use Emacs with nxml-mode and the RenderX RELAX files for XSL-FO. This does not give wysiwyg, but it helps a lot getting the FO-file right, and then run a FO-previewer like FOP from a shell occasionaly to see what you are doing. The feeling of this is a lot like writing in LaTeX (or WordPerfect for oldtimers:) -- Thorbjoern Ravn Andersen ...plus...Tubular Bells! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What XSLT and XSL-FO editor do you use?
Xmlspy is good -Original Message- From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 4:49 PM To: [EMAIL PROTECTED] Subject: Re: What XSLT and XSL-FO editor do you use? Roger wrote: Do you know of any good wysiwyg editor for FO, and one that allows you to edit or import the code? I don't expect Dreamweaver quality. Other good tools are also welcome. XMLSpy works fine to create an XSD, but I've seen a lot of tools out there, so I'm wondering what your experiences are, what tips you have. I have given up on Altova too. Currently I use Emacs with nxml-mode and the RenderX RELAX files for XSL-FO. This does not give wysiwyg, but it helps a lot getting the FO-file right, and then run a FO-previewer like FOP from a shell occasionaly to see what you are doing. The feeling of this is a lot like writing in LaTeX (or WordPerfect for oldtimers:) -- Thorbjoern Ravn Andersen ...plus...Tubular Bells! - 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]
Error in output to PostScript
Hi all, Im trying to render a PostScript file with FOP. But i get the following error : [DEBUG] rendering areas to PostScript [INFO] [1] [DEBUG] Last page-sequence produced 1 pages. [INFO] [2] [ERROR] PostScript Command exceeded limit of 255 characters org.apacge.fop.apps.FOPException: PostScript command exceeded limit of 255 characters Ive used the same .fo to render a .pdf of 4 pages, no problem with that. Why do i get this error in generating a .ps ? Regards, Renzo Callant
RE: What XSLT and XSL-FO editor do you use?
Title: RE: What XSLT and XSL-FO editor do you use? Hello all: I have tried the following editors: 1) Altova: I found this editor the least user friendly of the bunch. It does not offer a true WYSIWYG environment. Once you get your head around how to actually works, you can develop stylesheet with it. Be prepared to work at it though. I was a little concerned with the use of the for-each in the stylesheet it produced. (please note: I have yet to try Altova latest release, stylevision. My comments are in reference to the stylesheet editor that came bundled with XMLSpy 2003 Enterprise Edition). I could create standards compliant XSL stylesheet and deploy them with out any issues. The stylesheet you produce does not contain any proprietary information/tags. 2)Inventive Designers Scriptura: Nice WYSIWYG editor, written in java, so platform independent. Quite intuitive and easy to use. Currently (ver 3.0) Creates proprietary stylesheets that can only really be used in their formatting objects processor. The issue is they offer all kinds of bells and whistles within the editing which can prove to be extremely handy. The issues is you can not really use the designed stylesheet with FOP. They are about 2 versions behind on the xalan they use, consequently the name space references...especially when it comes to java get royally screwed up when you try and use the stylesheet in FOP. The motto here is you have to design...test... see what breaks, redesign...test...see what breaks, redesign...test...see what breaks... Then go in and manually change the name space declarations. Get the point. 3)Antenna House XSLTemplate Designer Of the XSLFormatter fame, Antenna house has decided to offer it's clients a designer. One problem The stylesheet produced will only work with AH's XSLFormatter... You can not export the stylesheet to be used with other formatters. Try as I might, my conversation proved fruitless with them, I tried to point out that it might be important to developers to have the option to deploy the stylesheet on a machine running a formatter other than XSLFormatter... No dice So for the purposes of this forum.. They are out. 4)XSLFast Nice WYSIWYG editor, written in java, so platform independent (sound familiar). XSLFast has fixed some of the annoyances they had in their earlier versions... They are the only editor on the market, as far as I can tell, that does not have an agenda of promoting a particular formatting engine (Scriptura, or antenna house). I liked using it. It is written in swing, so it can be a little sluggish in responding at times. I was able to develop a stylesheet and deploy it to my application using FOP with out any compatibility issues. It has some nice touches, such as offering a call out to an external stylesheet. The table tool is still a little counter intuitive, but over all a step forward for them. 5)by hand baby. The reality is I use oXygen 4.0, my Ken Holman books, Zvon, and a whole lot of blood and sweat. I try an approach the stylesheet development the same way I approach my java programming. Creating reusable objects ( in this case templates) Importing and reusing where I can. My two cents: Rob -Original Message- From: Clay Leeds [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 16, 2004 10:16 AM To: [EMAIL PROTECTED] Subject: Re: What XSLT and XSL-FO editor do you use? The only XSL-FO editors I'm aware of are listed on the FOP Resources page[1]. This discussion recently came up on this list, so if you check the archives, you might find something which leads to something. Please report back what works best for you, so the FOP community can benefit from your experience. Web Maestro Clay [1] http://xml.apache.org/fop/resources.html#products-editors On Jun 16, 2004, at 5:56 AM, Roger wrote: I'm wondering what editors you use to create your XSD, XSLT and XSL-FO documents. At the moment I'm using a trial version of Altova XMLSPY and Stylevision. XMLSpy is meant to create the xsd, and sample xml-data-documents. Stylevision is meant for the FO and XSLT templates. XMLSpy is okay as far as I can see, but Stylevision has one big drawback: you can't edit the code in it. It only has a wysiwyg editor, which works quite okay, but not always like I want it. Now I merely use it to create a quick-start template, and then edit in jEdit. With the proper plugins installed, jEdit works really nice. My problem is that I cannot get the new code back into Stylevision. At the Altova website they try to present this as a feature, but of course it's not. Do you know of any good wysiwyg editor for FO, and one that allows you to edit or import the code? I don't expect Dreamweaver quality. Other good tools are also welcome. XMLSpy works fine to create an XSD, but I've seen a lot of tools out there, so I'm wondering what your experiences are, what tips you have. Roger
Re: Rotating External-Graphic
Three ideas: 1. Create a small PostScript program that embeds an EPS file and rotates it as desired. Then run the PS program through GhostScript and use the EPS writer. This can easily be automated with script languages and a minimum of programming knowhow. 2. Requires some programming knowledge: You could write a small program that rewrites the EPS files (they're text and easy to parse) to appear rotated. 3. Maybe there are some EPS to SVG converters that you could use. SVG can easily be rotated inside an SVG wrapper. On 21.06.2004 09:58:42 Ralph Goebel wrote: Hello World, I actually create a XSL:FO file an are now facing a little problem. Many thanks in advance, if you could help me with this. I have many EPS graphic files to include in the document. Because of the dimension of the pages, the EPS files need to be rotated. I see two possibilities to do this: A) Rotating the EPS graphics inside the XSL:FO -- is there any attribute to do this in fo:external-graphic or any other higher element? I have not found any yet. B) Rotating the EPS graphics with an image editor... This would be o.k. for me because I need the files only once. Does anybody of you know an image editor that can rotate EPS files within a batch-job? I tried ACDsee and Freehand trials. ACDsee can rotate multiple images at the same time, but cannot handle with EPS. Freehand can rotate EPS, but not as a macro or batch. Do you have any ideas? There are too many EPS to rotate them manually. Thank you very much and hava a nice day Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error in output to PostScript
Uh oh. My fault. You hit a bug. This happens in org.apache.fop.render.ps.PSStream.java. I think I read somewhere that a single line of PostScript code shouldn't contain more than 256 characters. That's probably why I wrote that check. But unfortunately, I can't find the reference anymore. A work-around is to fetch the FOP 0.20.5 sources, remove the check from PSStream.java and recompile the whole thing. If your PostScript RIP doesn't choke on lines longer than 256 characters you've won. If that doesn't work, we need to find out why this happened. In this case you'd have to send an XSL-FO document that reproduces the bug. One immediate way to narrow down the search: Use -d on the FOP command line and send the stacktrace. But it probably won't be enough. On 21.06.2004 16:04:19 Renzo Callant wrote: I'm trying to render a PostScript file with FOP. But i get the following error : ... [DEBUG] rendering areas to PostScript [INFO] [1] [DEBUG] Last page-sequence produced 1 pages. [INFO] [2] [ERROR] PostScript Command exceeded limit of 255 characters org.apacge.fop.apps.FOPException: PostScript command exceeded limit of 255 characters ... I've used the same .fo to render a .pdf of 4 pages, no problem with that. Why do i get this error in generating a .ps ? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fop and fonts in embeded svg graphics?
thanxs, you're right: strokesvgtext is the key. with strokeSVGText=true the text will be rendered as graphic instead of text. exact what i wanted. my fault, i tought both versions (windows and unix) were the same... markus Jeremias Maerki wrote: Are your userconfig.xml files the same? This sounds like a difference in the strokeSVGText (http://xml.apache.org/fop/configuration.html#svg-strokeSVGText) config entry. Also, since this happens in an SVG/Batik context this may be due to differences between the Windows und Linux font subsystems. Try using a different font just to see if this changes anything. On 20.06.2004 11:33:11 [EMAIL PROTECTED] wrote: in my xsl-fo file i have embeded serveral svg-graphics. in this graphics i use svg:text font-family=monospace to print out a monospaced/courier like font. i get two different results with fop under linux and windows. with the windows-version the text is graphic i can't edit with the touchup-tool in acrobat. the font-dialog in acrobat also doesn't know anything about that monospaced font. when i run the linux-version of fop i can edit the svg-text in acrobat and the fontdialog says that Courier is embeded... what is wrong? i want to use svg-graphic-text so that the text can't be changed that easy in the pdf-document... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]