xsl-fo

How can I prevent my footer from getting overflowed in xsl-fo?

别说谁变了你拦得住时间么 提交于 2019-12-10 10:20:03
问题 I'm generating a pdf from my xsl and xml files wherein I need to display a table at the end of the first page. But since there are some tables above this table also, displaying it as static text pushes it down to the 2nd page (or 3rd and so on). So i thought to make this table as a footer (just on the first page). So I have this table defined as a footer in my xsl file. My table is under the following code <fo:static-content flow-name="xsl-region-after" font-size="10pt"> When I try to

how to keep table with header but allow page breaks inside table body in XSL-FO using FOP

一世执手 提交于 2019-12-10 01:36:40
问题 I'm generating a PDF using Apache FOP and a XSL-FO stylesheet. In the PDF, I output headings (html equiv h1) which belong to a table, so should be kept together always. However, my tables may also contain so much data that they don't necessarily fit on one page. The desired result is a rule set that allows a heading to be kept with the table and fit both on one page if possible, but if the table data is so long that it does not fit on one page, then page breaks would be inserted in the table

How do you add a page break in a PDF with XSL-FO?

会有一股神秘感。 提交于 2019-12-08 23:26:58
问题 How do you add a page break into a document with XSL-FO? I'm using Apache FOP to create PDFs, if that makes a difference. 回答1: The FOP compliance page says that it supports page-break-after, page-break-before, and page-break-inside in the later versions, plus partial support for keep-together, keep-with-next, keep-with-previous. 回答2: You can also do: <fo:block page-break-before="always"> 回答3: Thanks, the following worked for adding a page break after a table: <fo:table break-after="page"> 回答4

How to make XSL-FO table caption repeat on each page when the table spans multiple pages?

馋奶兔 提交于 2019-12-08 20:41:46
问题 I have some very long tables which span multiple pages, rendered with Apache-FOP 1.1 A table has a caption, such as "Table 7.6. Details of Something" and column headers. On each continued page, the column headers are properly repeated at the top. But I also need to have the table continuations have the caption as well, in the form: "Table 7.6. Details of Something (continued)" Is there any way to do this with XSL-FO and Apache-FOP? or does it require extensions perhaps available via RenderX?

How to set the default language in Apache FOP

匆匆过客 提交于 2019-12-08 17:43:29
问题 I'm generating PDF files using Apache FOP 2.1. For this I am trying to set the default language to be English. This is supposed to be verified after the creation of the PDF via Adobe Reader's option File/Properties/Advanced/Reading Options. This value currently is empty. I have tried setting xml:lang="en" in fo:root element, in first page-sequence or in the very first element of the .xsl file... Nothing seams to do the trick. Any Advice? Thanks Dimitris. Update: I have tried 2 more options as

using xml as xsl variable

牧云@^-^@ 提交于 2019-12-08 13:50:46
问题 I have to create slightly dynamic pdf (two variables) with two text blocks in different languages. Most of the text in both blocks is static I was thinking if I could create one template that would create xsl-fo for the layout. Then create two variables containing custom xml. Something like: <xsl:variable name="TEXT_CONTENT_ENG" > <STATIC_TEXT> <LABEL>Hello</LABEL> <REQUEST>Please pay your bill before </REQUEST> </STATIC_TEXT> </xsl:variable> Finally I could apply created template twice using

XSL-FO add new line after each node

回眸只為那壹抹淺笑 提交于 2019-12-08 13:26:45
问题 I have an XML file with structure like this: <parent> <node>Text 1</node> <node>Text 2</node> <node>Text 3</node> <node>Text 4</node> <node>Text 5</node> </parent> I want to process this XML with XSL-FO to produce PDF output. I have following XSL-FO template: <fo:block> <xsl:for-each select="node[position() < last()]"> <xsl:value-of select="."/> <xsl:if test="position() != last()"> <xsl:text> </xsl:text> </xsl:if> </xsl:for-each> </fo:block> It seems that this doesn't work well. I get output

How to display one or the other information depending on the page number in XSL-FO?

◇◆丶佛笑我妖孽 提交于 2019-12-08 10:52:11
问题 I'm using XSL-FO to create PDF's. Now I have a label that I want to display only on the first page, and another label that I want to display on all other pages, e.g. Page 1 Last month's balance Page 2 - n Previous page's balance The whole PDF is actually just a simple table, so this isn't about a cover page that stands outside of the data. How can I do it? See also this related question: How can I sum up some values per page in a table in XSL-FO? 回答1: This one can either be achieved using fo

XSLT Generate Dynamic Rows and Columns for Apache FOP

北城余情 提交于 2019-12-08 07:28:40
问题 For the following xml file, i need to generate an xsl-fo file to be converted into pdf. I am new to style sheets and struggling to create dynamic table. Please help. Also, the width for each column varies,based on the column.How would i include this into the code? The Column Headers and Column Values are dynamically populated in the xml file. Below is a sample. Can anybody please help in generating xsl-fo or xslt code? <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ReportData>

XSL FO : Multiple language pdf using french,German and Italian characters

为君一笑 提交于 2019-12-08 04:07:15
问题 I'm using FOP 1.1 jar in my project. Problem is like that, when i'm printing static text like "Numéro de commande" from french language in my xsl fo template, then strange characters are appearing instead of "é". I'm using font family(Times Roman) of base 14 in fo root tag but still this problem is occurring. In the end,Please help me to solve this issue. 回答1: (posting a short example of your FO file could really help finding a precise solution; without that, we can only try to guess ...) The