Re: Control of long words inside a table cell
You could also use this template to split a line at a certain position. xsl:template name=text_wrapper xsl:param name=Text/ xsl:choose xsl:when test=string-length($Text) xsl:value-of select=substring($Text,1,30)/ !-- xsl:text#xa;/xsl:text br/ -- xsl:call-template name=wrapper_helper xsl:with-param name=Text select=substring($Text,31)/ /xsl:call-template /xsl:when xsl:otherwise !-- no more string! -- /xsl:otherwise /xsl:choose /xsl:template !--this will also display 30 chars of the string, and pass the rest back to text_wrapper -- xsl:template name=wrapper_helper xsl:param name=Text/ xsl:value-of select=substring($Text,1,30)/ !-- br/ -- xsl:call-template name=text_wrapper xsl:with-param name=Text select=substring($Text,31)/ /xsl:call-template /xsl:template Mathy Roland Neilands wrote: Use fo:table-cell wrap-option=wrap Thanks for the response; I tried this option but I did not see a difference; the text continues to over-flow the table cell width. I saw this when testing too. Any whitespace would cause the cell contents to wrap though. You could search the examples and/or archive for solutions involving either hyphenation or inserting zero length whitespace at set points. Regards, Roland
sup with fo
Hello, I have 5*10sup5/sup in my xml file and trying to do a superscript using the following xsl lines. Unfortunately, this does nothing. Any clue??? xsl:template match=//sup fo:inline baseline-shift=sup font-size=3px xsl:apply-templates/ /fo:inline /xsl:template Thanks Mathy
Re: sup with fo
Hmmm.. I have tried baselin-shift to super. I think the problem is with my xml file :). Instead of having supertag in xml, I have the entity representation of the tag.. meaning I have lt;supergt;. So, by doing the search for the tag super does not help. Any advice Thanks J.Pietschmann Mathy J.Pietschmann wrote: Mathy V Arumugam wrote: Hello, I have 5*10sup5/sup in my xml file and trying to do a superscript using the following xsl lines. Unfortunately, this does nothing. Any clue??? xsl:template match=//sup fo:inline baseline-shift=sup font-size=3px Try baseline-shift=super, http://www.w3.org/TR/xsl/slice7.html#baseline-shift J.Pietschmann
Re: java/util/HashMap error
This is what I have in my java file to generate a PDF file: Logger log; Hierarchy hierarchy = Hierarchy.getDefaultHierarchy(); log = hierarchy.getLoggerFor(fop); log.setPriority(Priority.WARN); Driver dr=new Driver();// * this is where it is failing ** dr.setLogger(log); dr.setRenderer(Driver.RENDER_PDF); InputHandler ih=new XSLTInputHandler(xmlFile,xslFile); XMLReader p=ih.getParser(); dr.setOutputStream(new FileOutputStream(pdfFile)); dr.render(p,ih.getInputSource()); Mathy V Arumugam wrote: What can I do to get rid of the following error? I am using JDK1.3... java.lang.NoClassDefFoundError: java/util/HashMap at org.apache.fop.fo.FOTreeBuilder.init(FOTreeBuilder.java:85) Thanks Mathy
Re: long words in table cells and hyphenate
Bertrand, I had the same problem as you do and the text_wrapper function fixed it. Mathy Bertrand Badot wrote: I have got the same problem than Mathy with the overflow of the column and long word.As I do not want to truncate the data, I try the hyphenate solution but it did not change anything...I write:fo:table-cell border="0.5pt solid black" padding="0.1cm">fo:block font-size="8pt" language="en_GB" hyphenate="true">Incredibelylongtext(tobecutbyhyphenation) /fo:block> /fo:table-cell>But it does not seem to cut anything (no error message during FOP execution)...Here attached the XSL-FO sheet and the corresponding PDF.You can see a lot of overflow despite the hyphenate attribute in column "Arrive" et "Commentaires"...Does anybody know what I am doing wrong or what I should do?RegardsBertrand.
fop-0.20.3: table cell data on same page
Hi all, How can I prevent the table cells from splitting on page break? I thought the following should prevent the table cells from splitting on page boundaries...but, does not work for me fo:table-cell keep-together.within-page=always fo:block/fo:block /fo:table-cell I have also tried: fo:table-row keep-with-next=always fo:table-cell fo:block.../fo:block/fo:table-cell /fo:table-row Thanks Mathy
Re: fop-0.20.3: table cell data on same page
Well, the table consists of about 150 rows, and some table-cells are as long as the ex. below. Trimmed down FO file: fo:table-row display-align=center height=15pt keep-with-next=always fo:table-cell column-number=1 border=0.5pt solid black padding=0.6pt fo:block font-family=sans-serif text-align=center font-size=10pttesting /fo:block /fo:table-cell fo:table-cell column-number=2 border=0.5pt solid black padding=0.6pt fo:block font-family=sans-serif text-align=left font-size=10ptsome text some textsome textsome textsome textsome textsome text some text some text some text some text some text some text some text some text some text some text some text some text text some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text stext some text some text some text some text srated output/fo:block /fo:table-cell /fo:table-row thanks Mathy J.Pietschmann wrote: Mathy V Arumugam wrote: Thanks Stephen, I am using fop-0.20.3!!! and fo:table-row keep-with-next=always DOES NOT work either :( It works, but may still give some unexpected results. If you have a long table and put keep-with-next on every row, earlier versions of FOP went into a nonterninating loop. The 0.20.3 version tries to detect it and inserts a break anyway. Similar situations could arise if space-before and other stuff. Can you explain in which sense it does not work for you? Preferably post a trimmed down FO file to the fop-user list. J.Pietschmann Mathy V Arumugam wrote: Hi all, How can I prevent the table cells from splitting on page break? I thought the following should prevent the table cells from splitting on page boundaries...but, does not work for me fo:table-cell keep-together.within-page=always fo:block/fo:block /fo:table-cell I have also tried: fo:table-row keep-with-next=always fo:table-cell fo:block.../fo:block/fo:table-cell /fo:table-row Thanks Mathy
Re: fop-0.20.3: table cell data on same page
Hm.. still does not work.. What is really wrong with my code then Matthew L. Avizinis wrote: I've found that you have to have fo:table-row keep-with-next=always fo:table-cell fo:block.../fo:block/fo:table-cell /fo:table-row fo:table-row keep-with-previous=always fo:table-cell fo:block.../fo:block/fo:table-cell /fo:table-row for it to work properly. hth -Original Message- From: Mathy V Arumugam [mailto:[EMAIL PROTECTED] Sent: Thursday, March 28, 2002 4:09 PM To: [EMAIL PROTECTED] Subject: fop-0.20.3: table cell data on same page Hi all, How can I prevent the table cells from splitting on page break? I thought the following should prevent the table cells from splitting on page boundaries...but, does not work for me fo:table-cell keep-together.within-page=always fo:block/fo:block /fo:table-cell I have also tried: fo:table-row keep-with-next=always fo:table-cell fo:block.../fo:block/fo:table-cell /fo:table-row Thanks Mathy
Re: insert a PDF file into another PDF
Yes, iText does look promising. I am looking into that.. will let you know when I succeed :) Mathy Buonincontri, Steve (CAP, MMF, ITSS) wrote: I think you can do this with iText 3.0 -Original Message- From: Mathy V Arumugam [mailto:[EMAIL PROTECTED] Sent: Thursday, March 14, 2002 1:29 PM To: [EMAIL PROTECTED] Subject: insert a PDF file into another PDF I need to insert one PDF file into another PDF file, say, insert page 7 in another pdf file or insert page 7-12 into another. Thanks in advance Mathy
Re: table: column-width
Apologies for the previous request! A better looking table is attached! The number of columns is not a fixed number. I am able to create the table but, having trouble with the column-width. The table should expand to fit the page. The total-column-number is defined in TABLE attribute. Thanks Mathy Title: Column 1 Column 1 Title for the for The first ROW Column 2 Column 3 Column 4 Column N (0,0) (0,1) (0,2) (0,3) (0,N) (1,0) (1,1) (1,2) (1,3) (1,N) (2,0) (2,1) (2,2) (2,3) (2,N) (3,0) (3,1) (3,2) (3,3) (3,N)
Newbie question: Conditional page-brek
How can I do a page break when the TABLE_TITLE is NOT empty. xsl:value-of select=TABLE_TITLE/ Thanks Mathy
Multiple rows and cols
I have a 19 by 20 cells table. What is the efficient way to do it? I have this in. xsl but having trouble converting to .fo xsl:for-each select=LIST1 table WIDTH=100% border=6 bordercolorlight=#33 bordercolordark=#66 bgcolor=#CC cellspacing=0 cellpadding=1 align =center xsl:for-each select=ROWS tr !-- X=0 is Column Heading, Y=0 is Row Heading -- xsl:for-each select=cell[(@X='0') $or$ (@Y='0')] td align =center bgcolor=3399cc bxsl:value-of select=.//b/font /td /xsl:for-each !-- non-heading cells -- xsl:for-each select=cell[(@X!='0')$and$(@Y!='0')] td align=center xsl:value-of select=./ /td /xsl:for-each /tr /xsl:for-each !-- for-each ROWS -- /table /xsl:for-each thanks mathy
Have anyone used FOA tool
I am having problem with bringing up the main window Formatting Object Authoring Tool window. All the other windows come up ok. Thanks Mathy