全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- TCECS 1278-2023 海绵城市设施施工和验收标准
- GB 50193-93 二氧化碳灭火系统设计规范及条文说明
- 环境影响评价师考试题及答案
- 红狮集团校招面试题及答案
- 公务员面试考题转换词语面试题及答案
- 国家融资担保基金招聘真题及答案
- 国家农业信贷担保联盟招聘真题及答案
- 国家电投秋招试题及答案
- 2026年黔南民族幼儿师范高等专科学校单招职业适应性考试必刷测试卷完美版
- 2026年衡阳科技职业学院单招综合素质考试题库汇编
- 食物的来源及获取方式
- “红旗杯”竞赛总题库-3班组长创新和数字化管理能力考试题库(附答案)
- 工程力学-何培玲(中文电子课件)全套教案课件
- 彩钢棚搭建合同协议书
- 高中生物教学中反思性学习的深度探究与实践应用
- 【KAWO科握】2025年中国社交媒体平台指南报告
- 职业人群心理健康促进指南 2025
- 人教版初中化学九年级上册第六单元《碳和碳的氧化物》课题1《金刚石、石墨和C60》第二课时《单质碳的化学性质》教学设计
- 【西安交通大学】2025年电力人工智能多模态大模型创新技术及应用报告
- 旅游业消费者行为分析数据表
- 工贸行业企业安全风险分级管控清单
评论
0/150
提交评论