全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Dynamic headers and footers in FOPDynamic headers and footers in FOP1Preface1The problem1Why we need separate solution?1The objectives of PDF generation1The solution2Intermediate calculations2Positions inside table headers and footers2Values substitution3Known limitations3Feedback3PrefaceThe problemFor such tasks we need provide such intermediate calculations, and make separation of table headers and footers by position.(first, last, odd, even or direct number). Unfortunately, the existing process of PDF/QXP/InDesign generation prevents make easy and flexible solution. To imitate the same functionality, we need produce tables with fixed row heights, make complex templates, and make several tables rather one with proper table header/table footer customization.Why we need separate solution?The existing particular solutions require complex layouts, slave templates, and many tables to imitate one. The typical way contains: At least two (or three) tables or even two or three layouts (in case of multi-layout based solution) with the same (or similar) content Additional templates to make intermediate calculations Fixed row heights to be sure the required data have placed accurately Table header/table footer imitations with appropriate templates Slave tables to make such “brief/total” results.So we need a lot of technical details implemented manually with appropriate complexity of layout modifications.The objectives of PDF generationThe PDF generation process is based upon sequential and determined scheme described below:XSLT processor (Saxon)XSL-FO render engine (FOP)XMLXSLXSL-FOPDFAs you can see the PDF generation requires such independent steps to make. Every step provides its own data processing. At first step named XSLT the raw data (XML) with appropriate stylesheet (XSL) have being converted to well-formed XSL-FO document with detailed descriptions of every logical unit, such as page, page headers and footers, tables, static blocks, etc. At this time the logical markup have done; and for most cases it can be converted to physical form (PDF) as is. But we have few interceptions in this well-formed scheme; there are page overflows. This issue has performed later at the render phase. Unfortunately, at render phase we havent any data from previous step (XSLT phase) so we cannot perform any intermediate calculations here. So we have two issues must be pre-calculated and post-calculated at the other phase. Any intermediate calculations, such as summarizing, averages, differentials and any other must be done at XSLT phase. And table headers and table footers will be generated later, at render phase.The solutionIntermediate calculationsAll types of intermediate calculations must be provided by appropriate Saxon extensions, as the appropriate raw data is available only at XSLT phase. At this time we need to prepare all data for further rendering.For example, we can calculate intermediate summarizing by At the time of XSLT Saxon will calculate intermediate sums and place it to appropriate headers and/or footers of table. As user may require any complex calculations here, we cannot provide anything other in XSLfast as it already has.The same use case can be suggested for totals calculations; the separate table with appropriate “XPath” expressions inside will provide any kinds of proper calculations without any mis-features inside.Positions inside table headers and footersAs most commonly used task we need to make booklets, brochures, and other printable forms with first, last, odd and even page separation. And for usual cases the differences between these pages are main table headers and footers form. To make this solution more accurate and user friendly, we would provide FOP extensions for table headers and table footers.Every table will able using three different kinds of table header/footer placements independently of other pieces of data. There are “first”, “rest”, “odd” and “even” placement forms. For example, the following forms are applicable:So you will able specify wide list of differences for every table in one place. In fact, every fox:dynamic-table-header or fox:dynamic-table-footer might be completely different in comparison of each other. It might support different colors, different styles or even different content.Values substitutionOne of possible ways to make value substitution is using Saxon extensions like the examples above demonstrated. Unfortunately this way is context-sensitive and limited to XSLT. If we need to combine all three points of task we need another way to collect and fetch intermediate values within XSL-FO.The one of possible ways to organize map-like structure in XSL-FO like the following example:In appropriate templates we would expand values likeThe intermediate value X1 = This way will make us ability to fill out the intermediate results within XSLT phase into specific map inside XSL-FO, and will get us ability to refer the values were stored at XSLT phase within rendering phase.Known limitationsThe proposed method to improve FOP has the following limitations: FOP have no ability to resolve “last” page and “last” table piece, so the position “last” arent supported. FOP have support of “first” + “rest”, “odd” + “even”, and “first” + “odd” + “even” combinations only. The “rest” attribute might be used only with “first” placement type. The values substitution will not applicable for attribut
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026及未来5年中国TPR窗贴市场现状数据分析及前景预测报告
- 2026及未来5年中国N-甲基苄基苯胺市场现状数据分析及前景预测报告
- 2026年易地扶贫搬迁后续扶持考核题库附答案
- 2026年资产评估师《资产评估基础》真题及答案解析
- 带状疱疹讲课
- 2026年国家开放大学电大中级财务会计期末模拟试题及答案详解
- 2026年电工基常识模拟试题(含答案)
- 2026年爱婴医院护士模拟试题(含答案)
- 2026年材料力学绘图模拟试题(含答案)
- 2026年安徽历史考编模拟试题(含答案)
- 乙酸乙酯危险化学品安全周知卡培训课件
- 药品批发企业质量管理制度培训试卷及答案
- 2026年部队预防犯罪安全形势分析
- GB/T 47574.1-2026离心铸钢及合金铸件第1部分:通用试验与公差
- 2026年4月自考02160流体力学试题及答案含评分参考
- 自身免疫性溶血性贫血诊疗规范
- GB/T 47067-2026塑料模塑件公差和验收条件
- 2025年矿业权评估师(矿业权评估经济与法律专业能力)试题(含答案)
- 中学物理全套教材目录及说明
- 2025年交通事故统计
- 2025 SMETA员工公平职业发展管理程序-SEDEX验厂专用文件(可编辑)
评论
0/150
提交评论