


全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 焊接材料制造工适应性考核试卷及答案
- 外贸咨询采购计划方案
- 公司线上活动策划方案案例
- 建筑方案设计的表现方法
- 春节促销活动策划方案超市
- 农村建房工程质量管理
- 美容策划活动方案编辑软件
- 驾校嘉年华活动策划方案
- 石狮心理咨询方案
- 营销方案考试题库
- 贝壳融合训acn试题及答案
- 鸿蒙试题及答案
- 2025合肥市辅警考试试卷真题
- 贷款转移协议书
- 企业资金流动管理的试题及答案
- 中国休闲发展报告2023-2024(精简)
- 《面诊与面诊图谱》课件
- 公共设施不锈钢墙面施工方案与技术措施
- 借款抵押合同协议书
- 2025年“铸牢中华民族共同体意识”应知应会知识竞赛题库试卷及答案
- 2025至2030中国汽车前大灯及后装市场经营策略及投融资趋势研究报告
评论
0/150
提交评论