Re: Pronunciation
I pronounce it the latter way (as a single syllable). I think that, if one were being strict, it should be three syllables, as one would do with other acronyms. With FOP, though, it amuses me to conflate the acronym with the term for a dandy (see http://en.wikipedia.org/wiki/Fop). Such are the perils of a Master's degree in English Literature Jay Bryant -- From: foretopman [EMAIL PROTECTED] Sent: Saturday, November 15, 2008 1:36 PM To: fop-users@xmlgraphics.apache.org Subject: Pronunciation Here's a silly question: how do you pronounce FOP? Is it three syllables, eff-oh-pee; or is it one syllable, /fahp/ or something like that? -- View this message in context: http://www.nabble.com/Pronunciation-tp20518780p20518780.html Sent from the FOP - Users mailing list archive at Nabble.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]
Re: Out of bounds exception
Those details matter sometimes but not this time. This time, your problem comes from templates that don't properly handle the input. That'll blow up on any OS and any version of FOP (or any other FO processor). In other words, you had an XSL error rather than a FOP or OS error. It is a good idea to provide those details, though. And step up to the latest version! The gang has put in a lot of good work on the 0.9x versions. They'd love to see you using them, and you're missing something (improved efficiency and scaling) by not upgrading. Yes, I know you're stuck with the version built into the tools you have, but when you get the chance J - Original Message - From: Sheldon Glickler [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Monday, November 10, 2008 5:39 PM Subject: Re: Out of bounds exception Sheldon Glickler wrote: How do you track down an ArrayIndexOutOfBoundsException. I have attached the xsl and xml file. Forgot to mention that this is for version .20 and I am running it on Windows (XP). - 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: Once again I need a little more help please.
I followed Jay Bryant's advice and structured my xsl file according to his example. I got it to work well, but in saving things I overwrote what I had done. I recreated it -- almost. I now have a few questions; Glad it worked for you as far as it did. I have attached the xsl and xml tags. They generate what I am now asking about. Viewing the output at 100%: 1 - How do I fill the backgrounds of the cells of the third line (the last header line). Put the background-color attribute on the table-cell element rather than on the block element. 2 - How can I get the borders top join? Look at the line between the last header line and the first business unit header line. Also, between the other lines. the intent here is for the borders to be with 1pt of .5pt. Borders are amazingly tricksy beasts. First off, to really get them to render correctly, you need to throw out the idea of border-collapse. Then you have two choices: Control each border (left, right, top, bottom) for each cell individually or set them all to the same values (width, color, and style). Thus, a simple way to get all the borders in a table to be 1pt wide is to set both the table's border and each cell's border to be .5pt wide. They'll all be adjacent when rendered, and you'll get 1pt borders. If you want something more complicated (some cells have borders while others don't or all the outside borders are double while the inners are solid), you should set each border (left, right, etc.) individually. To that end, I've moved all your border attributes to table-cells, so that table and block no longer have border attributes. 3 - Why doesn't the border show when cells are empty in the data area? Actually, it did (I zoomed in to 400% to be sure. However, because the block in the cell had no content, the height of the block was 0, so you had a top border and a bottom border and nothing in between them. Consequently, the block rendered such that it looked like a thick line. To fix this (and other issues), I removed the borders from blocks and put them on the cells. As a rule of thumb, define borders at the cell level and not at the block level. You should generally only put a border on a block if it's a stand-alone block (not in a table). There are exceptions, but, until you've strengthened your XSL-FO muscle some more, I suggest keeping things simple. 4 - Why does it look like the vertical borders on the last line extend beyond the bottom of the line? I'm not seeing that, but I've seen it in other documents. If it's what I think it is, it's a rendering error in Acrobat Reader. Try zooming to different levels and seeing if the problem persists. If it does, you've got work to do. If not, it's a well-known (and much-loathed) quirk of Acrobat Reader. It just occurred to me that you may mean Why does the border stick out to the left and right relative to the cells that don't have borders. That's the nature of borders. The cell has its space, and the border has a space around the cell's space. So, if one cell has no border and the next cell down does have a border, the bordered cell appears to stick out. Take a peek at http://www.w3.org/TR/2001/REC-xsl-20011015/slice4.html#area-intro to see what's happening. To fix those issues, either be consistent about your borders (everything has a border or everything doesn't), use just top and bottom borders, or set the border color of borderless cells to the cell's background color. Also, fo:table doesn't have a line-height attribute, so I put that on the blocks. I have attached the modified XSLT file. I am off to a movie, so I can't show you exactly how to control the borders individually right now. I hope these changes help you, though. Jay Bryant ?xml version=1.0? xsl:stylesheet version=2.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:template match=print-compliance xsl:processing-instruction name=cocoon-formattype=text/xslfo /xsl:processing-instruction fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=compliance-form margin-top=50pt margin-bottom=50pt margin-left=15pt margin-right=20pt page-height=8.5in page-width=11in fo:region-body margin-bottom=1pt/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=compliance-form fo:flow flow-name=xsl-region-body xsl:apply-templates select=header / xsl:apply-templates select=business_units / /fo:flow /fo:page-sequence /fo:root /xsl:template xsl:template match=header fo:table table-layout=fixed space-before=0pt border-style=none xsl:variable name=product_list select=product_list / fo:table-column column-width={fullwidth}/ fo:table-body fo:table-row
Re: Once again I need a little more help please.
again for your tremendous help. I'm happy to do it. XSL (both T and FO) is a great language, and FOP is a great tool. I'm glad to see another person using both. Jay Bryant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Once again I need a little more help please.
1 - I am using number-columns-spanned in order to use the same template with sub-section headings and totals. I use the parameter merge. For the sub-titles, I give it a value of 13 (all the columns). For the sub-section totals, I give the first one a value of 5, followed by eight cells with a value of 1. It all worked, but I get one blank for the number of columns spanned and one blank for the background color. I isolated it to the following in the xml file: bu_line bu_item valueTRACKING SALES/value alignstart/align borderlinesolid .5pt/borderline fontweightnormal/fontweight fontsize6pt/fontsize colorblack/color merge13/merge bg_color#99/bg_color /bu_item /bu_line If I remove that block, then there are no errors. In the xsl, it uses those keys for every line in the business bu_tiem section, with no additional errors. I'm stumped. It works, but it isn't clean. Without seeing your XSL for this bit, it's hard to provide a for-sure answer. My initial thought is that you're not checking for the existence I am posting the files. No, I don't do the checking, but this is the only bu_line that gives a problem and they all go through the same code. I ran the files through Saxon 9 and FOP .95 and didn't see the issue you mention. The Trackwork Sales line came out fine. I added the bu_line element mentioned earlier in your message (the Tracking Sales one) and still didn't get a problem. It's possible that the issue arises because of whichever XSLT processor you're using or the version of FOP you have. It's also possible that you fixed the issue while fixing some other issue. Let me know if it keeps biting you and I'll try to look more deeply. Thank you for being so exceedingly helpful. Now my REAL effort begins. I have to do a log of php coding in order to gather the data and generate the xml files that use this xsl file. You're welcome. I'm that lucky fellow who actually enjoys his job, so doing a little weekend programming to help someone out is no problem. I know what you mean about the real work. For me, it's Java and SQL (with XML- and CSV-based metadata defining things) that do all the heavy lifting. Much as I love XSL, it's just the tail end of a much larger and much more complex process. Jay Bryant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I need a little more help please.
Hi, Sheldon, Since this is a purely XSLT issue, you'd get more (and possibly more-on-target) responses on the XSL list: http://www.mulberrytech.com/xsl/xsl-list/ It's not that we FOP-lovers hate XSLT - just the opposite, in fact. It's just that XSLT isn't the focus of this list. When I run your transform, I get elements from the headerline part of the transform. For one run, I added a static attribute to each table being created by that for-each instruction, thus: fo:table table-layout=fixed border-collapse=collapse space-before=0pt id={count(preceding-sibling::headerline)} I got these two table start lines: fo:table table-layout=fixed border-collapse=collapse space-before=0pt id=0 fo:table table-layout=fixed border-collapse=collapse space-before=0pt id=1 So your transform is finding the headerline elements. However, when I ran the transform, I did not get any content for the rows (that is, I got no cell elements in the row elements). That was because your XML has hdr_itm elements, but your XSLT was looking for hdr_item elements (not the extra e) - probably a typo. I corrected that and have attached the file as t.xsl. I also made a greatly modified version in which I ditched all the variables (except product_list, since I assume you're going to write a nodeset into that one and then use it later) and ditched the for-eaches to use templates instead. I avoid variables that do nothing more than hold a reference to a node. I also use templates wherever I can. I find that both of those practices make a transform easier to read and thus easier to maintain. Also, the modified transform is 1000 bytes smaller than the original (a sign that it's ultimately simpler). I attached that file as t_jb.xsl. (And yes, it's a slow evening, though my favorite of the two teams is winning the game right now.) If you wish to ignore the arrogant know-it-all and just use your original file, use t.xsl. If you want to try it my way, use t_jb.xsl. I know you've got much more to do in this transform and that you can't just substitute files, but I'm sure you get the idea. Let me know (preferably on list, as others may have the same questions someday) if you need more help. Happy programming. Jay Bryant - Original Message - From: Sheldon Glickler [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Monday, October 13, 2008 6:03 PM Subject: I need a little more help please. I have reduced my xsl to a minimum so that I can generated data to write an xml. I can't find why my two headerlines are not appearing. (I have reduced this example to as small as I can). I have included the files. ?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:template match=print-compliance xsl:processing-instruction name=cocoon-formattype=text/xslfo/xsl:processing-instruction fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=compliance-form margin-top=50pt margin-bottom=50pt margin-left=15pt margin-right=20pt page-height=8.5in page-width=11in fo:region-body margin-bottom=1pt/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=compliance-form fo:flow flow-name=xsl-region-body xsl:apply-templates select=header / /fo:flow /fo:page-sequence /fo:root /xsl:template xsl:template match=header fo:table table-layout=fixed border-collapse=collapse space-before=0pt border-style=none xsl:variable name=product_list select=product_list / xsl:variable name=title_bg_color select=title_bg_color / xsl:variable name=color select=color / xsl:variable name=linespace select=linespace / xsl:variable name=fullwidth select=fullwidth / xsl:variable name=fontsize select=fontsize / xsl:variable name=fontweight select=fontweight / xsl:variable name=border select=border / fo:table-column column-width={$fullwidth}/ fo:table-body fo:table-row fo:table-cell background-color={$title_bg_color} fo:block text-align=center wrap-option=no-wrap font-size={$fontsize} line-height={$linespace} font-weight={$fontweight} color={$color} border={$border} xsl:value-of select=report_name/ /fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table xsl:for-each select=headerline fo:table table-layout=fixed border-collapse=collapse space-before=0pt xsl:variable name=border select=border / xsl:variable name=fontweight select=fontweight / xsl:variable name=linespace select=linespace / xsl:variable name=wrap select=wrap / xsl:for-each select=colsize xsl:variable name=width select=value / fo:table-column column
Re: Using CHOOSE to control image in region-body
And BTW if send-fax is not a direct child of the node you're processing but a remote descendant, you should write my condition with an axe: xsl:if test=count(//send-fax) = 0 That will count every instance of send-fax in the whole document. To count descendants of the current node named send-fax to any depth, use count(.//send-fax). ./send-fax is the same as just send-fax because the child axis (represented by .) is the default axis. However, // starts at the document root unless it's preceded by an axis specifier. Conseqently, you don't need the . (or the /) in ./send-fax, but you do need it in .//send-fax. Jay Bryant - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using CHOOSE to control image in region-body
Hi, Jeff, I whipped up a small test to show how to solve your problem. Here's the contents of the (very simple) input XML file: test send-faxY/send-fax /test Here's the (also very simple XSL file): ?xml version=1.0 encoding=UTF-8 standalone=yes? xsl:stylesheet version=2.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:template match=test xsl:choose xsl:when test=send-fax = 'Y' xsl:messageFound it/xsl:message /xsl:when xsl:otherwise xsl:messageNo joy/xsl:message /xsl:otherwise /xsl:choose /xsl:template /xsl:stylesheet When I run that XML file against that XSL file, I get found it on my command line. I bet you can extrapolate from there how to get the XSL-FO content you want. If not, let me know and I'll try to help further. HTH Jay Bryant - Original Message - From: Steffanina, Jeff [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Tuesday, October 07, 2008 1:54 PM Subject: Using CHOOSE to control image in region-body FOP 0.95 / Redhat Linux / Java 1.5 When the tag send-fax does not exist print the lilly, when send-fax=Y, print the pebble. I always get the Lilly. Can you determine why? xsl:choose xsl:when test=./send-fax='Y' !-- region-before means region before the body(top 1/3 of folio -- fo:region-before extent=3.0in background-repeat=no-repeat margin-top=.5in background-image=url('java/images/Pebble.jpg') background-position-vertical=bottom display-align=after / /xsl:when xsl:otherwise fo:region-before extent=3.0in background-repeat=no-repeat margin-top=.5in background-image=url('java/images/Lilly.jpg') background-position-vertical=bottom display-align=after / /xsl:otherwise /xsl:choose Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: blocks flowing from left to right?
That sure looks like a table, Lou. You know enough about document design to realize that, too, so I'm guessing there's some other factor that makes you think a table isn't a good fit. Are the blocks irregular in size or something like that? Or is it that you can't get a table to have different backgrounds and borders on each cell? I know you can get different borders on each cell (I've been doing that), but I haven't tinkered with backgrounds. FOP 0.95 is available, by the way. Perhaps it contains a change that would help. J - Original Message - From: [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, August 14, 2008 11:16 AM Subject: blocks flowing from left to right? I have a requirement of a report to print several blocks aligned from left to right and then top to bottom. These blocks will contain two blocks that align top to bottom. So, it looks something like this: BLOCK1 BLOCK2 BLOCK3 DATA1DATA2DATA3 The blocks also need to have custom widths, borders and background colors. So far, I have not been able to implement this layout with inlines or blocks. Does anyone have any suggestions? FOP 0.94, JDK 1.5 -Lou - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: blocks flowing from left to right?
Hi, Lou, I see now. I think you've hit your best choice with the table-per-row notion. It's not ideal, but it has the virtue of getting the job done. J - Original Message - From: [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, August 14, 2008 1:54 PM Subject: Re: blocks flowing from left to right? J: Oops, I left out a big part of it (and why a table won't work): Each block could be a different width. This makes it tough to lay out in a standard table. I guess I could make each row a table unto itself, but I was hoping I missed something. My updated (and better example) looks like this: BLOCK1 BLOCK2 BLOCK3 DATA1 DATA2 DATA3 BLOCK4VERYWIDE BL5 BLOCK6 DATA_6 XXX DATA6 BLOCK7NOMORE DATA 7 It's pretty ugly, but it is a custom document for a client and this is the way they want it. BTW, cell background colors work great. Jay Bryant [EMAIL PROTECTED] 08/14/2008 01:50 PM Please respond to fop-users@xmlgraphics.apache.org To fop-users@xmlgraphics.apache.org cc Subject Re: blocks flowing from left to right? That sure looks like a table, Lou. You know enough about document design to realize that, too, so I'm guessing there's some other factor that makes you think a table isn't a good fit. Are the blocks irregular in size or something like that? Or is it that you can't get a table to have different backgrounds and borders on each cell? I know you can get different borders on each cell (I've been doing that), but I haven't tinkered with backgrounds. FOP 0.95 is available, by the way. Perhaps it contains a change that would help. J - Original Message - From: [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, August 14, 2008 11:16 AM Subject: blocks flowing from left to right? I have a requirement of a report to print several blocks aligned from left to right and then top to bottom. These blocks will contain two blocks that align top to bottom. So, it looks something like this: BLOCK1 BLOCK2 BLOCK3 DATA1DATA2DATA3 The blocks also need to have custom widths, borders and background colors. So far, I have not been able to implement this layout with inlines or blocks. Does anyone have any suggestions? FOP 0.94, JDK 1.5 -Lou - 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: How to underline a graphic
I would try setting the bottom border on the fo:block, thus: fo:block border-bottom=1pt solid blackText and graphic here/fo:block Jay Bryant - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: fop-users@xmlgraphics.apache.org Sent: Monday, April 21, 2008 8:32 AM Subject: How to underline a graphic Hello, I insert a little graphic in an underlined text but it is not underlined. fo:block text-decoration=underline Text is underlined fo:external-graphic src=logo.png content-height=1.5em/ but not graphic. /fo:block I think it is normal because I find nothing in the W3C specification to underline fo:external-graphic. (fo:inline / fo:page-number / fo:page-number-citation / fo:character can be underlined but fo:leader / fo:external-graphic can not) But can somebody give me a way to have the same rendering as an underlined graphic ? Thanks, Patrice - 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: FOP 0.94 - Unkown Error
Hi, Bones, Usually, when I see java.lang.NullPointerException at org.apache.fop.layoutmgr.table.RowPainter.addAreasAndFlushRow(RowPain ter.java:149) it's because the number of cells I put in the row doesn't match the number of column definitions. Take a look at your FO, count cells, and see if they match. Also, remember that spans in FO require that the cell being spanned not be present, so check your spans, too. HTH Jay Bryant Bryant Communication Services http://www.bryantcs.com/ - Original Message - From: bonekrusher [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, March 13, 2008 12:43 PM Subject: FOP 0.94 - Unkown Error Hi, I am in the process up grading from 0.20.5 to FOP 0.94 - As I upgrade I am able to fix common errors when upgrading, however I recieved the following error and I am not sure how to interupt it. SEVERE: Exception java.lang.NullPointerException at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) at org.apache.fop.cli.Main.startFOP(Main.java:166) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.fop.cli.Main.startFOPWithDynamicClasspath(Main.java:132) at org.apache.fop.cli.Main.main(Main.java:199) - java.lang.NullPointerException at org.apache.fop.layoutmgr.table.RowPainter.addAreasAndFlushRow(RowPain ter.java:149) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.iterateAndPa intPositions(TableContentLayoutManager.java:757) at org.apache.fop.layoutmgr.table.TableContentLayoutManager.addAreas(Tab leContentLayoutManager.java:689) at org.apache.fop.layoutmgr.table.TableLayoutManager.addAreas(TableLayou tManager.java:334) at org.apache.fop.layoutmgr.BlockLayoutManager.addAreas(BlockLayoutManag er.java:393) at org.apache.fop.layoutmgr.AreaAdditionUtil.addAreas(AreaAdditionUtil.j ava:118) at org.apache.fop.layoutmgr.FlowLayoutManager.addAreas(FlowLayoutManager .java:297) at org.apache.fop.layoutmgr.PageBreaker.addAreas(PageBreaker.java:241) at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.jav a:507) at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.jav a:370) at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:262) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav a:345) at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.jav a:263) at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(Pag eSequenceLayoutManager.java:144) at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.j ava:233) at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java :145) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilde r.java:378) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194) at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(Trans formerIdentityImpl.java:1101) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source ) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow n Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent Dispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un known Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.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.TransformerIdentityImpl.transform(Transf ormerIdentityImpl.java:484) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115) at org.apache.fop.cli.Main.startFOP(Main.java:166) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.fop.cli.Main.startFOPWithDynamicClasspath(Main.java:132) at org.apache.fop.cli.Main.main(Main.java:199) Thanks in advance. Bones -- View this message in context: http://www.nabble.com/FOP-0.94---Unkown-Error-tp16033191p16033191.html Sent from the FOP - Users mailing list archive at Nabble.com
Re: FOP 0.20.5 - Tables with intelligent cell-widths
Hi, I just read that there is no automatic table layout in FOP yet. And in FOP 0.20.5 there is the limitation that cell-withs must explicitly be defined. Is there any work-around for page-wide tables to adjust cell-widths according to the included text length? thanks, Roman Hi, Roman, In times past, I've solved this problem by doing calculations in XSLT while creating the table. Here's a link to my solution from another thread: http://marc.info/?l=fop-userm=112732887606348w=2 HTH Jay Bryant Bryant Communication Services http://www.bryantcs.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: fo:simple-page-master is missing child elements
? means 0 or 1 (so optional, yes) + means 1 or more (required and may repeat) * means 0 or more (optional and may repeat) (no mark) means just 1 (required and may not repeat) Jay Bryant Bryant Communication Services http://www.bryantcs.com/ - Original Message - From: Fournier,Danny [NCR] [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Monday, March 03, 2008 12:08 PM Subject: RE: fo:simple-page-master is missing child elements Thanks Andreas. Everything worked in 0.20.5 so I assumed that it would still work in 0.94. What is the suffix appended to the order of the fields? I've seend ?, which I assume mean optional. What about + ? DF -Original Message- From: Andreas Delmelle [mailto:[EMAIL PROTECTED] Sent: March 3, 2008 12:38 PM To: fop-users@xmlgraphics.apache.org Subject: Re: fo:simple-page-master is missing child elements On Mar 3, 2008, at 18:09, Fournier,Danny [NCR] wrote: Hi Here is the rendered XSL-FO: snip / I get the following message: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: Error(Unknown location): fo:simple-page-master is missing child elements. Required Content Model: (region-body, region-before?, region-after?, region-start?, region-end?) In both cases I have a region-body child specified. Yes, but in the second case, the regions are not specified in the prescribed order (see the error message). I vaguely remember something about the type of validation (loose, strict?) in the setup of the FOP call - could this be my answer? No, the best way to avoid the error is move the region-body to the first position. HTH! Andreas - 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: Any approach for nearly identical pages.
Hi! I'm generating 2 pages. They're nearly identical. The only difference between them is the subtitle: original on the first, and copy on the second page. Is there some special approach for such cases, when only little part of the text change between the pages? -- nwp From the FO point of view, you have to create two pages. However, if you're creating your FO from some kind of application, you can set up the page and a paramater to hold the value that differs and then call the page creator twice with different values for the parameter. That'll work in XSLT with a named template or in C++ or Java with a method. HTH Jay Bryant Bryant Communication Services http://www.bryantcs.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sequence of pages
Dear All. Could you please tell me is there any way to make document which number of pages you can not predict and have one layout for all pages and the second layout for last three pages. I was looking through tones of examples how to use different layouts for different pages but could not find that I need. Is it possible to do using fo at all? Thank you very much for your help. Hi, Tatiyana, Depending on what you're doing, it may be possible. Assuming your data is being transformed from XML, you could write a transform to pour all the data from one element (and all of its children) into one page sequence and pour all the data from another element into another page sequence. I do that all the time, when I pour the contents of chapter elements into individual page sequences that all use the same page master and then pour the front matter, index, and appendixes into page sequences that all use different page masters. If you provide more detail about the data your trying to turn into a document, we can probably help you get where you're going. Jay Bryant Bryant Communication Services http://www.bryantcs.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sequence of pages
Thank you, Jay. Yes, I am transforming the data from one huge XML file. Did I understand you correctly? I need to put all XML-data that I use for all pages in one parent and XML-data for last three pages to the second parent and then use two different sequences for different page-masters? Something like this?: fo:layout-master-set fo:simple-page-master master-name=firstPage page-height=27.8cm page-width=21.5cm margin-bottom=0.5cm margin-top=1.5cm margin-left=2cm margin-right=2cm fo:region-body margin-bottom=0.5cm/ fo:region-after extent=1cm/ /fo:simple-page-master fo:simple-page-master master-name=summaryPage page-height=21.5cm page-width=27.8cm margin-bottom=0.5cm margin-top=1.5cm margin-left=2cm margin-right=2cm fo:region-before extent=1cm/ fo:region-after extent=1cm/ fo:region-start extent=1cm/ fo:region-end extent=1cm/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=firstPage fo:static-content flow-name=xsl-region-after fo:block text-align=center fo:page-number / /fo:block /fo:static-content fo:flow flow-name=xsl-region-body xsl:apply-templates select=report/ /fo:flow /fo:page-sequence fo:page-sequence master-reference=summaryPage fo:static-content flow-name=xsl-region-after fo:block text-align=center fo:page-number / /fo:block /fo:static-content fo:flow flow-name=xsl-region-body xsl:apply-templates select=report1/ /fo:flow /fo:page-sequence /fo:root /xsl:template Hi, Tatiyana, Exactly. Then the rest of your templates can create the necessary FO elements within the two different page masters and you're all set. I'm glad you figured it out. Let us know if you need any more help. Jay Bryant Bryant Communication Services http://www.bryantcs.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making serialization documents in FOP
I'm creating java servlet for making PDF file from xml and xslt files. It's possible making documents with 1000 pages or more ? How many memory i must have in my server to do this ? How long take generate this file ? I've created a system that makes 2,000-page documents with FOP. Those documents had only one image (a logo on the cover) and consisted entirely of tables that described the contents of databases. I've also created a system that makes more complex documents that exceed 700 pages. Those are software user guides that include images, tables, lists (bulleted and numbered), very deep levels of nesting (think list within table within list), and all the other fun things that technical writers will do to a document when you tell them the system can handle anything. So far, it has handled everything they throw at it. The machines running those processes (they are at two different companies) have 1GB of RAM (and I configured Java to use all of it), and both processes run in just about two minutes. Both of those processes are triggered by users calling Ant build files (either from Eclipse or from the command line), but I'm sure they'd run on a server (though it might need 2GB RAM instead of 1GB). You'd just have to train your users to not hit the Back button for two or three minutes. So, it's possible, but it depends on the things Jeremias mentioned, with layout complexity being the biggest factor in my experience. The less FOP has to keep in memory before it can write objects to the PDF file, the larger document you can build. Jay Bryant Bryant Communication Services http://www.bryantcs.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to supress page breaks between bullet and text?
I have some bulleted items that consist solely of a gif file. Fop is inserting page breaks between the bullet and the gif file. How may I suppress this in my XSLT? In the case that I have a paragraph of text, I would want it to break after the first line of text. Hi, Siegfried, Try putting the image and text into two different cells in a one-row table and setting keep-together=always on the row. FOP eats memory when it creates tables, which may be a problem in a very large document. However, this trick works for most documents. I've used it in documents that are hundreds of pages long (think software manuals with lots of images and tables). HTH Jay Bryant Bryant Communication Services http://www.bryantcs.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.93: Java Heap Space OutOfMemory
An interesting bit of synchronicity, Lou - one of my clients does the same thing. For every client who wants the whole thing, I think there's about three who use the simple format. Both use FOP to produce a PDF, but the results and processing times are very different. Often, negotiating with your end users (explaining the situation and offering some choices) both gets one out of a tough box and gives the users some choices they like. FWIW Jay Bryant Bryant Communication Services - Original Message - From: [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Wednesday, July 11, 2007 1:12 PM Subject: Re: FOP 0.93: Java Heap Space OutOfMemory We also have a memory issue due to very large page sequences. One thing we do is offer the customer two report outputs: PDF and something called PDF Simple. PDF is the regular report that has a single page sequence and can consume a lot of memory. The simple output is the same report, but we break the page sequences every n number if lines. It does result in some half populated pages, but the memory and speed improvement make it worth it to our customers. -Lou Andreas L Delmelle [EMAIL PROTECTED] wrote on 07/11/2007 01:09:29 PM: On Jul 11, 2007, at 08:21, Daniel Noll wrote: Hi Daniel On Tuesday 10 July 2007 02:32:30 Andreas L Delmelle wrote: Not really. It's a matter of using common sense, I guess... Putting all content together inside one and the same page-sequence is bound to get you in trouble. Is there an alternative for situations where the content comes from elsewhere? Problem is it's not trivial to determine where to break the page sequence. If it breaks in the middle of a page, then you end up with half a page of fail. I know... The source XML has to have some logical boundaries/groups at which you can start a new page-sequence, otherwise this tip is useless. Currently there is no alternative, I'm afraid (unless you consider / not/ using FOP an option...) Cheers Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: word page break
Hi, Pardha, I've done lots of work with WordML, so I can get you started on this one. Insert - Page Break produces the following element in Word's XML output (in the paragraph's text run): w:br w:type=page/ When you do it from the paragraph properties, you get the following element (in the pPr element for the paragraph): w:pageBreakBefore/ So, to catch them both, you need corresponding templates, thus: xsl:template match=w:pageBreakBefore !-- Do whatever you do with page breaks here -- /xsl:template xsl:template match=w:[EMAIL PROTECTED]:type='page'] !-- Do whatever you do with page breaks here -- /xsl:template If you do the same thing with the two kinds of breaks, you can process them in the same template, thus: xsl:template match=w:pageBreakBefore|w:[EMAIL PROTECTED]:type='page'] !-- Do whatever you do with page breaks here -- /xsl:template HTH Jay Bryant Bryant Communication Services - Original Message - From: Pardha Paruchuri To: fop-users@xmlgraphics.apache.org Sent: Monday, April 02, 2007 12:56 PM Subject: word page break Hi All, I am using FOP 0.20.5 to convert a WordML document into PDF. As there are 2 types of pagebreaks in word, one the hard/soft page break(from menu insert-page break) and two the pagebreakbefore property on a paragraph(highlight a paragraph and right click to see properties), I see that it is able to convert a pagebreakbefore but not the hard page break. I am just using a stylesheet that microsoft recommends to convert WordML into XML-FO and I could not figure out where we can make a change in the stylesheet to fix this issue. As I am new to XSL and understand that this may not be a FOP problem but could someone give me a clue as to why it is not able to convert a hard page break. Thanks, Pardha -- Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.
Re: Out Of Memory Error
Out Of Memory ErrorI routinely make much larger files (600+ pages with lots of images, so 6+ MB filesize). Try the items mentioned in the following link: http://xmlgraphics.apache.org/fop/0.93/running.html#memory I have also used FOP to make PDF files of more than 2,000 pages, but those didn't have images (they were data catalogs for a data warehouse). Jay Bryant Bryant Communication Services - Original Message - From: [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Tuesday, February 06, 2007 4:54 PM Subject: Out Of Memory Error Hello All, I am trying to convert a huge XML document(approx about 110 pages long, 777KB) into a pdf document using an FO transformation. But it gives me the following error. Exception in thread main java.lang.OutOfMemoryError Can anybody guide me as to what is going wrong? Is there a limit on the size of the document that can be transformed?If so , can it be increased? Thanks, Sindhu Email Firewall made the following annotations - --- NOTICE --- This message is for the designated recipient only and may contain confidential, privileged or proprietary information. If you have received it in error, please notify the sender immediately and delete the original and any copy or printout. Unintended recipients are prohibited from making any other use of this e-mail. Although we have taken reasonable precautions to ensure no viruses are present in this e-mail, we accept no liability for any loss or damage arising from the use of this e-mail or attachments, or for any delay or errors or omissions in the contents which result from e-mail transmission. -
Re: block-container and margin/padding properties
Hello I need a table with cells of equal sizes. It is important, that if the text is too big for a cell, that the text gets cropped, so the cell ddoesn't grow. For this I've introduced block-containers, for which I define a height plus set overflow=hidden. I also define a margin, as I want to have a certain space between the edge of the cell and the content(text). This system nearly works, except that on the left and on the right side of the block-container there is a space outside the block container plus the same amount of space on the inside of the block-container, while on top and bottom there is just space outside of the block-container (as I had wished). In short: margins on the left and right side get duplicated (see diagrams below). I admit that I have a very limited understanding of the border/margin/space properties in general, but I have tried out so many things now, and have tried to find reference, and nothing seems to work. I appreciate help, even if you just point me to a good reference. ---DIAGRAMS-- diagramm: outer border = edge of table-cell, inner border = border of block-container/block My goal:(space between border and text on side and top should be equal ___ | ___ | | |xxx| | | |xxx| | | |___| | |___| What I get: (space around blockcontainer gets repeated on the inside-left and inside-right) ___ | ___ | | | x | | | | x | | | |___| | |___| - fo:table table-layout=fixed width=100% keep-together.within-page=always break-before=page fo:table-column column-number=1 column-width={$paperwidth} div 2/ fo:table-column column-number=2 column-width={$paperwidth} div 2/ fo:table-body fo:table-row fo:table-cell column-number=1 border-style=none border-width=1pt overflow=hidden fo:block-container overflow=hidden height={$Papierhoehe} div 4 margin={$card-margin} fo:block text-align=left Paul doesn't know xsl very well... poor fella! /fo:block /fo:block-container /fo:table-cell ... Hi, Paul Just as a work-around, you can specify all four margins and divide the left and right margins by 2, thus: fo:block-container overflow=hidden height={$Papierhoehe} div 4 margin-top={$card-margin} margin-bottom={$card-margin} margin-left={$card-margin div 2} margin-right={$card-margin div 2} Jay Bryant Bryant Communication Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP 0.93 - PDF Bookmarks
Hi, Andrea, fop.extensions=1 makes me think you are using DocBook. If so, use fop1.extensions=1. fop.extensions corresponds to version 0.20.5, while fop1.extensions corresponds to the current effort (currently at version 0.93). Jay Bryant Bryant Communication Services - Original Message - From: offi83 [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Monday, January 08, 2007 4:15 AM Subject: FOP 0.93 - PDF Bookmarks I upgraded my FOP installation today and after a bit of work with my xsl-stylesheets nearly everything works fine. My only problem is the generation of the pdf-bookmarks. I've read about the new bookmark feature the developers integrated in FOP 0.93, but I don't really know how to use it. All I want is to create Bookmarks like done in FOP 0.20.5 by simply setting fop.extensions=1. I would be very happy if someone would poste an example of how to generate bookmarks with the new FOP release. CU Andrea Offermann -- View this message in context: http://www.nabble.com/FOP-0.93---PDF-Bookmarks-tf2938422.html#a8215315 Sent from the FOP - Users mailing list archive at Nabble.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]
Re: Question to Repository
I downloaded and built from the SVN source this week, and it all worked fine for me. What troubles are you having? Jay Bryant Bryant Communication Services - Original Message - From: Kris Wolff [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Tuesday, December 12, 2006 7:33 PM Subject: Question to Repository Hi, the HEAD from Repository, should it work? (0.92) I have a lot of trouble... Thanx Kris - 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: Width issue
Do you mean that you want to spread the 31 columns into more than one row in the output and then separate each set of output rows with a horizontal bar? If so, look at fo:leader. Here's an example: fo:blockfo:leader xsl:use-attribute-sets=headerleader//fo:block And here's the attribute set that controls the leader's appearance: xsl:attribute-set name=headerleader xsl:attribute name=leader-patternrule/xsl:attribute xsl:attribute name=rule-styledouble/xsl:attribute xsl:attribute name=rule-thickness3.0pt/xsl:attribute xsl:attribute name=leader-length10.5in/xsl:attribute xsl:attribute name=space-before.optimum0pt/xsl:attribute xsl:attribute name=space-after.optimum24pt/xsl:attribute xsl:attribute name=colorblack/xsl:attribute /xsl:attribute-set (In case you wonder about the length, it was for a report that was printed landscape on 8.5x11in paper and had quarter-inch margins.) HTH Jay Bryant Bryant Communication Services - Original Message - From: [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, December 07, 2006 10:58 PM Subject: Width issue Hi, I need generate pdf report having 31 columns. Since size of pdf is confined all the 31 columns are not visible in the same line. Is there anything horizontal bar in pdf so, that I can over come the above issue? Please help me in this regard. Thanks and Regards Bhaskar K S Associate Consultant - Investment Banking i-flex solutions limited - Bangalore i-flex center, Kundalahalli Tel. Office: 91-80-66596589 e-mail: [EMAIL PROTECTED]
Breezin' in to say thanks
I was going 'round and 'round on getting fonts to register when calling FOP from Ant, and then I found Jeremias's mention that he'd fixed the Ant task and his link to the relevant file in SVN. So I rebuilt FOP (0.92beta) and got my fonts. Yay! Thanks, Jeremias! Thanks to that change (which overcame our last stumbling block), yet another client is going to have a document production system that uses FOP to produce books. (And this client has a fine sense of document design, too, so the books look good. When they put one of the books on their web site, I'll post a link, to serve as a real-world example.) Anyway, thanks again, not just to Jeremias but to all of you who work on FOP. Jay Bryant Bryant Communication Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bug in table rendering (version 0.92beta)
Hi, all, I think I found a bug in table rendering. Consider the following simple FO file: ?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=simple 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/ fo:region-before extent=1in/ fo:region-after extent=1in/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=simple fo:flow flow-name=xsl-region-body fo:table border-left-style=solid border-style=solid border-width=0.5pt border-color=black table-layout=fixed width=100% fo:table-column column-width=1in/ fo:table-column column-width=6in/ fo:table-body fo:table-row fo:table-cell border-style=solid border-width=0.5pt border-color=black fo:blockfo:inline font-style=italicItalics/fo:inline/fo:block /fo:table-cell fo:table-cell border-style=solid border-width=0.5pt border-color=black fo:blockItalics represent placeholders in commands and options for context-sensitive values like file names, device types and names, numeric values, etc. Chapter and section names are italicized when referenced in the text as well./fo:block /fo:table-cell /fo:table-row fo:table-row fo:table-cell border-style=solid border-width=0.5pt border-color=black fo:block fo:blockfo:inline font-family=monospaceCourier/fo:inline/fo:block /fo:block /fo:table-cell fo:table-cell border-style=solid border-width=0.5pt border-color=black fo:block fo:blockCourier is used for literal commands and options, and output from the computer./fo:block /fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:flow /fo:page-sequence /fo:root When rendered to PDF, the table border stops at the margin, but the cell (both text and border) continues to the width of the table cell (which extends beyond the margin). The result is a line through the text at the page margin and incorrectly thin lines. The problem can be solved by ensuring that the column widths do not add up to more than the width of the page minus its margins. I've done that for my client in XSLT. The OpenOffice source we're converting to DocBook had some tables that were wider than the page minus its margins, so I forced the last column to fit the margin. Consequently, the problem isn't a show-stopper. However, it seems to me that theres' a bug here. I think FOP should either stop both the table boundary and the cell boundary at the margin or let both go to the width specified by the total of the column widths, even if that violates the margin. (I would prefer the latter.) Other than that, FOP 0.92beta is working fine for my newest client (so far, anyway - we're not done with all the customizations yet). Thanks Jay Bryant Bryant Communication Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to make directives look better? Customizing/defining elements and formatting...
Hi, Dan, That's either not DocBook or it's a customization of it. You can achieve the same look by writing a transform that turns those elements into standard Docbook and then styling the DocBook output accordingly. For now, remember that DocBook contains content. You'll do the styling when you run the DocBook XSL stylesheets to generate FO content for FOP. So, once you have the content in DocBook, you want to look at customizing the styling layer. THE book on the subject is Bob Stayton's DocBook XSL. Keep asking questions and showing us your code. Jay Bryant Bryant Communication Services - Original Message - From: Dan Carwin [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Wednesday, October 18, 2006 6:28 PM Subject: RE: How to make directives look better? Customizing/defining elements and formatting... Thanks again Jay, I'm not currently using anything custom, just the basic set of pre-defined DocBook elements available in the DocBook editor I'm using. Because I am just using these basic tags, my doc looks basic and not polished. When I looked at the Apache docs I saw many element tags in use like directivesynopsis which are not available to me and I wondered where they came from and how I could make use of them to make my doc more readable (and convert to PDF better as well.) I have not written any custom transforms yet. Here's what I use to define a directive: Example of my directive definition using basic elements: table frame=box rules=all captionFTPPASVaddr/caption col align=center span=1 / thead tr align=center thDirective/th thFTPPASVaddr/th /tr /thead tbody tr thDescription/th tdThis directive allows you to specify a different IP address to be sent on replies to codePASV/code requests. You will find this useful when the Covalent Enterprise FTP Server is behind a firewall./td /tr tr thSyntax/th tdcodeFTPPASVaddr IP address/code/td /tr tr thExample/th tdcodeFTPPASVaddr 64.84.21.111/code/td /tr tr thContext/th tdServer Config, Virtual Host/td /tr tr thNote/th tdThis directive is *not* inherited from the global configuration file./td /tr /tbody /table Here's what an ASF directive definition looks like: === directivesynopsis nameBS2000Account/name descriptionDefine the non-privileged account on BS2000 machines/description syntaxBS2000Account varaccount/var/syntax contextlistcontextserver config/context/contextlist modulelistmoduleperchild/modulemoduleprefork/module/modulelis t compatibilityOnly available for BS2000 machines/compatibility usage pThe directiveBS2000Account/directive directive is available for BS2000 hosts only. It must be used to define the account number for the non-privileged apache server user (which was configured using the directive module=mpm_commonUser/directive directive). This is required by the BS2000 POSIX subsystem (to change the underlying BS2000 task environment by performing a sub-LOGON) to prevent CGI scripts from accessing resources of the privileged account which started the server, usually codeSYSROOT/code./p notetitleNote/title pOnly one codeBS2000Account/code directive can be used./p /note /usage seealsoa href=../platform/ebcdic.htmlApache EBCDIC port/a/seealso /directivesynopsis fyi my first link is to an ASF doc page, and my second link is to a static jpg. Thanks, Dan -Original Message- From: Jay Bryant [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 18, 2006 4:14 PM To: fop-users@xmlgraphics.apache.org Subject: Re: How to make directives look better? Customizing/defining elements and formatting... Hi, Dan, You don't need to add formatting objects for FOP to handle (and that's a bad idea anyway). The thing to do is to write a transform that produces the necessary formatting objects. It sounds like you did that and are having trouble adjusting the layout to suit your needs. From what you say, your string-breaking issue is the heart of the problem. Try posting a sample of your problem, so that folks on the list can look at what you're trying to do and make concrete suggestions. IMHO, it's better to paste small but complete examples into the body of the message than it is to attach files or links. I don't know how other folks work, but I generally ignore attachments and links, even though I have anti-virus
Re: Ending a row and starting a new one.
Hi, Patrick, Before I show one possible solution, let me suggest that you subscribe to Mulberry's XSL List [1] and ask this question there. Also, avoid disable-output-escaping like the plague; it's bad practice. Ask the list or look at Dave Pawson's FAQ [2] for why. If you always want two rows, your problem is fairly easy to solve. First, use your recursive template to write all the cells into a variable, thus: xsl:variable name=cells xsl:call-template name=your-template/ /xsl:variable Then you can put the first half into one row and the second half into another, thus: xsl:variable name=halfway select=count($cells) div 2/ fo:table-row xsl:copy-of select=$cells[position() lt; $halfway + 1/ /fo:table-row fo:table-row xsl:copy-of select=$cells[position() gt; $halfway/ /fo:table-row You may need to fiddle with this some to get it to work, but it's one solution. The real fun comes when you have a variable number of columns, but that can be solved, too. For now, I'll assume you have the simple version of the problem. [1] http://www.mulberrytech.com/xsl/xsl-list/ [2] http://www.dpawson.co.uk/xsl/index.html Jay Bryant Bryant Communication Services - Original Message - From: Patrick [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, August 10, 2006 9:43 AM Subject: Ending a row and starting a new one. (I apologize if this is a duplicate message, but my first one does not appearing to have been posted.) I have a table that I need help with. These are the steps that I need to do. 1. Start a row. 2. Add the first cell which will span multiple rows based on how many rows of data are needed. 3. Add a cell for each of the data elements. For every fifth cell, I want to start a new row. 4. End the last row. If this is my data: my_xml value1/value value2/value value3/value value4/value value5/value value6/value value7/value value8/value value9/value value10/value /my_xml This is how I want my row to look: fo:table-row fo:table-cell number-rows-spanned=2My Data/fo:table-cell fo:table-cell1/fo:table-cell fo:table-cell2/fo:table-cell fo:table-cell3/fo:table-cell fo:table-cell4/fo:table-cell fo:table-cell5/fo:table-cell /fo:table-row fo:table-row fo:table-cell6/fo:table-cell fo:table-cell7/fo:table-cell fo:table-cell8/fo:table-cell fo:table-cell9/fo:table-cell fo:table-cell10/fo:table-cell /fo:table-row I know how to do everything except how to end the old row and start a new one. I have a recursive xsl template that I'm calling to add each cell for the data. I can figure out whether the cell I'm on needs to start a new row. I've done this before to generate HTML using something like xsl:text disable-output-escaping=yeslt;/trgt;lt;fo:trgt;/xsl:text, but that doesn't work going directly from XSL to FO to PDF. I guess it would work if I went from XSL to FO, reparsed the FO, then went to PDF, but I was hoping I could do this all in one step. I hope I'm making sense here. This is difficult to explain. - 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: Ending a row and starting a new one.
Hi, Patrick, I use XSLT 2.0 all the time, so I assume that everyone does. My bad. You can use XSLT 2.0 with FOP, thus: 1. Use your XSLT 2.0 processor to create an FO file. 2. Then feed the FO file to FOP. For example, suppose you use Saxon 8 (as I do) for for your XLST processor and that it's installed off the root directory. Then you'd get two command lines that look like this: java -jar \saxon\saxon8.jar -o myfile.fo myinput.xml something-to-fo.xsl fop myfile.fo myfile.pdf That combination would turn myinput.xml into myfile.pdf. I have a whole pile of batch files and Ant tasks to run that process on all kinds of input files. HTH Jay Bryant Bryant Communication Services - Original Message - From: Patrick [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, August 10, 2006 1:23 PM Subject: Re: Ending a row and starting a new one. I'm trying to follow your suggestion, but this is where I'm stuck: xsl:variable name=cells xsl:call-template name=your-template/ /xsl:variable The variable cells contains the correct data as returned by my template but not as a node-set, so I can't act on it as such. I ran into this before when I was trying to get something else to work. I think the problem may be that I'm using XSLT 1.0/XPath 1.0. If I have to use 2.0, will that work with Apache FOP 0.20.5? Thanks. - 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: User Types
When I first started using FOP, I was a technical writer (often called technical author in places where they speak the Queen's rather than the President's English). I was fed up with both Word and FrameMaker, so I implemented an XML-based documentation system, which included FOP. I no longer write. Instead, I spend all of my time setting up similar systems for various clients. So, I guess I have been two kinds of users: a technical writer (or technical author, if you prefer) and a consulting developer. I am also aware of companies (Intel, for one) that have developers dedicated to document production (though they also work on authoring tools and content management). FWIW Jay Bryant Bryant Communication Services - Original Message - From: [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Wednesday, August 09, 2006 9:40 AM Subject: User Types I'd be interested to know what types of people are using the FOP engine to generate documents. Could you indicate whether your setup has a dedicated programmer, or team of programmers, individual author, technical author etc. Does the same person who writes the content setup your FOP transformations. thanks Andy R -- This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com http://www.opensubscriber.com/messages/fop-users@xmlgraphics.apache.org/topic.html - 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: User Types
That sounds a lot like what I'm doing for my current client, Glen. I love Ant. Jay Bryant Bryant Communication Services - Original Message - From: Glen Mazza [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Wednesday, August 09, 2006 11:50 AM Subject: Re: User Types We use XSL/XSLT for reports and for Docbook. Docbook: Tech Writer creates the XML documents that will be fed through the Docbook stylesheets. Uses Eclipse WTP for this. The developer creates an Ant script that automates all of the tech writer's doc generation and publishing-to-web-server tasks so the writer only needs to know how to call Ant tasks from the script for these chores. (Over time, our tech writer has also learned to modify and add new tasks in.) Docbook Maintenance: Tech Writer enters the documentation changes (after getting information from developers) and republishes them via Ant scripts. XSL/XSLT Reports: Very nice separation of data from presentation chores. Developer first defines the input format of the XML document that will have the report's data. The tech writer creates the stylesheet that will layout the report, usually leveraging previously created stylesheets, and also creates sample XML documents with dummy data for testing the stylesheets. Tech writer also maintains any header stylesheets that will be imported by multiple document stylesheets. Developer creates the SQL, SAX Event generation, etc. that generate the XML document. For a non-programming tech writer, XSLT coding presents a pleasantly not-very-steep but continuous learning curve--simple stuff can be done without any training at all (i.e., change the title in an already existing document from FOO to BAR -- anyone with a text editor can S R on FOO to do this without needing to know a thing about XSLT) with more complex tasks (XSLT templates and functions and the like) gradually added in over time. XSL/XSLT Reports Maintenance: Tech Writer is responsible for making stylesheet/reports look nice and presentation/layout change requests, developer is responsible for bringing in new/different data elements from the SQL, as well as overall maintenance of the web application. The main thing when doing Docbook and XSL/XSLT in production, especially with non-programming employees is: Ant, Ant, Ant! Keep everything automated and defined (classpaths, working directories, web servers to FTP to, etc.) within Ant and outside local IDEs/computer environment variables. (Among other benefits, if some developers prefer this IDE and others another IDE, it won't matter, because everything is configured within the Ant build file.) The second most important thing is CVS/SVN, CVS/SVN, CVS/SVN! Eclipse makes it easy to immediately commit new changes. Glen [EMAIL PROTECTED] wrote: I'd be interested to know what types of people are using the FOP engine to generate documents. Could you indicate whether your setup has a dedicated programmer, or team of programmers, individual author, technical author etc. Does the same person who writes the content setup your FOP transformations. thanks Andy R -- This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com http://www.opensubscriber.com/messages/fop-users@xmlgraphics.apache.org/top ic.html - 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: Commercial Documents
Yessir. I help my clients create systems that use FOP for commercial output. We've been hugely successful, producing books as large as 2,000 pages. My clients and their customers are very satisfied with FOP (though many of them don't even know FOP exists, since it works behind the scenes from their point of view). The cost of any software package is trivial next to the cost of development time (both writing and programming), so I can't say that using an open-source processor like FOP saves a lot of money. However, I can't sufficiently emphasize the value of the FOP community. I've never yet had an issue for which I didn't get help in a hurry. Generally, if I have a question, I post and get more than one helpful message within 24 hours (often much less). I never get that kind of support from any company, even though I paid for their product. Jay Bryant Bryant Communication Services - Original Message - From: [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, August 03, 2006 11:33 AM Subject: Commercial Documents Are people using FOP to generate pdf documents for commercial purposes? How successful has this been. What are the cost savings of this route? thanks Andy -- This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com http://www.opensubscriber.com/messages/fop-users@xmlgraphics.apache.org/topic.html - 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: Pretty cool stuff with Apache FOP
That's a very attractive poster. It'll make a nice sample to show what FOP can do. I know I can do similar work, but (at least so far) my clients want pretty simple documents (typical user manuals and reference books). One of these days Jay Bryant Bryant Communication Services - Original Message - From: Jeremias Maerki [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, July 13, 2006 10:27 AM Subject: Pretty cool stuff with Apache FOP Dominic Brügger from Puzzle ITC has created a very nice showcase for Apache FOP: The OSS Roadmap poster for /ch/open (an event agenda for open source events in Switzerland). The poster has been generated using FOP 0.92beta and has then gone into offset printing. I've received a hardcopy yesterday and it looks really cool. If you want to take a peek: http://www.ossroadmap.ch/poster/ossroadmap_2006-07-01_2006-12-31.pdf Good stuff, Dominic! Jeremias Maerki - 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: on the fly PDF creation from object array
I have the servlet working to create a PDF from an object list created from our database. I am writing the .xml to a file and them reading it back in which seems counterproductive. Is there a way to create the PDF on the fly without writing the xml to a file first. Thanks Calvn Write the results into an output stream. Then convert the output stream into an input stream and convert that into PDF. I wrote a servlet to take the output from Saxon and turn it into input for FOP. Here's the relevant chunk: // Here's where the output from Saxon becomes the input for FOP. ByteArrayOutputStream transformResult = transformXML(transform, source, req, res); if (transformResult.size() == 0) { res.getOutputStream().println(Transform produced no output); } else { ByteArrayInputStream transformStream = new ByteArrayInputStream(transformResult.toByteArray()); makePDF(transformStream, res); } HTH Jay Bryant Bryant Communication Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disappearing table-header
I need a sanity check. I just accept that I'm crazy. :D I'm formatting a number of tables using 0.91beta (but I get the same results in 0.92beta). When a single table extends to more than one page, the table-header appears on the subsequent pages but disappears from the first page of the table. If the table is confined to a single page, the header appears--if I lengthen that table to a second page by adding rows, the header disappears on the first page, but appears on the second page. The only thought that comes to mind is to check for the presence of attributes that may control the repeating of headers. I tried a second processor (XEP) and the tables behaved as expected. a) Is this an FOP bug? (Didn't find it in Bugzilla, though that could be me rather than an absence). Sounds like it could be a bug. Could you please post a sample FO file that is as small as possible but that still produces the problem? Then people like me can see if something like an attribute is causing the problem and the developers can see if it's a bug. Jay Bryant Bryant Communication Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pitney Bowes bar codes
In the United States, Pitney Bowes is for mailing solutions), what Xerox is for copying solutions. I believe they offer stamping, weighing and other post-related solutions. Judging by this page[1] POSTNET would be the primary barcode format used by Pitney Bowes. So the OP needs to identify all of the barcode formats and determine if the free and open source Barcode4J[2] (or some other utility) will meet the needs. [1] sample Pitney Bowes http://www.pbdmt.com/solutions/ClearScan.htm [2] Barcode4J http://barcode4j.krysalis.org/#Features Web Maestro Clay [EMAIL PROTECTED] My religion is simple. My religion is kindness. -- HH Dalai Lama of Tibet I've had Pitney Bowes as a client, so I can tell you that they do much more than mailing solutions. They also offer software for managing shipping and for integrating with one's shipping clients (which is how I bumped into them, when I worked in the EDI industry). Mailing is just one tentacle (though a big one) of that octopus. As for bar code formats, Pitney Bowes used to use industry-standard formats (specifically, I recall Code39), for which the various specifications are readily available. The question will be which formats they use. Mind you, my experience with them is eight years of out date. FWIW Jay Bryant Bryant Communication Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JBryant's XSLT 2.0 column width hack - odd results?
What do you want to have done differently? What do you find odd about the result? Jay Bryant Bryant Communication Services - Original Message - From: sono [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Wednesday, March 22, 2006 9:24 PM Subject: JBryant's XSLT 2.0 column width hack - odd results? Hello, i am a new user and being faced with the problem of outputting large tables, i ran into the table-layout=auto NYI trap, obviously. Now, i found JB's post from 21.09, and went ahead to reproduce the Method laid out. All worked fine; i'm getting the expected results; but the resulting PDF looks so odd i ran the original file from the post to check.. Same result. That's not really useable, so before i dig any further into this arcane XSLT i do not yet even fully grasp the meaning of, did anyone else go this way successfully? Is it even feasible? My output will span multiple pages and a dozen of columns.. What about performance? What's the golden way here? Spend thousands of dollars on XEP? (Not really an option...) Implement auto-layout? (Maybe i can convince myself to it.) Or will i be a happy camper if i go ahead and fix the XSLT, after fully understanding it? Any prior Experience would be welcome.. thanks in advance, ben -- View this message in context: http://www.nabble.com/JBryant%27s-XSLT-2.0-column-width-hack---odd-results--t1328163.html#a3545738 Sent from the FOP - Users forum at Nabble.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]
Re: concatenate output
You could use XSLT to do it. I don't have any examples, though. If your input is XML, I'd push the concatenation back a level and do it when you create the FO. Jay Bryant Bryant Communication Services - Original Message - From: Cam T To: FOP-Users Sent: Tuesday, March 21, 2006 10:25 PM Subject: concatenate output Hello Is it possible to concatentate multiple xml - fo outputs into one file and transformed to rtf or pdf? If so any examples. Any feedback much appreciated Thank you
Re: Java/POJO based FOP transformation (instead of XSL) like in JasperReports
I don't know of such a library (which doesn't mean one doesn't exist), but the concept is sound. All FOP needs is valid FO, regardless of how it's generated. Jay Bryant Bryant Communication Services - Original Message - From: Geoffrey De Smet [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, March 16, 2006 4:56 AM Subject: Java/POJO based FOP transformation (instead of XSL) like in JasperReports I've worked with both FOP and JasperReports and I really prefer the FO format over jasperreport's custom format. But Jasperreports allows to use Java/POJO based transformations, so I am wondering if this is possible in FOP. Basically the idea is to replace: - generate XML based on POJO - transform XML with XSL to FO - feed FOP the FO with - supply POJO to JSP without http which generates FO - feed FOP the FO Does anyone know an (open source?) library which can do something like: class Person { private String firstName; private String lastName; // getters and setters } ... jspWithoutHttp:valueObject name=personList class=java.util.ListPerson/ ... % for (Person person : personList) { % fo:block %= person.getFirstName% /fo:block fo:block %= person.getLastName% /fo:block % } % ... This should be usable in fat clients, webclients, ...: it is not bound to the HTTP protocol. -- With kind regards, Geoffrey De Smet - 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: Help with table-of-contents:don't understand ref-id attribute
My bad, Charles. I was thinking of the input file rather than the FO when I responded to your initial question. Sorry about the confusion. I would add the id attribute to the block (or table or whatever) that contains the content of the source-document node you want to reference. So, if I had a source document like this: doc heading value=Some Heading paraP1/para paraP2/para /heading /doc I'd use a template like this: xsl:template match=heading fo:block id={generate-id()}xsl:value-of select=@value//fo:block /xsl:template Then the ToC template would be something like: xsl:template match=heading mode=toc fo:block text-align-last=justify xsl:value-of select=@value/fo:leader leader-pattern=dots/fo:page-number-citation ref-id={generate-id()}/ /fo:block /xsl:template (Of course, both blocks would have many more attributes to specify formatting, which is why I love attribute-sets.) HTH Jay Bryant Bryant Communication Services - Original Message - From: [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Friday, March 03, 2006 1:49 PM Subject: RE: Re: Help with table-of-contents:don't understand ref-id attribute As you can see from my trimmed-down data model. I have no id attribute. That issue is what I thought I was asking about when you replied: It is certainly true that the value of ref-id can be an element rather than an attribute. So it appears that I misunderstand the question of what has to be pointed to by the ref-id attribute. I'm thinking that I should add an id attribute using generate-id() during the XSLT transform, but I can't figure out which element it should be added to. -- Charles Knell [EMAIL PROTECTED] - email -Original Message- From: Jay Bryant [EMAIL PROTECTED] Sent: Fri, 3 Mar 2006 13:36:16 -0600 To: fop-users@xmlgraphics.apache.org Subject: Re: Help with table-of-contents:don't understand ref-id attribute Hi, Charles, For ref-id to work, there has to be a corresponding id attribute somewhere. So, some other template should be creating something like fo:block id=TC_01Content here/fo:block Of course, you're probably doing that (no way to know from what I've seen so far). I'd check to make sure that whatever template is supposed to do that is doing the right thing. To do that, examine the FO file and see what shows up. HTH Jay Bryant Bryant Communication Services - Original Message - From: [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Friday, March 03, 2006 1:06 PM Subject: Re: Help with table-of-contents:don't understand ref-id attribute I'm back. Just when I thought it was safe to go back into the water (cue bass violin and muted trumpets); fop 0.20.5 is processing the XSL-FO document without complaint. I've still got some minor formatting issues to deal with, but I have one huge problem, no page numbers appear in the PDF file. Here is one of the relevant elements from the XSL-FO document's table of contents section: fo:block text-align-last=justify text-indent=-1em start-indent=1em fo:inline padding-start=1emTC_01fo:leader leader-pattern=dots/ fo:page-number-citation ref-id=TC_01/ /fo:inline /fo:block This is what the PDF looks like: Table of Contents TC_01... .. TC_02... .. etc. Can anyone tell me where my page numbers went? -- Charles Knell [EMAIL PROTECTED] - email -Original Message- From: [EMAIL PROTECTED] Sent: Fri, 03 Mar 2006 13:36:07 -0500 To: fop-users@xmlgraphics.apache.org Subject: RE: RE: Re: Help with table-of-contents:don't understand ref-id attribute I found my errors. Naturally they weren't where I was looking, but I was distracted by my unfamiliarity with the table of contents piece. I had a missing element, a mis-spelled element name, and I omitted a namespace part of another element. Now the only problem I seem to have is that fop.bat won't terminate when it tells me it's ..., stopping renderer. Thanks. -- Charles Knell [EMAIL PROTECTED] - email -Original Message- From: [EMAIL PROTECTED] Sent: Fri, 03 Mar 2006 12:15:41 -0500 To: fop-users@xmlgraphics.apache.org Subject: RE: Re: Help with table-of-contents:don't understand ref-id attribute Here is a trimmed-down model of the XML. test-case-documents directory @name=dir-1 directory @name=dir-1-1 file nameTC_01/name .. More elements here .. /file /directory /directory test-case-documents This is the template in question: xsl:template match=file mode=toc
Re: table-layout
Hi, Tracey, The best way is to ask specific questions. Many folks on the list have used FOP to solve heavy-duty, real-world problems. For example, I recently finished the XSL work that lets the Boston Globe use FOP to produce over 4000 pages of distribution reports (which product goes where) every day. We can help you solve similar problems if you can tell us exactly what obstacles you encounter. However, it's hard to give generic advice that means anything, because each problem has its own characteristics. Jay Bryant Bryant Communication Services - Original Message - From: Tracey Zellmann [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Sunday, February 26, 2006 6:18 PM Subject: Re: table-layout Thanks That worked perfectly as well. Now that I seem to at least have FOP working, I want to make better use of its facilities. How can I get a handle on the basic parameters - like these ones that I encounter. The underlying documentation has been helpful to get the examples running, and from those, to get my own applictaion running. However, when I try to delve deeper, things get a bit murky. I must say, this list has been very helpful. I am also impressed at the global scope - makes 24 * 7 almost feasible! - Original Message - From: Manuel Mall [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Sunday, February 26, 2006 6:04 PM Subject: Re: table-layout On Monday 27 February 2006 02:59, Tracey Zellmann wrote: Excellent! That worked like a charm. Another small question, if you or someone else has a moment. I am using some spanned cells, but, at least for now, none of my table cells have any borders. I am getting a warning with a TODO WARNING: TODO Add collapsed border painting for spanned cells What am I supposed to do? Try specifying border-collapse=separate on the table. Manuel - 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: Behavoiur of Text nodes??
I can just about guarantee that the trouble is not Saxon (which I use every day). The trouble lies in your stylesheet, where I strongly suspect you are applying templates by selecting nodes rather than applying all templates (something like xsl:apply-templates select=italic/ rather than xsl:apply-templates/). (That's not necessarily a bad thing to do, by the way, but it can cause issues like this one.) Also, this is the wrong forum for this message. The XSLT processor that comes bundled with FOP is Xalan, not Saxon. Even then, though, this isn't really a Saxon issue. It's a general XSLT issue, so you should really ask this question on Mulberry's XSL list. You can subscribe to the Mulberry XSL list at http://www.mulberrytech.com/xsl/xsl-list/. Mike Kay (developer of Saxon) is one of the leading participants on that list, so, even if it is a Saxon issue, you'll get the answer you need. Finally, you need to post both sample data and your stylesheet (trim both down to show just the issue that troubles you) or no one will be able to help you, except in the most general way, as I did in the first paragraph. Good luck. Jay Bryant Bryant Communication Services - Original Message - From: Sascha Punzmann [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Saturday, February 18, 2006 11:20 AM Subject: Behavoiur of Text nodes?? Hi, for the last few month I worked with xml structures like these: para For these tasks the menu italicTest/italic provides the function italicMask/italic /para Until now the text was formated (see below) in the order of appearance in the tree! That was at least for my understanding of the XML tree correct, because the element para has 4 child nodes (text(),italic,text(),italic) * Example:* For these tasks the menu Test provides the funciton Mask At the moment SAXON seems to be in a different mode. The element para in this case has only 3 child nodes (text(),italic,italic) and is printed as following: *Example:* For these tasks the menu provides the funciton Test Mask As you can see SAXON now interprets the various text nodes in the tree as one big text node. Does any of you know why this happens, or how I can switch back to the way it was before? regards Sascha - 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 from XSL-FO to MSWORD
Is there is any way to convert from XSL-FO to MSWORD? Sure. You'd need to write a collection of templates to match the elements of an XSL-FO file and create the corresponding WordML elements. I think a truly generic converter would be a LOT of work, but, for situations where you are dealing with a well-known set of documents, it shouldn't be too hard. I've done other kinds of XML to WordML, and XSL-FO is just another kind of XML. HTH Jay Bryant Bryant Communication Services
Re: New User - Fop error.
Hi, Patrick, FOP can't function without some page-definition information. Try adding the following template to your XSL file (to tell FOP the page layout details): xsl:template match=/ fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=only page-height=11in page-width=8.5in margin-top=1in margin-bottom=1in margin-left=1in margin-right=1in fo:region-body region-name=only-body/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=only fo:flow flow-name=only-body xsl:apply-templates/ /fo:flow /fo:page-sequence /fo:root /xsl:template HTH Jay Bryant Bryant Communication Services - Original Message - From: Patrick Proctor [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Monday, January 30, 2006 5:17 PM Subject: Re: New User - Fop error. I have the same problem, and I think it may be a bug. I have used FOP examples from O'Reilly and W3C and I can't get any file, even the most basic to work. Any help would be very much appreciated! Here are two example input files: test.xsl: ?xml version=1.0 encoding=UTF-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xsl:template match=data fo:block xsl:apply-templates select=name/ xsl:apply-templates select=description/ /fo:block /xsl:template xsl:template match=name fo:block font-size=18pt font-family=sans-serif line-height=24pt space-after.optimum=15pt background-color=blue color=white text-align=center padding-top=3pt xsl:value-of select=./ /fo:block /xsl:template xsl:template match=description fo:block font-size=12pt font-family=sans-serif line-height=15pt space-after.optimum=3pt text-align=justify xsl:value-of select=./ /fo:block /xsl:template /xsl:stylesheet test.xml: ?xml version=1.0 encoding=UTF-8? data name Krusty the Clown /name description This memo explains why Krusty the Clown is our best customer. We need to take good care of him from now onwards and make sure that there are always enough bananas for his pet monkey. /description /data - 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: New User - Fop error.
Hi, Matt, Welcome to the FOP world. endElement is a method within the XML parser, so it's apparent that the parser doesn't like either your XML file or your XSL file. Most likely, this is the result of a malformed file (failing to close elements and such). As Jelka indicated, if you can post the XML and XSL files, we can puzzle out exactly what's going wrong. If it's not too much bother, please copy and past the contents of the files right into the message. I am a bit paranoid about opening attachments Jay Bryant Bryant Communication Services - Original Message - From: IT Department - Coleshill [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, January 26, 2006 6:15 AM Subject: New User - Fop error. Hi there I hope this is the correct place to post. Ive only just come to looking at XML/FOP in the last few days so please excuse any ignorance. I am running FOP from a DOS shell on windows XP pro. I have just installed the latest JRE. I have put the files I am trying to convert into the same directory as the Fop.bat file, these are afx.xml and afx.xsl. I run fop using : fop -xsl afx.xsl -xml afx.xml -pdf afx.pdf and it returns an error : javax.xml.transform.TransformerException: java.lang.IllegalStateException: endElement() called for html where there is no current element. Exception javax.xml.transform.TransformerException: java.lang.IllegalStateException: endElement() called for html where there is no current element. If anyone has any ideas or is able to point me in the right direction I would be most appreciative. Thankyou. Matt. - 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: How to create a list in FO?
Hi, Daniele, It's not that different in FO, except that FO is much more verbose. Here's that list in FO: fo:list-block fo:list-item fo:list-item-label1./fo:list-item-label fo:list-item-bodyFirst element fo:list-block fo:list-item fo:list-item-label1./fo:list-item-label fo:list-item-bodyfirst deep element/fo:list-item-body /fo:list-item fo:list-item fo:list-item-label2./fo:list-item-label fo:list-item-bodysecondo deep element fo:list-block fo:list-item fo:list-item-label1./fo:list-item-label fo:list-item-bodythird deep elemente/fo:list-item-body /fo:list-item /fo:list-block /fo:list-item-body /fo:list-item fo:list-block /fo:list-item-body /fo:list-item fo:list-item fo:list-item-label2./fo:list-item-label fo:list-item-bodySecond element/fo:list-item-body /fo:list-item/fo:list-block I prepared that by hand, so it may have a typo or two, but the concept is right. Just like in HTML, the inner list goes within a listitem element. In FO, that means the inner list goes within the list-item-body element. Also, note that there are a bunch of attributes you can add to these elements, to control font size and family, line height, and so on. I whipped up a stripped down list for the sake of an example. HTH Jay Bryant Bryant Communication Services - Original Message - From: Daniele To: fop-users@xmlgraphics.apache.org Sent: Thursday, January 26, 2006 9:29 AM Subject: How to create a list in FO? Hi to all, How can I create this list in FO?Start List First element first deep element secondo deep element third deep elemente Second element End List in html is simple to do it, I want to know how can I create this in fo. thanks,Daniele
Re: xsl-fo cascading styles?
Also, you can put all the attribute sets in a separate file and use xsl:include to add them to all your transformations that produce XSL-FO. I do that for most of my projects, so that I can get a consistent appearance across a large set of documents. Jay Bryant Bryant Communication Services - Original Message - From: Steve Roy [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Wednesday, January 25, 2006 10:26 AM Subject: Re: xsl-fo cascading styles? That's exactly what I was looking for. Thanks Clay. - steve From: Clay Leeds [EMAIL PROTECTED] Reply-To: fop-users@xmlgraphics.apache.org To: fop-users@xmlgraphics.apache.org Subject: Re: xsl-fo cascading styles? Date: Wed, 25 Jan 2006 08:10:50 -0800 On Jan 25, 2006, at 7:43 AM, Steve Roy wrote: Hello, Is there a technique for re-using pre-defined styles in xsl-fo in a way similar to using css styles in html? It seems redundant and labor intensive to constantly redefine the same text style for fo:blocks and fo:inline etc. -steve This is more an XSL question. I think what you want is xsl:use- attribute-set / as follows: 1. build the attribute set: !-- BEGIN - attributes_DEFAULT attribute set (common for -print/- awt and -pdf output) -- xsl:attribute-set name=attributes_DEFAULT !-- background-color for overall EOR page - default:#ff (white) -- xsl:attribute name=background-color#ff/xsl:attribute !-- color for text - default:#00 (black) -- xsl:attribute name=color#00/xsl:attribute !-- font-family for text - default:courier new, courier, monospace -- xsl:attribute name=font-familycourier new, courier, monospace/ xsl:attribute !-- NOTE: Changes to font-family affects FOP rendering of EOR and may require overhaul of template! -- !-- font-size for text - default:8pt - -- xsl:attribute name=font-size8pt/xsl:attribute !-- NOTE: Changes to font-size DRASTICALLY affects FOP rendering of EOR and may require COMPLETE overhaul of template! -- /xsl:attribute-set !-- END - attributes_DEFAULT -- 2. Apple the use-attribute-set attribute: fo:page-sequence master-reference=repeating force-page- count=no-force fo:static-content flow-name=xsl-region-before fo:block padding=0pt xsl:use-attribute- sets=attributes_DEFAULT xsl:call-template name=tmpHeader/ /fo:block /fo:static-content fo:static-content flow-name=xsl-region-after fo:block xsl:use-attribute-sets=attributes_DEFAULT xsl:call-template name=tmpFooter/ /fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block xsl:use-attribute-sets=attributes_DEFAULT xsl:call-template name=tmpBody/ fo:block padding=0pt font-size=1pt fo:marker marker-class-name=table-continued/ /fo:block /fo:block /fo:flow /fo:page-sequence 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: xml to html
Hi, Reza, Your question is off-topic for this list, but yes, you can. For answers to questions involving how to do it, you should subscribe to the Mulberry XSLT list. You'll need to use a Java-based XSLT processor that exposes an API that you can call from a Java application (or servlet or whatever). Saxonand Xalan-J are both possibilities. Jay Bryant Bryant Communication Services - Original Message - From: Reza Ghaffaripour To: fop-users@xmlgraphics.apache.org Sent: Monday, January 23, 2006 9:36 AM Subject: xml to html hi list,I started xsl a couple of hours ago on a new project and my question may seem stupid.in java, can we convert xml to html using xslt and give it some format, such as making some parts bold ?-- Reza Ghaffaripourwww.rezaghp.com
Re: line break (br)
- Original Message - From: Miren Urkijo To: fop-users@xmlgraphics.apache.org Sent: Monday, January 16, 2006 1:11 PM Subject: line break (br) HEllo i have one great problem into one String i have several br i am trying to write this into one pdf as one line break (br into html) but i dont solve this problem can anybody helps me? thanks One way to get a line break is to use an empty block: fo:block/ Depending on what attributes the containing block has, you may also need to specify the height of the block: fo:block line-height="0"/ should give you a line break without producing an empty line. HTH Jay Bryant Bryant Communication Services
Either keeps in table rows in 0.20.5 or non-collapsing paragraphs in .90alpha
Hi, all, I'm creating reports for a new client. The reports consist entirely of tables (not blind tables used for layout but actual tabular content). In 0.20.5, I can't get keep-together or keep-with-next to work on a table row. I get page breaks within table-cells. In .90alpha, I don't get page breaks in table-cells, but it causes another problem. .90alpha collapses (renders with 0 height, it seems) blocks that contain just a non-breaking space (that is, character # 1 6 0 ; with extra spaces). I need those blocks to be full height, as I am using them to position things within table cells. Collapsing fo:block/ would be fine (I'm using empty blocks for page breaks between tables, in fact, and it's good there), but it seems to me that blocks with content (even just a space) shouldn't be collapsed. So, I either need to know how to get page breaks to not occur within table cells (that is, only at the rows between cells) in 0.20.5 or I need to know how to prevent blocks that contain spaces from collapsing in .90alpha. The 0.20.5 solution would be preferred, but I think I can talk my client into moving to .90alpha if it fixes the page break problem. Thanks Jay Bryant Bryant Communication Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Either keeps in table rows in 0.20.5 or non-collapsing paragraphs in .90alpha - followup
Hi, all, I'm creating reports for a new client. The reports consist entirely of tables (not blind tables used for layout but actual tabular content). In 0.20.5, I can't get keep-together or keep-with-next to work on a table row. I get page breaks within table-cells. In .90alpha, I don't get page breaks in table-cells, but it causes another problem. .90alpha collapses (renders with 0 height, it seems) blocks that contain just a non-breaking space (that is, character # 1 6 0 ; with extra spaces). I need those blocks to be full height, as I am using them to position things within table cells. Collapsing fo:block/ would be fine (I'm using empty blocks for page breaks between tables, in fact, and it's good there), but it seems to me that blocks with content (even just a space) shouldn't be collapsed. So, I either need to know how to get page breaks to not occur within table cells (that is, only at the rows between cells) in 0.20.5 or I need to know how to prevent blocks that contain spaces from collapsing in .90alpha. The 0.20.5 solution would be preferred, but I think I can talk my client into moving to .90alpha if it fixes the page break problem. Thanks I used block-containers with height attribute values wrapped around empty blocks to make my spacer blocks, so I've gotten the .90alpha solution to work. Combined with the -q option to shut off all the to-do messages, it'll work. I'd still like to know how to prevent page breaks within table cells in 0.20.5 in case my client (or some future client) resists going to .90alpha. Thanks some more. Jay Bryant Bryant Communication Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Either keeps in table rows in 0.20.5 or non-collapsing paragraphs in .90alpha - followup
Hi, Jeremias, I used block-containers with height attribute values wrapped around empty blocks to make my spacer blocks, so I've gotten the .90alpha solution to work. Combined with the -q option to shut off all the to-do messages, it'll work. That seems like a hack. Please try my suggestions I just sent. It feels like a hack, too. I'll try your ideas. I'd still like to know how to prevent page breaks within table cells in 0.20.5 in case my client (or some future client) resists going to .90alpha. keep-together is supposed to work if specified on a table-row. Does that mean that this doesn't work in your case. If you can post a small example, I can have a look. Well, while I was preparing a sample that would show the problem, I got keep-together=always to work the way it should. I'm not sure what changed, so I'll let the matter drop, as I don't have time to pursue much testing at present. Thanks. J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Either keeps in table rows in 0.20.5 or non-collapsing paragraphs in .90alpha
What I think could work for you is to specify block-progression-dimension.minimum=1em on a table-row. In that case, a row cannot collapse even if you only use a minimum fo:block/ inside the table-cells. That didn't work with 0.90. Here's a snippet from what I tested: fo:table-row block-progression-dimension.minimum=1em keep-together.within-page=always fo:table-cell border-width=1pt border-style=solid border-color=black fo:block xsl:use-attribute-sets=headerleftxsl:value-of select=@name//fo:block fo:block xsl:use-attribute-sets=headerleftxsl:value-of select=@city//fo:block fo:block xsl:use-attribute-sets=headerleftxsl:value-of select=@address//fo:block /fo:table-cell fo:table-cell border-width=1pt border-style=solid border-color=black fo:block/ fo:block/ fo:block/ fo:block/ fo:block xsl:use-attribute-sets=headercenterxsl:value-of select=@id//fo:block /fo:table-cell 0.90 collapses those empty blocks. Jay Bryant Bryant Communication Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 0.90alpha1: content-width=scale-to-fit creates damaged PDF
I wasn't being very methodical with my earlier testing. Rather, I was pursuing whatever ideas my intuition brought to me. I think a test plan that works all combinations of the width, content-width, height, content-height, and scaling properties (in each unit of measure, too) is in order. I'll see what I can do along that line. Jay Bryant Bryant Communication Services - Original Message - From: Andreas L Delmelle [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Saturday, December 10, 2005 3:09 PM Subject: Re: 0.90alpha1: content-width=scale-to-fit creates damaged PDF On Dec 10, 2005, at 22:03, Andreas L Delmelle wrote: fo:external-graphic src=... width=auto content-width=auto height=auto content-height=scale-to-fit scaling=non-uniform / Correction: this is OK - width/height = auto means use content-size - content-height=scale-to-fit, so content-width is our last hope, and that is auto so that means we should be using the intrinsic image-width, determine width from there, so the e-g height becomes intrinsic image-height (and the block height). and fo:external-graphic src=... width=auto content-width=auto height=2.9cm content-height=scale-to-fit scaling=non-uniform / but here I'd expect the block height to be at most 2.9cm. That is currently not the case. This seems to be giving strange results... Those interested, try it out. On my side, it seems like the intrinsic image height is used to determine the block height (?) Not the behavior I would expect... Greetz, Andreas - 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: Vertical text
Just put each character (or word or whatever unit of text you like) in its own block, thus: fo:blockM/fo:blockfo:blocka/fo:blockfo:blockk/fo:blockfo:blocke/fo:blockfo:block /fo:blockfo:blockM/fo:blockfo:blocke/fo:blockfo:block /fo:blockfo:blockV/fo:blockfo:blocke/fo:blockfo:blockr/fo:blockfo:blockt/fo:blockfo:blocki/fo:blockfo:blockc/fo:blockfo:blocka/fo:blockfo:blockl/fo:block Depending on the properties of the flow containing the blocks, you may also need to set position attributes, but I think the default values stack blocks vertically. Jay Bryant Bryant Communication Services - Original Message - From: Jian Yang To: fop-users@xmlgraphics.apache.org Sent: Monday, August 01, 2005 5:13 PM Subject: Vertical text Hi, I am trying to hand-code a FO file, then convert to PDF using FOP(fop-0.20.5), does anyone know how to output a vertical text? Thanks Jian This email and any attachments thereto may contain private, confidential, and privileged material for the sole use of the intended recipient. Any review, copying, or distribution of this email (or any attachments thereto) by others is strictly prohibited. If you are not the intended recipient, please contact [EMAIL PROTECTED] immediately and permanently delete the original and any copies of this email and any attachments thereto.
Re: Problem when link has contentid
Hi, Fabrizio, Try xsl:value-of select=./ rather than text(). The two are very similar in most cases, but . tends to be more reliable because it picks up the text value of the entire node. Also, it's more standard XSLT. Jay Bryant Bryant Communication Services - Original Message - From: Fabrizio Caldas [EMAIL PROTECTED] To: fop-users@xmlgraphics.apache.org Sent: Thursday, July 21, 2005 4:28 PM Subject: Problem when link has contentid Hello, I have an XSLT and an XML file, which I use to generate a PDF. Both those files work fine except for one circumstance. This is an example of how I have data in the XML. Item textSome text here /text a href=http://www.example.com/fop/test.jsp?contentID=1234;please click here/a text more text here./text /Item And this is the data in the XSL: !-- === -- !-- child element: a-- !-- === -- xsl:template match=a fo:basic-link color=blue external-destination=[EMAIL PROTECTED] fo:inlinexsl:value-of select=text()//fo:inline /fo:basic-link /xsl:template When the link contains contentID the PDF creation generates an error: [ERROR] The reference to entity contentID must end with the ';' delimiter. org.apache.fop.apps.FOPException: The reference to entity contentID must end with the ';' Does anyone know how I can make the contentID be interpreted as ordinary text and not as a reference to entity? Thanks in advance, Fabrizio. _ Chegou o que faltava: MSN Acesso Grátis. Instale Já! http://www.msn.com.br/discador - 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: page-number
Hello List! I want to get my page numbers formated in a, b, c format, not as it is by default 1, 2, 3. Is this possible? And if yes, how :) Thanks! Jan Hi, Jan, It's possible in XSL. There are a number of ways to do it. Here's one: fo:page-sequence master-reference=contents initial-page-number=1 format=i I use that line in my FO files that have tables of contents. That way, I get lower-case Roman numerals in the tables of contents. You can get a, b, c... instead of i, ii, iii... by using format=a rather than format=i. This assumes that FOP supports this feature of XSL. Also, note that this feature is defined in the XSLT specification, since it's a transformation. The relevant chunk of the specification is 7.7.1 Number to String Conversion Attribute The FOP compliance page says the format property has not been implemented. See http://xml.apache.org/fop/compliance.html#fo-property-format However, converting to Roman numerals is a type of number-to-string conversion (as defined by both the spec and common sense), and that works. So try format=a Jay Bryant Bryant Communication Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]