I want the four different footer on last page, first-page, odd-page, even-page using XSL-FO - xslt

I am making an XSL:FO file which contains four pages where first-page header contains the title of the chapter, and the odd and even pages has the footer of page numbers and last-page contains the footer of small table

Look at fo:page-sequence-master (see https://www.w3.org/TR/xsl11/#fo_page-sequence-master) and particularly at fo:repeatable-page-master-alternatives (see https://www.w3.org/TR/xsl11/#fo_repeatable-page-master-alternatives).
You essentially want to set up your alternatives in the sequence 'first', 'last', 'rest'. (You could also set it up to have different page masters for odd and even pages if you wanted.)
See, for example:
"Switching between right and left page layouts (<fo:page-sequence-master>)" in "Comprehensive XSL-FO Tutorials and Samples Collection" at https://www.antennahouse.com/comprehensive-xsl-fo-tutorials-and-samples-collection/
How to place content at the bottom of the last page of my document
https://stackoverflow.com/a/28382375/4092205
https://stackoverflow.com/a/17651048/4092205

Related

Repeat a section in the HTML page

Hi everyone!
I have this template which uses a table and I want that the section "Repeat this section depending on total records" be repeated. The scenario is that a certain person can have multiple entries (which will be placed in the "repeat this section...") and once that is created, I will convert this into a pdf page with breaks.
Is there a way to do this? The result will be something like this

XSL:FO - Page break on two dynamic areas?

I'm using XSLFast and was wondering if the following is possible:
I have a page with static content and one area containing a table that outputs XML-data. The table is set to a specific height so that the page breaks when the height is reached and continues outputting one the next page.
Now,
I want to add another area containing such a table with the exact feature. Is that possible on one side?
I have never used XSLFast, but...
XSL 1.1 allows an fo:simple-page-master to have multiple fo:region-body. (See https://www.w3.org/TR/xsl/#fo_simple-page-master.) I do not know if XSLFast supports it, but with a formatter that supports multiple fo:region-body, you could put the red table and the blue table in separate fo:flow and direct them to the two different fo:region-body. The formatter would then make another page whenever either fo:region-body overflowed.

Dynamic footer row prints outside the content area

I'm using LiveCycle Designer ES 8.2.1. I also have a web application injecting data into the report I created with LiveCycle. The basic structure is the following:
1 Master page with 1 page and a content area containing a table filled with a list of object. My table has 1 header row, 2 body rows and a footer row that is added dynamically with page break condition.
The logic behind that is written in FormCalc. Our objects are sent as a list which fills either one or the other body row based on a type. Each object has an "authority" property with a certain value that are used to mark the pages. The list of object is sorted by authority. So, when the current iterating object has a different authority than the previous one, we insert a page brake and the footer row. Everything is wraped in a subform that is "In Content Area" (Object/Pagination/Place).
The problem is that the footer row is not considered as part of the content area. If the last line of a section fits tight in the content area, the footer row overflows outside the content area and even the whole page in some cases.
Here are more details:
We tried any combination of subform wraping and ticking of the "Allow page break with content" check box.
We tried changing the type of the footer row for a body row in case footers were different than body rows.
We tried every combination of "Keep with" and "place".
We tried to change the footer row to a body row and have it displayed on every page and that work, but our client refused the solution...
Starting with the above (pt 4) template and changing back the body to footer row brought us to the begining
To the best of our knowledge, we tried everyting possible...
What I'm looking for is either a confirmed bug for version 8.2.1 about this or a solution other than redesigning the whole report.

How to determine if a given word or phrase from a list is within an anchor tag?

We have a ColdFusion based site that involves a large number of 'document authors' that have little or no knowledge of HTML. The 'documents' they create are comprised of HTML stored in a table in the database. They use a CKEDITOR interface. The content that they create is output into specific area of the page. The document frequently has tons of technical terms that readers may not be familiar with that we would like to have tooltips automatically show up for.
I and the other programmer want to have some code insert 'tooltip' code into the page based on a list of words in a table on our SQL server. The 'dictionary' table in our database has a unique ID, the word/phrase we will look for and a corresponding definition that would be displayed in the tooltip.
For instance, one of the word/phrases we will be looking for is 'Scrum Master'. If it occurs in the document area, we need to insert code around the words to create a tooltip. To do that, we need to see if certain conditions exist. Are the words within an anchor tag? If yes, is there already a title value for the tag (title is used to contain the info to be displayed in a tooltip)? If a title tag exists, don't do anything. If the words are not in an anchor tag, then we would put anchor tags around the words along with the title that will contain the definition.
The tooltip code we use is via jQuery (http://jqueryui.com/tooltip/). It is quick and simple to use. We just need to figure out how to use it dynamically based on our dictionary table.
Do you have any suggestions of how to go about this?
I was hoping that jSoup might have a function that I could use, but that doesn't seem to be the right technology for what I want to do, but I could be wrong and I am happy to be corrected!
We have a large number of these documents and so manually inserting and maintaining the tooltip code is just not an option.
Update you content with something like:
strOut = ReplaceList(strIn, ValueList(qryTT.find), ValueList(qryTT.replace));
Since words are delimited by spaces, the qryTT.find needs to have spaces. The replace column is going to need to include some of the original content. You are going to have to be careful with words followed by a comma or a period too.
I would cache the results because I would expect it to be memory intensive.

Dynamic page numbering using XSL snippet

I have page numbers in sequential order within a RTF document. However my document output has multiple documents in sequential order. My first document is of 4 pages, the second is for 3 pages and 3rd 2 pages. My single document output throws out a RTF document comprising of all three documents. But the page no.s are in increasing order 1,2,3,4 ....
Ideally I would want my second document to start from page 1 and so is the case with my third document.
How do I accomplish this using XSL coding within the footer ?
Thanks.
In XSL-FO to restart page numbers in a page sequence use initial-page-number="1" on your <fo:page-sequence> element.
Whether that works for your RTF output or not is up to the vendor of your software. What I've given you is what the specification says to do.