[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACPM1YT035V0A5RGQXP9AB":3,"skill-same:01M6ACPM1YT035V0A5RGQXP9AB":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":41,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":7,"updatedAt":44,"install":45,"resources":58},"01M6ACPM1YT035V0A5RGQXP9AB","manage-pdf-export","PDF 导出管理",null,"","apache\u002Fofbiz-plugins","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACMJJ1Q4WYATY4GXZ2FAVD",178,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-pdf-export\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BZMAGTC3AX6BXFCBFS1HPF","文件打包与导出","SCENARIO","使用场景",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8C6RQ852C9AEJFCBGG1YA7S","IT 管理员","PROFESSION","适用职业",[30,31],"PDF","manage pdf export","2026-11-10 10:12:30",false,"\u003C!--\nLicensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\nhttp:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n-->\n\n---\nname: manage-pdf-export\ndescription: Guidelines for generating printable PDF documents in OFBiz using Apache FOP (XSL-FO).\n---\n\n# Skill: manage-pdf-export\n\n## Goal\nDesign and implement professional printable documents (e.g., invoices, packing slips) using Apache FOP (XSL-FO) for PDF generation.\n\n## Triggers\n**ALWAYS** read this skill when:\n- Creating printable business documents.\n- Implementing report-specific screen definitions for PDF output.\n- Converting HTML\u002FFTL templates to XSL-FO.\n\n## Use when\n- Generating legal or formal documents (PDF).\n- Batch printing operations.\n- **NOT** for data dumps (CSV\u002FExcel) - use a separate data export skill.\n\n## Procedure\n1.  **Output Format**:\n    - `application\u002Fpdf` (Apache FOP): The standard for printable documents with strict layout requirements.\n\n2.  **Data Preparation (Groovy\u002FJava)**:\n    - Create a dedicated service or groovy script to fetch document data.\n    - **Optimization**: Use `EntityListIterator` if the document contains large lists.\n    - **Structure**: Nested maps\u002Flists are best for Master-Detail PDFs (e.g., Header + Items).\n\n3.  **Template Design (XSL-FO via FTL)**:\n    - Use FreeMarker to inject dynamic data into XSL-FO tags.\n    - **Root**: `\u003Cfo:root>`\n    - **Layout**: `\u003Cfo:layout-master-set>` defining `simple-page-master` (A4, Letter).\n    - **Content**: `\u003Cfo:page-sequence>` containing `\u003Cfo:flow flow-name=\"xsl-region-body\">`.\n    - **Tables**: Use `\u003Cfo:table>` and `\u003Cfo:table-row>` for structured data.\n    - **Example Loop**:\n      ```xml\n      \u003C#list orderItems as item>\n        \u003Cfo:table-row>\n            \u003Cfo:table-cell>\u003Cfo:block>${item.description}\u003C\u002Ffo:block>\u003C\u002Ffo:table-cell>\n        \u003C\u002Ffo:table-row>\n      \u003C\u002F#list>\n      ```\n\n4.  **Screen Definition**:\n    - Define a screen in `widget\u002FCommonScreens.xml` or component-specific screen file.\n    - Use `xsl-fo` as the render-mode\u002Fcontent-type.\n    ```xml\n    \u003Cscreen name=\"OrderPdf\">\n        \u003Csection>\n            \u003Cactions>\n                \u003Cscript location=\"component:\u002F\u002Fmycomponent\u002FgroovyScripts\u002Fdocuments\u002FOrderPdf.groovy\"\u002F>\n            \u003C\u002Factions>\n            \u003Cwidgets>\n                \u003Cplatform-specific>\n                    \u003Cxsl-fo>\u003Chtml-template location=\"component:\u002F\u002Fmycomponent\u002Ftemplate\u002Fdocuments\u002FOrderPdf.fo.ftl\"\u002F>\u003C\u002Fxsl-fo>\n                \u003C\u002Fplatform-specific>\n            \u003C\u002Fwidgets>\n        \u003C\u002Fsection>\n    \u003C\u002Fscreen>\n    ```\n\n5.  **View Mapping (`controller.xml`)**:\n    - Map the request to the screen with type `screenfop`.\n    ```xml\n    \u003Cview-map name=\"OrderPdf\" type=\"screenfop\" page=\"component:\u002F\u002Fmycomponent\u002Fwidget\u002FOrderScreens.xml#OrderPdf\" content-type=\"application\u002Fpdf\" encoding=\"none\"\u002F>\n    ```\n\n## Guardrails\n- **Styling**: Styles in FO are verbose. Use FTL macros for common elements (headers, footers) to ensure consistency across documents.\n- **Fonts**: Ensure required fonts are available in the FOP configuration if using non-standard typefaces.\n- **Async**: For very large documents, generate them asynchronously via Job Scheduler and email the result.\n- **Security**: Ensure strict permission checks (`security.hasEntityPermission`) in the data preparation phase, as PDF generation often bypasses standard UI filters.\n\n## Examples\n**Example: XSL-FO Template Structure**\n```xml\n\u003Cfo:root xmlns:fo=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002FXSL\u002FFormat\">\n    \u003Cfo:layout-master-set>\n        \u003Cfo:simple-page-master master-name=\"main\" page-height=\"11in\" page-width=\"8.5in\"\n            margin-top=\"0.5in\" margin-bottom=\"0.5in\" margin-left=\"0.5in\" margin-right=\"0.5in\">\n            \u003Cfo:region-body margin-top=\"1in\"\u002F>\n            \u003Cfo:region-before extent=\"1in\"\u002F>\n            \u003Cfo:region-after extent=\"1in\"\u002F>\n        \u003C\u002Ffo:simple-page-master>\n    \u003C\u002Ffo:layout-master-set>\n\n    \u003Cfo:page-sequence master-reference=\"main\">\n        \u003Cfo:flow flow-name=\"xsl-region-body\">\n            \u003Cfo:block font-size=\"18pt\" font-weight=\"bold\" text-align=\"center\">\n                Order Document: ${orderHeader.orderId}\n            \u003C\u002Ffo:block>\n            \u003Cfo:table table-layout=\"fixed\" width=\"100%\">\n                \u003Cfo:table-column column-width=\"50%\"\u002F>\n                \u003Cfo:table-column column-width=\"50%\"\u002F>\n                \u003Cfo:table-body>\n                    \u003C#list orderItems as item>\n                    \u003Cfo:table-row>\n                        \u003Cfo:table-cell>\u003Cfo:block>${item.description}\u003C\u002Ffo:block>\u003C\u002Ffo:table-cell>\n                        \u003Cfo:table-cell>\u003Cfo:block>${item.unitPrice}\u003C\u002Ffo:block>\u003C\u002Ffo:table-cell>\n                    \u003C\u002Ffo:table-row>\n                    \u003C\u002F#list>\n                \u003C\u002Ffo:table-body>\n            \u003C\u002Ffo:table>\n        \u003C\u002Ffo:flow>\n    \u003C\u002Ffo:page-sequence>\n\u003C\u002Ffo:root>\n```\n",{},"trunk","6c6c27710443de03e9247605d33a2e2f5bc3d1e2","ai-agent-skills\u002Fmanage-pdf-export",222,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins","https:\u002F\u002Fofbiz.apache.org\u002F","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-12 22:04:06",{"source":9,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add apache\u002Fofbiz-plugins --skill manage-pdf-export",{"tool":51,"command":52},"bunx","bunx skills add apache\u002Fofbiz-plugins --skill manage-pdf-export",{"tool":54,"command":55},"pnpm","pnpm dlx skills add apache\u002Fofbiz-plugins --skill manage-pdf-export","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-pdf-export\u002FSKILL.md",true,[59,65],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"evals\u002Fevals.json","REFERENCE","参考文档",6833,"https:\u002F\u002Fgithub.com\u002FJetBrains\u002Fintellij-community\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fyoutrack-community\u002Fevals\u002Fevals.json",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fcli-reference.md",10321,"https:\u002F\u002Fgithub.com\u002FJetBrains\u002Fintellij-community\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fyoutrack-community\u002Freferences\u002Fcli-reference.md",[70,84,96,110,124,138],{"skillNo":71,"name":72,"nameZh":73,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":74,"categories":75,"keywords":82,"publishedAt":32},"01M6ACQSN90YKJZ92MQ52D9R8H","prepush-readiness","推送前就绪检查","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fprepush-readiness\u002FSKILL.md",[76,79],{"categoryNo":77,"categoryName":78,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":80,"categoryName":81,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理",[83],"prepush readiness",{"skillNo":85,"name":86,"nameZh":87,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":88,"categories":89,"keywords":94,"publishedAt":32},"01M6ACQPR1WRA751V4DXVC3AHF","manage-webapps","Web 应用管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-webapps\u002FSKILL.md",[90,91],{"categoryNo":77,"categoryName":78,"taxonomyType":27,"taxonomyTypeDesc":28},{"categoryNo":92,"categoryName":93,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BWKS60NTYJHFE9FQSXGDKS","低代码应用开发",[95],"manage webapps",{"skillNo":97,"name":98,"nameZh":99,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":100,"categories":101,"keywords":108,"publishedAt":32},"01M6ACQMCX8Z7NY2CE08NCV6ND","manage-themes","主题管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-themes\u002FSKILL.md",[102,105],{"categoryNo":103,"categoryName":104,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQ6TQMKHSMFVQHR2KYAEVN","界面设计师",{"categoryNo":106,"categoryName":107,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[109],"manage themes",{"skillNo":111,"name":112,"nameZh":113,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":114,"categories":115,"keywords":122,"publishedAt":32},"01M6ACQHYN20AFWF6TKK4RGQ8A","manage-tests","测试管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-tests\u002FSKILL.md",[116,119],{"categoryNo":117,"categoryName":118,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":120,"categoryName":121,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[123],"manage tests",{"skillNo":125,"name":126,"nameZh":127,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":128,"categories":129,"keywords":136,"publishedAt":32},"01M6ACQFRMW7R45YD3HRAXPGWF","manage-templates","模板管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-templates\u002FSKILL.md",[130,133],{"categoryNo":131,"categoryName":132,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TK1MPB82068236GSXDE","文档处理",{"categoryNo":134,"categoryName":135,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BQ6TPH3VQWKQZXV7EPF8VZ","办公行政人员",[137],"manage templates",{"skillNo":139,"name":140,"nameZh":141,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":142,"categories":143,"keywords":148,"publishedAt":32},"01M6ACQCSSDZQMD8VX2K3WRR93","manage-strategies","策略管理","https:\u002F\u002Fgithub.com\u002Fapache\u002Fofbiz-plugins\u002Fblob\u002Ftrunk\u002Fai-agent-skills\u002Fmanage-strategies\u002FSKILL.md",[144,147],{"categoryNo":145,"categoryName":146,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BTXF8K9DFQC4T4TXVH0NMZ","策略与托管设置管理",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[149],"manage strategies"]