Re: how can I create template for manipulating embedded and external style sheet present in the html page? Is it possible?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 A quick response as I'm not sure I understand your question - but I think you're saying you can process all the 'inline' style + other attributes in an HTML document - but that you want ot be able to implement CSS class styles in FO-PDF? If so - that is not easy - particularly as CSS - XSL-FO attributes don't always map straightforwardly and some have different names, and detecting precedence, context and dealing with multiple CSS stylesheets is difficult. A useful utility from RenderX which may help you to map equivalent attributes is at http://www.renderx.com/~renderx/portal/fo2html.html. This maps XSLFO - HTML - and does a pretty good job. The way I deal with this problem is to turn the CSS stylesheets into XML documents - and then add attributes for the XSLFO equivalents. The structure of this XML depends on how much of the complexity of CSS you want to capture.) (this document can the be used to produce the CSS stylesheets as well.) I then load this document as a parameter when processing and lookup any formatting for the element / class I am dealing with. (I find this easier than trying to define fixed attribute sets.) With XSL / XML based output formatting it is nearly always easier to have a core XML document from which all other output (including HTML) is generated. If your HTML is well formed XML / XHTML then your task is easier. FOP 0.20.5 does not suppor table-with-caption - and many other processors also do not. FOP 0.20.5 does not support table-layout='auto' (only 'fixed') - and this is also true of many other processors - so I don't know how you are getting the table to fit the width of the page. unless you are specifying that the inline-progression dimension='100%'. Eldho George wrote: | | | Hi, | | | | | | I would like to know *how can I create template for manipulating | embedded and external style sheet present in the html page? Is it | possible?* | | | | *Please help meplease tell me is it possible with | xslt+xsl-fo? I already created template for processing inline style | attribute.* | | | | | | I am working with the project of converting a web Page into PDF.I am | using FOP.I am creating the formatting object tree using xslt.I | already create template for most of the html 4.0 tags and everything | this working perfectly.But I have problem with table .It showing the | table with entire page width. That means suppose I have created only | one column, it will occupy the entire page width. Suppose I am using | width in table, it is not shrinking according to that width. I used | table attribute as | | | | | | | | xsl:attribute name=table-layoutauto/xsl:attribute | | xsl:attribute name=space-before10pt/xsl:attribute | | xsl:attribute name=space-after10pt/xsl:attribute | | xsl:attribute name=border-styleoutset/xsl:attribute | | xsl:attribute name=border-collapseseparate/xsl:attribute | | xsl:attribute name=border-spacing2px/xsl:attribute | | | | | | Another problem is - outset is not working.fo:table-and-caption is | not working with fop.So I am not use fo:table-and-caption.This will | create any problem? | | I would like to know whether fop will support | fo:table-and-caption | | | | I would like to know *how can I create template for manipulating | embedded and external style sheet present in the html page? Is it | possible?* | | | | *Please help meplease tell me is it possible with | xslt? I already created template for processing inline style attribute.* | | | | Thanks in advance | | George | | | | | | | | | | | ** | This email and any files transmitted with it are confidential and | intended solely for the use of the individual or entity to whom they | are addressed. If you have received this email in error please notify | the system manager. | | This footnote also confirms that this email message has been swept by | MIMEsweeper for the presence of computer viruses. | | www.mimesweeper.com | ** | | - -- Datalucid Limited 8 Eileen Road South Norwood London SE25 5EJ United Kingdom / tel :0208-239-6810 mob: 0794-725-9760 email: [EMAIL PROTECTED] UK Co. Reg: 4383635 VAT Reg.: 798 7531 60 / -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBPIdPe72ghYHWur4RAgrhAJ41r8srH60skFbrzntb4hDUaneQsACdGERP /AscqsnlmD5I6NbUhaJYKdI= =hmNf -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Building a matrix (table) out of almost equal elements
I regularly process tables using XSLT-FO. This can seem more difficult than it is if you try to use XSLT as a sequential processing tool - which is when you get your illegal end-tag+start-tag problem. A general approach - which would probably work in your case - is to use the declarative nature of XSLT and specify output you want based on the input structure. This is sometimes speeded up by the use of keys - but these can impose a big overhead on large documents, often with a corresponding increase in processing time and memory. So - in your case - if the document is small enough (a few Mb or so) 1. do a for-each loop on each X/ element 2. within this get a list of the 1st Y/ item of each value (using Muenchian generate-id trick) 2.1 - You may need to amend this to select only those Y/ items where the preceding X/ item is the same as the current one if the Y/s are not nested within X.../X 3. do a for-each loop on these WITHIN enclosing table-row tags. 4. for each Y/ value - get a list of all the following elements with the same value and do a for-each loop outputting each table-cell. For large documents it can be more efficient to break this XSLT into multiple steps (ie separate transformations). E.g. - group the Y/s within X..X/ 1st if they are not grouped. or tag the 1st and last() Y/ items of a particular value with a tag indicating start table-row, end table-row or add a ROW element grouping Y/ items of same value. The best approach is determined by the structure of the input data and what steps are necessary to turn it into an appropriate structure to produce your output. For large volumes of tables I have found that an initial step breaking my input document into sub documents for each desired output table and producing a table-of-contents master XML document containing references to the sub-documents to be used for the subsequent output processing is usually the most efficient approach. This lets me process thousands of tables with the same overhead as for one table. Jan Kohnert wrote: Hi List, I m trying to set up a table out of elements which are all almost the same. There are only two indicators to determine to which position in the table a element fits. 1. All elements with the same value in X/ belong to one table. 2. All elements with the same value in Y/ belong to one row. Each element always belongs into the next cell following except it has an different value in Y/. So when the value Y changes all following elements shall be written into the next row until the value changes again. I know that there are much smarter ways to set up rules for a table, but it was not my decision... The problem caused by this setup is, that i have to close and open a table-row/ while processing the XML data with a XSLT Stylesheet. But as we all probably know is something like: xsl:if test$NewValue = 'true' /fo:table-row fo:table-row /xsl:if everything else than proper XML. I wonder how I can change a table-row while processing data. Does anybody has an Idea? Thanks in advance! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Datalucid Limited 8 Eileen Road South Norwood London SE25 5EJ / tel :0208-239-6810 mob: 0794-725-9760 email: [EMAIL PROTECTED] / UK Co. Reg: 4383635 VAT Reg.: 798 7531 60 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Converting Image to XML
You should be able to export the chart from Excel as a graphic - and then render the graphic using fo:external-graphic. I would be surprised if there is an XML representation of an Excel chart - and if there was you would have to reproduce the image processing to be able to display it. nitish kumar sinha wrote: HI Is there any way to convert the chart build in the Excel to XML and display the XML thus generated in the PDF using the FOP . If any one has any idea in this regard please send sample code or the idea to do the convertion. I shall be very thankfull to u. Thanks nitish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html class attribute like
I currently use something similar to both approaches for generating formatting attributes. Behind both I have a file which stores the CSS class definitions in a simple XML format (with some name/value variations where FO attribute names / properties are different - and some XSLT documents for constructing local transformations) Background: I have documents with many different styles and context sensitive triggering of which styles / parts of styles to use. For these I have a pre-processing phase (written in Perl rather than XSLT as the context evaluation is easier) which loads the CSS XML file, scans the input XML and constructs and outputs attribute sets + outputs a new XML with extra elements pointing to the relevant attribute-set. (There are several of these - so that I can output HTML and a valid css stylesheet and use CSS stylesheet classes + have local attributes.) (This also lets me tune the process so I can eventually switch to a SAX stream.) This keeps the size of the FO files 'small' - and if I need to change formatting I can do most of it by just generating a new attribute-sets file. I can also load and lookup attributes in the attribute-sets file to extract individual attributes if I need to do local overriding of global classes. The resulting XML file is then processed by XSLT to XSLFO with my standard templates. For simpler documents - or documents built by combining smaller documents - I have a slightly more complex XSLT which also loads several CSS XML files and does lookups etc. to assign local attributes for all FO nodes. This is so I can have different 'localised' attribute sets with the same names for different sub-documents. These FO files can get quite large - and any formatting changes require regeneration. Conclusion: If you are doing a straight HTML CSS class equivalence then I would recommend generating an attribute-sets file and then using that in your FO output (as I find this makes tuning / debugging formatting much easier). This also - as you rightly say - keeps the XSL much simpler - and in my case also makes the processing and less memory hungry. I have found that trying to do all the attribute calculations in one XSLT phase is harder to maintain and extend - particularly when you need further variations + local overriding attributes. I am actually switching most of my complex XSLT style/class processing to the latter case for the above reasons. HTH Bruno Sanz Marino wrote: Ok Iwill try the J.Pietschmann idea (xsl:use-attribute-sets) I think i need to do 3 transformations to do the html-css to fo process The first one to create the xsl:attribute-set templates form the css source (one for each css class rule) The second one to transform the class html attribute to the xsl xsl:use-attribute-sets attribute in the xhtml source file And the last one for generate the general fo file Another posibility (only 2 transformations) is not to use the xsl:use-attribute-sets. When i find the class attribute, I call one general template wich select the attributes to generate (in function of the value of the class attribute...this is to say, the classname). I could avoid the second transformation, but the xsl would be more complex OPINIONS ??? BRuno NUEVO TISCALI ADSL ON Navega desde las 15.00h. a alta velocidad por slo 29,50 /mes! Concelo en http://acceso.tiscali.es/pag-acceso-adsl-on.jsp?did=adn-7520007 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Datalucid Limited 8 Eileen Road South Norwood London SE25 5EJ tel :0208-239-6810 mob: 0794-725-9760 email: [EMAIL PROTECTED] UK Co. Reg: 4383635 VAT Reg.: 798 7531 60 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: premature page break inside text after table (with headers)
Thanks for the response. I am using footnotes - but these work perfectly if just pure tables on page. Problem only arises when also following block of text. And space left on page when premature page break triggered is substantially more than the footnote depth. Although it is always the same amount of space - which suggests it may be linked to the footnote - particularly as everything works OK if I omit the footnote. Footnote is 1.5cm high, region-after is 0.5cm high and space from end of text to start top of footnote is 5cm. I have just tried it with shorter footnote and text does reach further down page. Attached is somewhat smaller PDF + FO if it helps - but does sound like footnote problem - although more than twice footnote depth. If current design is screwed then my chances of hacking a solution are slight - and for me not an urgent problem as I don't often need following text and yesterday was 1st time I encountered it. (Can probably include the text in a final table row.) Thanks again. J.Pietschmann wrote: Mike Trotman wrote: Example FO + PDFs are at Can't be bothered to look, but are you using footnotes? The footnote space is actually allocated twice (chances to fix this are low, because of a severly screwed desigen). J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Datalucid Limited 8 Eileen Road South Norwood London SE25 5EJ tel :0208-239-6810 mob: 0794-725-9760 email: [EMAIL PROTECTED] UK Co. Reg: 4383635 VAT Reg.: 798 7531 60 l4_fop.pdf Description: Adobe PDF document ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:svg=http://www.w3.org/2000/svg; xmlns:xlink=http://www.w3.org/2000/svg; xmlns:dl=http://www.datalucid.com/; fo:layout-master-set fo:simple-page-master master-name=first page-width=29.69cm page-height=21.0cm margin=0.2cm fo:region-body margin-top=0.3cm margin-bottom=0.5cm margin-left=0.3cm margin-right=0.3cm border-style=solid border-width=thin border-color=silver/ fo:region-before extent=0.3cm/ fo:region-after extent=0.5cm/ /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-reference=first language=en fo:static-content flow-name=xsl-region-after fo:block font-family=serif font-size=8pt text-align=justify text-align-last=justify fo:basic-link color=teal external-destination=url(http://www.datalucid.com) Formatted by Datalucid Ltd. /fo:basic-link fo:leader leader-pattern=dots leader-length.maximum=100% rule-style=solid rule-thickness=1em color=red/ Page fo:page-number/ /fo:block /fo:static-content fo:flow flow-name=xsl-region-body fo:block id=T9 break-before=page text-align=left fo:table table-layout=fixed inline-progression-dimension.optimum=100% fo:table-column column-width=proportional-column-width(1)/ fo:table-column column-width=proportional-column-width(1)/ fo:table-column column-width=proportional-column-width(1)/ fo:table-body fo:table-row fo:table-cell fo:block text-align=start font-size=8pt fo:basic-link color=blue internal-destination=T8 Previous Table /fo:basic-link /fo:block /fo:table-cell fo:table-cell fo:block text-align=center font-size=8pt fo:basic-link color=blue internal-destination=T9 1st page of table /fo:basic-link /fo:block /fo:table-cell fo:table-cell fo:block text-align=end font-size=8pt fo:basic-link color=blue internal-destination=T10 Next Table /fo:basic-link /fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:block fo:block text-align=left fo:table table-layout=fixed inline-progression-dimension.optimum=100% font-family=Helvetica font-size=6pt color=black border-collapse=separate border-separation=0px empty-cells=show table-omit-header-at-break=false table-omit-footer-at-break=false fo:table-column column-width=3.42289719626168cm/ fo:table-column column-width=0.13691588785047cm/ fo:table-column column-width=1.09532710280374cm/ fo:table-column column-width=0.13691588785047cm/ fo:table-column column-width=1.77990654205607cm/ fo:table-column column-width=1.77990654205607cm/ fo:table-column column-width=1.77990654205607cm/ fo:table-column column-width=1.77990654205607cm/ fo:table-column column-width=1.77990654205607cm/ fo:table-column column-width=1.77990654205607cm/ fo:table-column column-width=1.77990654205607cm
Re: tables in fo:static-content
I have just tested a table inside a table header cell on a table that overflows pages in FOP.0.20.5 - and it works fine. (Haven't got time to try your XSL - but save the FO output and either check or post that (as long as it's small enough)) (My usual guess when nothing appears for tables is that I have forgotten to enclose table-cell contents with an fo:block) Daniel Easton wrote: So confirmation that 2 independent developers have tables in headers and footers that appear on multiple pages (although no confirmation as to whether they format using FOP). I've tried adding a table to the header with hard-coded content and it does not appear (suggesting its not a problem with the dynamically generated header table just a problem with the table itself). So I'm thinking there's a problem with my page sequencing definitions or a problem with FOP or a problem with header/footer margins ??? If anyone can see anything obviously wrong with my XSL it would be much appreciated - already spent over a day trying to debug this thing. Many Thanks in advance Daniel Easton - Original Message - From: Frank Daly [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 31, 2003 2:07 PM Subject: RE: tables in fo:static-content I have a table in a header so it's not the first cause. Frank -Original Message- From: Daniel Easton [mailto:[EMAIL PROTECTED] Sent: 31 October 2003 10:14 To: [EMAIL PROTECTED] Subject: fo:tables in fo:static-content Dear all, Not sure if this is the correct list to write to (if it is incorrect please accept my apologies) but am having some difficulty with an XSL FO document. Briefly my current development set up involves formatting my initial data into my own ML and then transforming into the fo namespace so I can transform to a pdf using FOP. My problem specifically is that I am generating header and footer content (in the static-content tags) from the intermediary ML which is only showing on the first page and not on any subsequent pages. The intermediary ML uses a table (based closely on the html table syntax) to layout the header and footer (for convenience) and the XSL file converts the header and footer tables into fo:tables in the xsl-region-before and xsl-region-after. Unfortunately these tables only show on the first page and not on any of the others :-( I have narrowed this problem down to 2 possible causes: 1) fo:static-content is not able to handle fo:tables in the header and footer (this could be a FOP problem?) 2) I am not correctly defining the page sequence and page templates correctly (I think I have fixed this) Attached is the input xml (called mrml) and the xslfo stylesheet to convert to valid fo. Many thanks for any help in advance, Cheers Daniel PS If you have received this mail already, many apologies (some confusion over which is the correct list) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---Legal Disclaimer--- The above electronic mail transmission is confidential and intended only for the person to whom it is addressed. Its contents may be protected by legal and/or professional privilege. Should it be received by you in error please contact the sender at the above quoted email address. Any unauthorised form of reproduction of this message is strictly prohibited. The Institute does not guarantee the security of any information electronically transmitted and is not liable if the information contained in this communication is not a proper and complete record of the message as transmitted by the sender nor for any delay in its receipt. ---Legal Disclaimer--- The above electronic mail transmission is confidential and intended only for the person to whom it is addressed. Its contents may be protected by legal and/or professional privilege. Should it be received by you in error please contact the sender at the above quoted email address. Any unauthorised form of reproduction of this message is strictly prohibited. The Institute does not guarantee the security of any information electronically transmitted and is not liable if the information contained in this communication is not a proper and complete record of the message as transmitted by the sender nor for any delay in its receipt. -- -- - 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] -- Datalucid
Re: fo:tables in fo:static-content
This gives error/warning message - some content cannot fit into static area. Increasing the size of region-before/after then makes regions work OK on subsequent pages. Daniel Easton wrote: Clay, Attached is the layout and header and footer FO code and the XSL stylesheet. The header and footer still come out only on the first page and not on any subsequent pages. Still very puzzled - any help much appreciated. Many Thanks Daniel - Original Message - From: Clay Leeds [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 31, 2003 3:48 PM Subject: Re: fo:tables in fo:static-content Daniel, Do you use multiple simple-page-master layouts? I've had problems when I try copying info from one region to another (region-before to region-body) due to the fact that I forgot to change the attribute from 'extent=' (region-before and region-after) to 'margin-top=' (region-body). What would happen, is that nothing would print in the HEADER (region-before) or FOOTER (region-after). If you double-check that this is not the problem, why not send us a (small) FO generated, as well as the XSL-FO used to transform it (only the page-sequence and layout-master stuff!) so we can see. OT: As an aside, we process medical billing reviews, and I have fairly complicated tables in the region-before and region-after, and we have clients who process 300,000+ bills/month using my templates. Some of my region-before sections take up half of the page, and some of region-after sections take up half of the page. As long as I've got the extent margin-top/bottom set correctly, there's no problem. I even have a region-after which dynamically resizes itself based on the number of lines that'll print there. HTH! Web Maestro Clay Daniel Easton wrote: Dear all, Not sure if this is the correct list to write to (if it is incorrect please accept my apologies) but am having some difficulty with an XSL FO document. Briefly my current development set up involves formatting my initial data into my own ML and then transforming into the fo namespace so I can transform to a pdf using FOP. My problem specifically is that I am generating header and footer content (in the static-content tags) from the intermediary ML which is only showing on the first page and not on any subsequent pages. The intermediary ML uses a table (based closely on the html table syntax) to layout the header and footer (for convenience) and the XSL file converts the header and footer tables into fo:tables in the xsl-region-before and xsl-region-after. Unfortunately these tables only show on the first page and not on any of the others :-( I have narrowed this problem down to 2 possible causes: 1) fo:static-content is not able to handle fo:tables in the header and footer (this could be a FOP problem?) 2) I am not correctly defining the page sequence and page templates correctly (I think I have fixed this) Attached is the input xml (called mrml) and the xslfo stylesheet to convert to valid fo. Many thanks for any help in advance, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ?xml version=1.0 encoding=ISO-8859-1 ? !-- # # mrml2xhtml.xsl # # Author: Daniel Easton # Created: 20 October 2003 # Comments: # # Converts MRML into XMLFO for FOP formatter # # History: # # Version 0.1 (20/10/03) - Creation # -- xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; version=1.0 xsl:output indent=yes method=xml encoding=UTF-8 / !-- page length units -- xsl:param name=unitsmm/xsl:param !-- page size -- xsl:param name=pagewidth210/xsl:param xsl:param name=pageheight297/xsl:param !-- page margins -- xsl:param name=pagemargintop20/xsl:param xsl:param name=pagemarginright20/xsl:param xsl:param name=pagemarginbottom20/xsl:param xsl:param name=pagemarginleft20/xsl:param !-- header size -- xsl:param name=headerheight20/xsl:param !-- header margins -- xsl:param name=headermargintop20/xsl:param xsl:param name=headermarginright0/xsl:param xsl:param name=headermarginbottom0/xsl:param xsl:param name=headermarginleft0/xsl:param !-- footer size -- xsl:param name=footerheight10/xsl:param !-- footer margins -- xsl:param name=footermargintop0/xsl:param xsl:param name=footermarginright0/xsl:param xsl:param name=footermarginbottom0/xsl:param xsl:param name=footermarginleft0/xsl:param !-- body margins -- xsl:param name=bodymargintop0/xsl:param xsl:param name=bodymarginright1/xsl:param xsl:param name=bodymarginbottom1/xsl:param xsl:param name=bodymarginleft1/xsl:param !-- body area calculations -- xsl:variable
premature page break inside text after table (with headers)
Hi. This is hard to provide a short example of (but easier to describe). Example FO + PDFs are at http://www.datalucid.com/queries/XSLFO/text-after-table-overflow/. (I don't necessarily expect anyone to read through the FO - the PDFs are just to make the example clear to see.) I have a problem with text following tables (whether they overflow to next page or not). A page-break occurs in the text well before the bottom of the page is reached. The table has a header section for repeating on overflows which includes all titles + the column labels. (and inside this header section I define a footnote to appear on any pages + overflow pages where it is repeated.) It looks like something I am doing is causing FOP (but not XEP) to think there is less region-body available than is the case. Anyone else encountered this problem - or can think of a likely cause? (I don't often have trailing text - so not an urgent problem) Any comments appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: premature page break inside text after table (with headers)
I've done some further experiments and the problem described below goes away if I don't define the footnote in the table header. (which is not a solution as I need that footnote.) So - my guess is that FOP is getting confused and reserving space for the header as well as the footnote (or something close to that) but ONLY if there is an additional block of text on the page - as if starting this block somehow starts partially preparing for a new page. (so subtracts the miscalculated reserved space from what is left on the current page.) I will try other fo containers and see if everything triggers it - or just fo:block. This is quite laborious to re-arrange - so if anyone has any similar experiences - let me know. (I've searched the archive but can't find anything relevant that matches the keywords I've used for searching.) Mike Trotman wrote: Hi. This is hard to provide a short example of (but easier to describe). Example FO + PDFs are at http://www.datalucid.com/queries/XSLFO/text-after-table-overflow/. (I don't necessarily expect anyone to read through the FO - the PDFs are just to make the example clear to see.) I have a problem with text following tables (whether they overflow to next page or not). A page-break occurs in the text well before the bottom of the page is reached. The table has a header section for repeating on overflows which includes all titles + the column labels. (and inside this header section I define a footnote to appear on any pages + overflow pages where it is repeated.) It looks like something I am doing is causing FOP (but not XEP) to think there is less region-body available than is the case. Anyone else encountered this problem - or can think of a likely cause? (I don't often have trailing text - so not an urgent problem) Any comments appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Datalucid Limited 8 Eileen Road South Norwood London SE25 5EJ tel :0208-239-6810 mob: 0794-725-9760 email: [EMAIL PROTECTED] UK Co. Reg: 4383635 VAT Reg.: 798 7531 60 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: premature page break inside text after table (with headers)
Further testing with FOP on the problem below reveals: - Surprisingly space left on page (when premature break occurs) seems to be almost constant - not affected by height of table-headers. (=~ 7cm to end of egion-after - height of footnote=1.5cm, height of region-after=0.5cm) This has got me really puzzled - I can't imagine what else is determining where premature page-break occurs. - Enclosing following text in an fo:block-container (and specifying height) shows text to the full height of the block-container including reaching beyond after-edge of page without a page-break being thrown - but then maybe block-container is independent of page size? (whereas XEP doesn't show block-container at all if extent falls outside page area) My Java is very basic - so haven't managed yet to find relevant parts of source-code to examine. If anyone has any ideas what might be causing this or similar problems I'd appreciate hearing about it. Mike Trotman wrote: I've done some further experiments and the problem described below goes away if I don't define the footnote in the table header. (which is not a solution as I need that footnote.) This is hard to provide a short example of (but easier to describe). Example FO + PDFs are at http://www.datalucid.com/queries/XSLFO/text-after-table-overflow/. (I don't necessarily expect anyone to read through the FO - the PDFs are just to make the example clear to see.) I have a problem with text following tables (whether they overflow to next page or not). A page-break occurs in the text well before the bottom of the page is reached. The table has a header section for repeating on overflows which includes all titles + the column labels. (and inside this header section I define a footnote to appear on any pages + overflow pages where it is repeated.) It looks like something I am doing is causing FOP (but not XEP) to think there is less region-body available than is the case. Anyone else encountered this problem - or can think of a likely cause? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to convert multiple fo files into a single pdf file
I do a similar thing for very large PDF files. (I save the individual .FO files for fast formatting into user selected options for various pages.) You may have refinements needed for you process which I miss but here is a 'simple' solution that keeps memory overhead low as well. The way I do this is to put all necessary FO into each individual file but construct a master 'index' XML document that contains references to each individual file required. This should contain any summary information required for TOCs, cross references etc. I then process this master document with a stylesheet that produces output FO, usually with many separate page-sequence (usually one per sub-file) and, using the XSLT 'document' function parses each sub document and includes just the relevant nodetrees (for my purposes usually just the page-sequences as I use an overall set of common master page-masters). (The nice thing is that this 'combining' stylesheet can be very generic and used for assembling many different documents.) This approach also makes it easy to assemble a combined output from selected, different sets of input subfiles (and also allows some limited reformatting if differing page sizes are required). I've used this to process documents that would actually be several hundred megabytes in size if produced as a single FO file. In case it helps to make things clearer here is an example of a very simple master stylesheet to merge separate FO files by processing a master XML file containing the names of the files to be processed. The FO files names are stored in /SECTIONS/SECTION/TABLES/TABLE/TABFIL/@href_fo. 'dl_dotags.xsl' processes a file containing layout parameters and defines the template DL_FO_ATTR. 1 xsl:stylesheet version=1.1 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; 2 xmlns:fo=http://www.w3.org/1999/XSL/Format; 3 xmlns:dl='http://www.datalucid.com/' 4 5 xsl:output method=xml encoding=UTF-8 omit-xml-declaration='yes' indent='yes'/ 6 xsl:decimal-format name=nan0 NaN=0/ 7 8 !-- 11.27in = 29cm ??? -- 9 xsl:param name='PAGEWID_CM' select='29'/ 10 xsl:include href='dl_dotags.xsl'/ 11 !-- -- 12 !-- XSLT for DLXML - Author: Mike Trotman - 03/10/2002 -- 13 !-- -- 14 xsl:template match=/ 15 16 fo:root xmlns:fo='http://www.w3.org/1999/XSL/Format' 17 18 fo:layout-master-set 19 fo:simple-page-master master-name='first' 20 xsl:call-template name='DL_FO_ATTR'xsl:with-param name='RULE' select='page'//xsl:call-template 21 fo:region-body 22 xsl:call-template name='DL_FO_ATTR'xsl:with-param name='RULE' select='region-body'//xsl:call-template 23 /fo:region-body 24 fo:region-before 25 xsl:call-template name='DL_FO_ATTR'xsl:with-param name='RULE' select='region-before'//xsl:call-template 26 /fo:region-before 27 fo:region-after 28 xsl:call-template name='DL_FO_ATTR'xsl:with-param name='RULE' select='region-after'//xsl:call-template 29 /fo:region-after 30 /fo:simple-page-master 31 /fo:layout-master-set 32 33 xsl:apply-templates select=SECTIONS/SECTION/ 34 35 /fo:root 36 /xsl:template 37 !-- -- 38 xsl:template match=SECTION 39 xsl:variable name='sid' select='count(preceding::SECTION)'/ 40 xsl:for-each select='TABLES/TABLE' 41 xsl:choose 42 xsl:when test='TABFIL/@href_fo' 43 xsl:messageFO Table lookup xsl:value-of select=@tableno//xsl:message 44 xsl:apply-templates select='document(TABFIL/@href_fo)/*' mode='FO'/ 45 /xsl:when 46 /xsl:choose 47 /xsl:for-each 48 /xsl:template 49 !-- -- 50 xsl:template match='fo:root' mode='FO' 51 52 xsl:copy-of select='./fo:page-sequence'/ 53 54 /xsl:template 55 !-- -- 56 /xsl:stylesheet Jay Chiu wrote: We need to generate pdf report file based on a pdf cover page and a few generated fo files. I would like to ask what is the best approach for this. Right now, we have an application to use xslt to generate fo file, and then fop to pdf file for each different report. But the client want to put all the reports together into a single pdf file. So I am thinking to use fop api to implement this feature. I guess what I need to do is: (1) for each fo/pdf file, I need to set the initial page number when calling fop process api and retrieve the number of pages for that fo/pdf at the end of fop process. (2) I need to call fop to append a fo/pdf after the previous processing. Can someone tell me if this is doable, which fop api to call? Thanks a lot. Jay Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag
Re: [XSL-FO] Waht is default / what determines z-index of xsl-regions / static content?
Thanks Chris. It looks like 'precedence' (when implemented) behaves to alter the dimensions of the region boundaries. What I was looking for is - when content overflows the region (and overflow='visible' - which looks like FOPs default) into another region - which region is given the higher z-index? I can't find any mentions of this (but may have missed them) so my current impression is that this is undefined / implementation dependent. I'm checking because I want to know when I'm applying a fix for an incorrect / missing feature (which other renderers may implement) - and when I'm looking for a feature that XSL-FO does not support. I mentioned the FOP 'background-image' non-use as I need to dynamically determine the position of logo's etc (for HTML and / or PDF) in a CGI script and FOP doesn't support background-image positioning. The page sizes will vary and there may be several logos + watermark text, so I have several elements to layout and using overflow regions looks like the natural method (and creating an image of these for each invocation is more programming and processing than I care to do if it can be avoided.) (I'm also trying to implement border decorations - for which background image is suitable.) FOP (and XEP) currently places region-before content on top of region-body FOP places region-after on top of region-before. XEP places region-after under region-before and on top of region-before. (Incidentally FOP interprets 'top' for region-after to be the start of the region. XEP interprets 'top' for region-after to be the top of the page area.) What I want is to place non-region-body content behind region-body. Chris Bowditch wrote: From: Mike Trotman [EMAIL PROTECTED] What determines the relative z-index layering of content in xsl-region-before, xsl-region-after, xsl-region-body ? If content in these regions overlaps what determines which appears on top and which gets overwritten? region-before and region-after have a precedence property that defaults to false. Set it to true if you want region-before/after to be on-top of start/end in the corners. Unfortunately, the FOP compliance page indicates that this property has not been implemented. Any information / pointers appreciated. (This question was triggered by trying to get underlaid Watermark effects with images / text. I'm using FOP-0.20.5 and so can't achieve the effect I want using 'background-image' in the page-master definition). Why not? background-image is implemented on fo:region-* elements Chris _ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger Yahoo! Groups Sponsor -~-- Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h on orders $50 or more to the US Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/9rHolB/TM -~- To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ -- Datalucid Limited 8 Eileen Road South Norwood London SE25 5EJ tel :0208-239-6810 mob: 0794-725-9760 email: [EMAIL PROTECTED] UK Co. Reg: 4383635 VAT Reg.: 798 7531 60 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP fo:leader
Whatever I try I can't get fo:leader to work as I want it to. I have downloaded the latest version of fop-0.20.5. I have read the FAQs (which claim it works well) http://xml.apache.org/fop/faq.html#leader-expansion tried text-align= for various things. I can only get leader to behave at all if I specify the length of the leader - which is not a practical option. I want to write a line at the bottom of my page like: left marginHyperlink .. Page 1right margin (What I really want is to be able to center something in the middle as well - but I get the feeling that's being too ambitious. e.g. left marginHyperlink . Centred . Page 1right margin) Any help would be greatly appreciated. (My current attempt is listed below. The leader fills the whole of the rest of the line and the 'Page' is split onto the next line. 11 fo:static-content flow-name=xsl-region-after 12 fo:block font-family=serif font-size=8pt text-align=justify text-align-last=justify 13 14 A 15 16 ( 17 fo:basic-link color=blue external-destination=url(http://www.w3.org/TR/WD-xsl/) 18 XSL-FO Working Draft 19 /fo:basic-link 20 ) 21 B 22 fo:leader leader-pattern=dots leader-length.maximum=100% rule-style=solid rule-thickness=1em color=red/ 23 Page 24 fo:page-number/ 25 /fo:block 26 /fo:static-content - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FOP fo:leader - works
I take it all back - it now works as expected. (I think my browser may have cached a PDF or two and given me the wrong impression.) Still not sure if 'text-align' and 'text-align-last' are behaving as I expect - but both together seem to do the trick. Mike Trotman wrote: Whatever I try I can't get fo:leader to work as I want it to. I have downloaded the latest version of fop-0.20.5. I have read the FAQs (which claim it works well) http://xml.apache.org/fop/faq.html#leader-expansion tried text-align= for various things. I can only get leader to behave at all if I specify the length of the leader - which is not a practical option. I want to write a line at the bottom of my page like: left marginHyperlink .. Page 1right margin (What I really want is to be able to center something in the middle as well - but I get the feeling that's being too ambitious. e.g. left marginHyperlink . Centred . Page 1right margin) Any help would be greatly appreciated. (My current attempt is listed below. The leader fills the whole of the rest of the line and the 'Page' is split onto the next line. 11 fo:static-content flow-name=xsl-region-after 12 fo:block font-family=serif font-size=8pt text-align=justify text-align-last=justify 13 14 A 15 16 ( 17 fo:basic-link color=blue external-destination=url(http://www.w3.org/TR/WD-xsl/) 18 XSL-FO Working Draft 19 /fo:basic-link 20 ) 21 B 22 fo:leader leader-pattern=dots leader-length.maximum=100% rule-style=solid rule-thickness=1em color=red/ 23 Page 24 fo:page-number/ 25 /fo:block 26 /fo:static-content - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Datalucid Limited 8 Eileen Road South Norwood London SE25 5EJ tel :0208-239-6810 mob: 0794-725-9760 email: [EMAIL PROTECTED] UK Co. Reg: 4383635 VAT Reg.: 798 7531 60 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Border confusion
Thanks - I'll check on this. I thought FOP only supported border-collapse='collapse'd tables - but may be getting this confused with 'fixed' layout. (And had also forgotten that the collapsed borders model DOES centre borders on the border rectangle edge.) I've had a few surprises with table borders in the past which might be why I've stuck with the collapsed model for so long. I think the problem was that using separated borders required a lot more specification of attributes to get the appearance I wanted. If I make all my borders the same colour and style then I can ignore the rendering order problem for the moment. I'm re-reading the border+space behaviours and precedence settings now. Thanks again. -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: 18 June 2003 20:47 To: [EMAIL PROTECTED] Subject: Re: Border confusion Mike Trotman wrote: I also thought that borders would be non-overlapping for table-cells - if not is there a way to achieve this? There's a collapse=false for this purpose (look up the correct name in the spec). Broders on table cells can still yeild a few surprises though. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Border confusion
Hi. I tried border-collapse='separate' and - while this worked OK for a simple table It doesn't work for tables with cells spanning rows (see attached - which also has border-separation='1pt'). I think this could qualify as a bug. Mike -Original Message- From: Mike Trotman [mailto:[EMAIL PROTECTED] Sent: 19 June 2003 14:36 To: [EMAIL PROTECTED] Subject: RE: Border confusion Thanks - I'll check on this. I thought FOP only supported border-collapse='collapse'd tables - but may be getting this confused with 'fixed' layout. (And had also forgotten that the collapsed borders model DOES centre borders on the border rectangle edge.) I've had a few surprises with table borders in the past which might be why I've stuck with the collapsed model for so long. I think the problem was that using separated borders required a lot more specification of attributes to get the appearance I wanted. If I make all my borders the same colour and style then I can ignore the rendering order problem for the moment. I'm re-reading the border+space behaviours and precedence settings now. Thanks again. -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: 18 June 2003 20:47 To: [EMAIL PROTECTED] Subject: Re: Border confusion l1.pdf Description: Adobe PDF document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Border confusion
A correction to my last e-mail. The border collisions using border-collapse='separate' only seem to occur when the contents of the cells is empty. The attached exampled has a '-' in each formerly empty cell - and renders correctly! (Interestingly - if the content is empty it looks as if the left and right hand borders can get switched around). So - I think I might be able to solve most of my immediate problems by using a zero-width space or something similar. Thanks. -Original Message- From: Mike Trotman [mailto:[EMAIL PROTECTED] Sent: 19 June 2003 19:33 To: [EMAIL PROTECTED] Subject: RE: Border confusion Hi. I tried border-collapse='separate' and - while this worked OK for a simple table It doesn't work for tables with cells spanning rows (see attached - which also has border-separation='1pt'). I think this could qualify as a bug. Mike -Original Message- From: Mike Trotman [mailto:[EMAIL PROTECTED] Sent: 19 June 2003 14:36 To: [EMAIL PROTECTED] Subject: RE: Border confusion Thanks - I'll check on this. I thought FOP only supported border-collapse='collapse'd tables - but may be getting this confused with 'fixed' layout. (And had also forgotten that the collapsed borders model DOES centre borders on the border rectangle edge.) I've had a few surprises with table borders in the past which might be why I've stuck with the collapsed model for so long. I think the problem was that using separated borders required a lot more specification of attributes to get the appearance I wanted. If I make all my borders the same colour and style then I can ignore the rendering order problem for the moment. I'm re-reading the border+space behaviours and precedence settings now. Thanks again. -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: 18 June 2003 20:47 To: [EMAIL PROTECTED] Subject: Re: Border confusion l1.pdf Description: Adobe PDF document - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Border confusion
Title: Message I am confused about where borders are drawn and their priority/sequence. I thought borders were drawnWITHIN the border rectangle - rather than centred on it's edge. I also thought that borders would be non-overlapping for table-cells - if not is there a way to achieve this? I have variable numbers of columns in a table and wish to separate groups of them with a GAP column. Within the groups there should be no left/right borders - although there will be top/bottom borders. At the start / end of a group there should be a GAP column with left/ right borders. (I can only detect the end of a group AFTER it is finished - so cannot (and don't want to) do special processing on 1st / last members of a group.) I am using fop-0.20.5rc. The XSL-FOand PDFexample produced to illustrate my problemare attached. Cell Gap 3 has the border joining appearance I would like to achieve for columns A,C. I am also surprised that the border joining behaviour for Column A+Gap, Gap+C are so different. Any guidance on use of borders or other help would be greatly appreciated. Thanks. Mike Datalucid Limited email: [EMAIL PROTECTED] l1.pdf Description: Adobe PDF document l1.fo Description: Binary data - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FOP - use in PIPE as command line tool.
Title: Message Is it possible to configure FOP to read standard input for it's FO source? I want to use it at the end of a pipe (as my intermediate XML documents are getting very large) but can't see any options to do this - and I'm not very familiar with Java so haven't looked at the source code yet. (If I do spend the time looking through the source it would be helpful to know that there is a solution in there somewhere) If it is possible (and should be as it uses SAX processing) any help / pointers would be appreciated. If I'm being stupid and there is an easy way to do this I'd appreciate knowing that as well. Thanks.
RE: Common formatting
I use an external XML file containing groups of elements that can be used to assign attributes to a FO element - given a unique key. I load this into a variable in XSLT and do lookups and assign attributes using a template 'with-param's as I process the output nodes. I just need to be able to tell for each output element what key it requires. If the content drives the style then I have a simple rule for deriving the key from the content. If not then I have to hard code the key into the particular XSLT. I actually do something a bit more complicated to determine scope / inheritance of the attributes and if they reformat the context element but as a general approach it is pretty flexible and nice and modular / re-useable and can also provide CSS stylesheets so I get HTML looking same as PDF. Mike Trotman -Original Message- From: Matthew Lancashire [mailto:[EMAIL PROTECTED] Sent: 21 February 2003 12:30 To: Fop-User-Help (E-mail) Subject: Common formatting What is the easiest methond of defineing what font/colour/sizes an element has without re-coding the definitions in each xsl. e.g. A text field of name has font arial, colour grey and size 12 point.. It appears in 20 xml documents that are to be tranformed by fop to pdf. I do not want to have to type the fo formatting commands into 20 xsl-fo stylesheets because of the maintenance overhead. I want some standard class of some sort that I can apply to the xsl element that pics up the style from one place. hence if the cont changes to courier I only need to change it once and not in each of the 20 xsl style sheets. Matthew Lancashire IT Project Manager Initial Electronic Security Ltd Tel: +44 1282 473554 Fax: +44 1254 267552 - 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]
External links around graphics (no text) don't work.
Title: Message I am using FOP to produce PDF output. I need to produce a graphic which is a link to a web page. The external link feature works fine if the content is text - but if it is only a graphic then I can't find the link. If I have mixed text and graphics - then only the text seems to get the link. Anyone else encountered this or knows a fix? Mike Trotman Datalucid Limited
RE: External links around graphics (no text) don't work.
I'm not sure on version - too many different machines and OS's. Probably 0.20.4. Also recently changed up to j2sdk1.4.0 (everywhere I think). I will try 0.20.5rc2 (haven't loaded it yet - mine just says 0.20.5rc)), recreate the test and see if the problem persists. If there have been some fixes then hopefully should work. I'll only repost with example if it doesn't work. Thanks for the prompt response. -Original Message- From: J.Pietschmann [mailto:[EMAIL PROTECTED] Sent: 21 February 2003 18:40 To: [EMAIL PROTECTED] Subject: Re: External links around graphics (no text) don't work. Mike Trotman wrote: I am using FOP to produce PDF output. I need to produce a graphic which is a link to a web page. The external link feature works fine if the content is text - but if it is only a graphic then I can't find the link. What FOP version are you using? There has been some fixess in this area for the most recent version. If you use already 0.20.5rc2, please provide a small, self-contained example (including all graphics!) which demonstrates the problem. J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]