[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6WWX0JCEMFVMKN1R1GKJDVQ":3,"skill-same:01M6WWX0JCEMFVMKN1R1GKJDVQ":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":14,"repositoryHtmlUrl":63,"repositoryHomepageUrl":64,"ownerHtmlUrl":65,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":66,"install":67,"resources":80},"01M6WWX0JCEMFVMKN1R1GKJDVQ","pdf-workflow",null,"Generating and manipulating PDF files — from HTML, DOCX, or raw content using reportlab, weasyprint, or pypdf. Use when producing PDF reports, invoices, certificates, or when merging, splitting, or extracting text from existing PDFs.","projectious-work\u002Fprocesskit","projectious-work","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F263889726?v=4","01M6N97TJJ118WQ35CHRV8RD0E","projectious.work","01M6N97TPWJPF0BMKYQ4PBY5W8",0,"MIT","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.10.0\u002Fcontext\u002Fskills\u002Fdocuments\u002Fpdf-workflow\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"PDF","workflow","pdf workflow","when","docx","weasyprint","Existing","v1","invoices","extracting","wed","files","reports","html","use","work","text","certificates","content","documents","2026-11-10 10:12:30",false,"---\nname: pdf-workflow\ndescription: |\n  Generating and manipulating PDF files — from HTML, DOCX, or raw content using reportlab, weasyprint, or pypdf. Use when producing PDF reports, invoices, certificates, or when merging, splitting, or extracting text from existing PDFs.\nmetadata:\n  processkit:\n    apiVersion: processkit.projectious.work\u002Fv1\n    id: SKILL-pdf-workflow\n    version: \"1.0.0\"\n    created: 2026-04-08T00:00:00Z\n    category: documents\n    layer: 2\n---\n\n# PDF Workflow\n\n## Intro\n\nChoose your tool based on the source format. **WeasyPrint** converts\nHTML+CSS to PDF — the right choice for report and invoice generation\nbecause HTML is easy to template. **ReportLab** builds PDFs from\nprimitives (text, lines, images) — good for certificates and pixel-\nprecise layouts. **pypdf** reads, merges, splits, and annotates\nexisting PDFs without re-rendering.\n\n## Overview\n\n### Tool selection\n\n| Need | Tool | Notes |\n|---|---|---|\n| HTML\u002FCSS → PDF | `weasyprint` | Jinja2 templates + CSS for layout |\n| Programmatic layout | `reportlab` | `platypus` for flow; `canvas` for precise |\n| Merge \u002F split \u002F rotate | `pypdf` | Pure manipulation; no re-render |\n| Extract text | `pypdf` or `pdfminer.six` | `pdfminer` handles complex encodings |\n| Fill PDF forms | `pypdf` | AcroForms via `pypdf.PdfWriter` |\n| Watermark \u002F stamp | `pypdf` | Merge a watermark page onto each page |\n\nInstall: `uv add weasyprint reportlab pypdf` (or whichever subset\nyou need).\n\n### WeasyPrint (HTML → PDF)\n\n```python\n# \u002F\u002F\u002F script\n# dependencies = [\"weasyprint\", \"jinja2\"]\n# \u002F\u002F\u002F\nfrom weasyprint import HTML, CSS\nfrom jinja2 import Environment, FileSystemLoader\n\nenv = Environment(loader=FileSystemLoader(\"templates\"))\ntemplate = env.get_template(\"invoice.html\")\nhtml_str = template.render(invoice_number=\"INV-042\", total=1250.00,\n                            line_items=[...])\n\n# Render to file\nHTML(string=html_str).write_pdf(\"invoice.pdf\")\n\n# Render to BytesIO\nfrom io import BytesIO\nbuf = BytesIO()\nHTML(string=html_str).write_pdf(buf)\nbuf.seek(0)\n```\n\n**CSS layout tips for PDF:**\n- `@page { size: A4; margin: 2cm 2.5cm; }` sets paper size and margins.\n- `page-break-before: always` \u002F `page-break-after: avoid` control page breaks.\n- `@media print { .no-print { display: none; } }` hides screen-only elements.\n- WeasyPrint supports Flexbox and Grid but not JavaScript. Keep CSS to what\n  a print stylesheet would use.\n- Embed fonts with `@font-face` to guarantee exact rendering.\n\n### ReportLab — Platypus (document flow)\n\n```python\n# \u002F\u002F\u002F script\n# dependencies = [\"reportlab\"]\n# \u002F\u002F\u002F\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle\nfrom reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle\nfrom reportlab.lib.pagesizes import A4\nfrom reportlab.lib.units import cm\nfrom reportlab.lib import colors\n\nstyles = getSampleStyleSheet()\n\ndoc = SimpleDocTemplate(\"report.pdf\", pagesize=A4,\n                        leftMargin=2.5*cm, rightMargin=2.5*cm,\n                        topMargin=2*cm, bottomMargin=2*cm)\n\nstory = []\nstory.append(Paragraph(\"Annual Report 2026\", styles[\"Title\"]))\nstory.append(Spacer(1, 0.5*cm))\nstory.append(Paragraph(\"Executive summary goes here...\", styles[\"BodyText\"]))\n\n# Table\ndata = [[\"Metric\", \"Value\"], [\"Revenue\", \"$1.25M\"], [\"Growth\", \"18%\"]]\nt = Table(data, colWidths=[8*cm, 6*cm])\nt.setStyle(TableStyle([\n    (\"BACKGROUND\", (0, 0), (-1, 0), colors.HexColor(\"#2E74B5\")),\n    (\"TEXTCOLOR\",  (0, 0), (-1, 0), colors.white),\n    (\"FONTNAME\",   (0, 0), (-1, 0), \"Helvetica-Bold\"),\n    (\"GRID\",       (0, 0), (-1, -1), 0.5, colors.grey),\n    (\"ROWBACKGROUNDS\", (0, 1), (-1, -1), [colors.white, colors.HexColor(\"#EBF3FA\")]),\n]))\nstory.append(t)\n\ndoc.build(story)\n```\n\n### ReportLab — Canvas (precise layout)\n\n```python\nfrom reportlab.pdfgen import canvas\nfrom reportlab.lib.pagesizes import A4\nfrom reportlab.lib.units import cm\n\nc = canvas.Canvas(\"certificate.pdf\", pagesize=A4)\nwidth, height = A4\n\nc.setFont(\"Helvetica-Bold\", 36)\nc.drawCentredString(width \u002F 2, height - 6*cm, \"Certificate of Completion\")\n\nc.setFont(\"Helvetica\", 18)\nc.drawCentredString(width \u002F 2, height - 9*cm, \"Awarded to: Alice Smith\")\n\nc.drawImage(\"seal.png\", width\u002F2 - 3*cm, 3*cm, width=6*cm, height=6*cm,\n            mask=\"auto\")\nc.showPage()\nc.save()\n```\n\nUse `canvas` for certificates, labels, and receipts where exact\npositioning matters. Use `platypus` for multi-page documents with\nflowing text.\n\n### pypdf — merge, split, rotate, extract\n\n```python\n# \u002F\u002F\u002F script\n# dependencies = [\"pypdf\"]\n# \u002F\u002F\u002F\nfrom pypdf import PdfReader, PdfWriter\n\n# Merge PDFs\nwriter = PdfWriter()\nfor path in [\"cover.pdf\", \"body.pdf\", \"appendix.pdf\"]:\n    reader = PdfReader(path)\n    for page in reader.pages:\n        writer.add_page(page)\nwith open(\"merged.pdf\", \"wb\") as f:\n    writer.write(f)\n\n# Extract pages 2-5 (0-indexed)\nreader = PdfReader(\"report.pdf\")\nwriter = PdfWriter()\nfor page in reader.pages[1:5]:\n    writer.add_page(page)\nwith open(\"excerpt.pdf\", \"wb\") as f:\n    writer.write(f)\n\n# Extract text\nreader = PdfReader(\"document.pdf\")\nfor page in reader.pages:\n    print(page.extract_text())\n\n# Rotate a page\nreader.pages[0].rotate(90)\n```\n\n### Watermarking\n\n```python\nfrom pypdf import PdfReader, PdfWriter\n\nwatermark = PdfReader(\"watermark.pdf\").pages[0]\nreader = PdfReader(\"original.pdf\")\nwriter = PdfWriter()\n\nfor page in reader.pages:\n    page.merge_page(watermark)\n    writer.add_page(page)\n\nwith open(\"watermarked.pdf\", \"wb\") as f:\n    writer.write(f)\n```\n\n### Accessibility checklist\n\nBefore delivering a generated PDF:\n- Set document title, author, and language in metadata.\n- Ensure text is selectable (not a rasterized image).\n- Add alt text for images (requires PDF\u002FUA tagging — ReportLab\n  Platypus supports this via `platypus.flowables.AnchoredFlowable`).\n- Verify 4.5:1 color contrast for body text.\n- Test that copy-paste produces legible text.\n\n## Gotchas\n\nAgent-specific failure modes — provider-neutral pause-and-self-check items:\n\n- **Choosing ReportLab canvas for a multi-page report.** Canvas is a low-level drawing API — positioning every element manually on every page is tedious and error-prone for flowing content. Multi-page documents with headings, body text, and tables belong in ReportLab's Platypus framework or in WeasyPrint. Reserve canvas for certificate-style layouts where exact pixel placement matters.\n- **Using WeasyPrint with JavaScript-dependent HTML.** WeasyPrint does not execute JavaScript. A template that uses JS to populate data, collapse sections, or set styles will silently produce a blank or wrong PDF. All data must be server-rendered into the HTML before passing to WeasyPrint.\n- **Not embedding fonts in the PDF.** A PDF that references system fonts will render differently on machines where those fonts are not installed. WeasyPrint embeds fonts via `@font-face`; ReportLab registers fonts with `pdfmetrics.registerFont`. Always embed or use the built-in safe set (Helvetica, Times-Roman, Courier) for documents that travel.\n- **Treating `page.extract_text()` output as structured data.** `pypdf`'s text extraction preserves reading order in simple PDFs but loses column structure in multi-column layouts, tables, and PDFs produced from scans. For structured extraction from complex PDFs use `pdfminer.six` with its layout analysis, or a specialized OCR pipeline.\n- **Merging PDFs without normalizing page sizes first.** Merging an A4 page and a Letter-size page produces a PDF where every other page is a different size. Verify that all source PDFs have the same page dimensions before merging, or resize pages to a common size with ReportLab canvas as an intermediary.\n- **Not setting document metadata (title, author, language).** A PDF without `title` and `lang` metadata fails basic accessibility checks and shows \"Untitled\" in browser tab bars and screen readers. Set `writer.add_metadata({\"\u002FTitle\": \"...\", \"\u002FAuthor\": \"...\"})` (pypdf) or `doc.build(story, onFirstPage=set_metadata)` (ReportLab) before saving.\n- **Generating PDFs with rasterized text (converting HTML to image first).** Tools that screenshot a page and save the image as a PDF produce files where text is not selectable, searchable, or accessible. Always generate PDFs from text-based sources (HTML, Platypus, canvas) so the text layer exists in the output.\n\n## Full reference\n\n### Page sizes\n\n```python\nfrom reportlab.lib.pagesizes import A4, A3, LETTER, LEGAL, landscape\n# A4 = (595.28, 841.89) points\n# landscape(A4) = (841.89, 595.28)\n```\n\nWeasyPrint CSS: `@page { size: A4 landscape; }` or\n`@page { size: 210mm 297mm; }`.\n\n### PDF metadata (pypdf)\n\n```python\nwriter.add_metadata({\n    \"\u002FTitle\": \"Q1 Report\",\n    \"\u002FAuthor\": \"Finance Team\",\n    \"\u002FSubject\": \"Quarterly Financial Report\",\n    \"\u002FKeywords\": \"finance, Q1, 2026\",\n    \"\u002FCreator\": \"processkit pdf-workflow\",\n    \"\u002FLang\": \"en-US\",\n})\n```\n\n### PDF\u002FA compliance (archival)\n\nFor archival PDFs (legal, government, long-term storage) you may need\nPDF\u002FA-1b compliance. WeasyPrint supports this with a CSS flag:\n`HTML(string=html).write_pdf(\"out.pdf\", presentational_hints=True)`.\nFull PDF\u002FA-1b requires embedding all fonts, ICC color profiles, and\nsetting the correct XMP metadata — use a specialized library like\n`pdfa-generation` or validate output with `VeraPDF`.\n\n### Encryption (pypdf)\n\n```python\nwriter.encrypt(\"owner_password\", \"user_password\",\n               use_128bit=True, permissions_flag=-1)\n```\n\n`permissions_flag=-1` allows all operations. To restrict printing,\nset specific bits in the permissions integer.\n\n### pdfminer text extraction (complex layouts)\n\n```python\nfrom pdfminer.high_level import extract_text, extract_pages\nfrom pdfminer.layout import LTTextBox\n\ntext = extract_text(\"document.pdf\")\n\nfor page_layout in extract_pages(\"document.pdf\"):\n    for element in page_layout:\n        if isinstance(element, LTTextBox):\n            print(element.get_text())\n```\n","# PDF Workflow\n\n## Intro\n\nChoose your tool based on the source format. **WeasyPrint** converts\nHTML+CSS to PDF — the right choice for report and invoice generation\nbecause HTML is easy to template. **ReportLab** builds PDFs from\nprimitives (text, lines, images) — good for certificates and pixel-\nprecise layouts. **pypdf** reads, merges, splits, and annotates\nexisting PDFs without re-rendering.\n\n## Overview\n\n### Tool selection\n\n| Need | Tool | Notes |\n|---|---|---|\n| HTML\u002FCSS → PDF | `weasyprint` | Jinja2 templates + CSS for layout |\n| Programmatic layout | `reportlab` | `platypus` for flow; `canvas` for precise |\n| Merge \u002F split \u002F rotate | `pypdf` | Pure manipulation; no re-render |\n| Extract text | `pypdf` or `pdfminer.six` | `pdfminer` handles complex encodings |\n| Fill PDF forms | `pypdf` | AcroForms via `pypdf.PdfWriter` |\n| Watermark \u002F stamp | `pypdf` | Merge a watermark page onto each page |\n\nInstall: `uv add weasyprint reportlab pypdf` (or whichever subset\nyou need).\n\n### WeasyPrint (HTML → PDF)\n\n```python\n# \u002F\u002F\u002F script\n# dependencies = [\"weasyprint\", \"jinja2\"]\n# \u002F\u002F\u002F\nfrom weasyprint import HTML, CSS\nfrom jinja2 import Environment, FileSystemLoader\n\nenv = Environment(loader=FileSystemLoader(\"templates\"))\ntemplate = env.get_template(\"invoice.html\")\nhtml_str = template.render(invoice_number=\"INV-042\", total=1250.00,\n                            line_items=[...])\n\n# Render to file\nHTML(string=html_str).write_pdf(\"invoice.pdf\")\n\n# Render to BytesIO\nfrom io import BytesIO\nbuf = BytesIO()\nHTML(string=html_str).write_pdf(buf)\nbuf.seek(0)\n```\n\n**CSS layout tips for PDF:**\n- `@page { size: A4; margin: 2cm 2.5cm; }` sets paper size and margins.\n- `page-break-before: always` \u002F `page-break-after: avoid` control page breaks.\n- `@media print { .no-print { display: none; } }` hides screen-only elements.\n- WeasyPrint supports Flexbox and Grid but not JavaScript. Keep CSS to what\n  a print stylesheet would use.\n- Embed fonts with `@font-face` to guarantee exact rendering.\n\n### ReportLab — Platypus (document flow)\n\n```python\n# \u002F\u002F\u002F script\n# dependencies = [\"reportlab\"]\n# \u002F\u002F\u002F\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle\nfrom reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle\nfrom reportlab.lib.pagesizes import A4\nfrom reportlab.lib.units import cm\nfrom reportlab.lib import colors\n\nstyles = getSampleStyleSheet()\n\ndoc = SimpleDocTemplate(\"report.pdf\", pagesize=A4,\n                        leftMargin=2.5*cm, rightMargin=2.5*cm,\n                        topMargin=2*cm, bottomMargin=2*cm)\n\nstory = []\nstory.append(Paragraph(\"Annual Report 2026\", styles[\"Title\"]))\nstory.append(Spacer(1, 0.5*cm))\nstory.append(Paragraph(\"Executive summary goes here...\", styles[\"BodyText\"]))\n\n# Table\ndata = [[\"Metric\", \"Value\"], [\"Revenue\", \"$1.25M\"], [\"Growth\", \"18%\"]]\nt = Table(data, colWidths=[8*cm, 6*cm])\nt.setStyle(TableStyle([\n    (\"BACKGROUND\", (0, 0), (-1, 0), colors.HexColor(\"#2E74B5\")),\n    (\"TEXTCOLOR\",  (0, 0), (-1, 0), colors.white),\n    (\"FONTNAME\",   (0, 0), (-1, 0), \"Helvetica-Bold\"),\n    (\"GRID\",       (0, 0), (-1, -1), 0.5, colors.grey),\n    (\"ROWBACKGROUNDS\", (0, 1), (-1, -1), [colors.white, colors.HexColor(\"#EBF3FA\")]),\n]))\nstory.append(t)\n\ndoc.build(story)\n```\n\n### ReportLab — Canvas (precise layout)\n\n```python\nfrom reportlab.pdfgen import canvas\nfrom reportlab.lib.pagesizes import A4\nfrom reportlab.lib.units import cm\n\nc = canvas.Canvas(\"certificate.pdf\", pagesize=A4)\nwidth, height = A4\n\nc.setFont(\"Helvetica-Bold\", 36)\nc.drawCentredString(width \u002F 2, height - 6*cm, \"Certificate of Completion\")\n\nc.setFont(\"Helvetica\", 18)\nc.drawCentredString(width \u002F 2, height - 9*cm, \"Awarded to: Alice Smith\")\n\nc.drawImage(\"seal.png\", width\u002F2 - 3*cm, 3*cm, width=6*cm, height=6*cm,\n            mask=\"auto\")\nc.showPage()\nc.save()\n```\n\nUse `canvas` for certificates, labels, and receipts where exact\npositioning matters. Use `platypus` for multi-page documents with\nflowing text.\n\n### pypdf — merge, split, rotate, extract\n\n```python\n# \u002F\u002F\u002F script\n# dependencies = [\"pypdf\"]\n# \u002F\u002F\u002F\nfrom pypdf import PdfReader, PdfWriter\n\n# Merge PDFs\nwriter = PdfWriter()\nfor path in [\"cover.pdf\", \"body.pdf\", \"appendix.pdf\"]:\n    reader = PdfReader(path)\n    for page in reader.pages:\n        writer.add_page(page)\nwith open(\"merged.pdf\", \"wb\") as f:\n    writer.write(f)\n\n# Extract pages 2-5 (0-indexed)\nreader = PdfReader(\"report.pdf\")\nwriter = PdfWriter()\nfor page in reader.pages[1:5]:\n    writer.add_page(page)\nwith open(\"excerpt.pdf\", \"wb\") as f:\n    writer.write(f)\n\n# Extract text\nreader = PdfReader(\"document.pdf\")\nfor page in reader.pages:\n    print(page.extract_text())\n\n# Rotate a page\nreader.pages[0].rotate(90)\n```\n\n### Watermarking\n\n```python\nfrom pypdf import PdfReader, PdfWriter\n\nwatermark = PdfReader(\"watermark.pdf\").pages[0]\nreader = PdfReader(\"original.pdf\")\nwriter = PdfWriter()\n\nfor page in reader.pages:\n    page.merge_page(watermark)\n    writer.add_page(page)\n\nwith open(\"watermarked.pdf\", \"wb\") as f:\n    writer.write(f)\n```\n\n### Accessibility checklist\n\nBefore delivering a generated PDF:\n- Set document title, author, and language in metadata.\n- Ensure text is selectable (not a rasterized image).\n- Add alt text for images (requires PDF\u002FUA tagging — ReportLab\n  Platypus supports this via `platypus.flowables.AnchoredFlowable`).\n- Verify 4.5:1 color contrast for body text.\n- Test that copy-paste produces legible text.\n\n## Gotchas\n\nAgent-specific failure modes — provider-neutral pause-and-self-check items:\n\n- **Choosing ReportLab canvas for a multi-page report.** Canvas is a low-level drawing API — positioning every element manually on every page is tedious and error-prone for flowing content. Multi-page documents with headings, body text, and tables belong in ReportLab's Platypus framework or in WeasyPrint. Reserve canvas for certificate-style layouts where exact pixel placement matters.\n- **Using WeasyPrint with JavaScript-dependent HTML.** WeasyPrint does not execute JavaScript. A template that uses JS to populate data, collapse sections, or set styles will silently produce a blank or wrong PDF. All data must be server-rendered into the HTML before passing to WeasyPrint.\n- **Not embedding fonts in the PDF.** A PDF that references system fonts will render differently on machines where those fonts are not installed. WeasyPrint embeds fonts via `@font-face`; ReportLab registers fonts with `pdfmetrics.registerFont`. Always embed or use the built-in safe set (Helvetica, Times-Roman, Courier) for documents that travel.\n- **Treating `page.extract_text()` output as structured data.** `pypdf`'s text extraction preserves reading order in simple PDFs but loses column structure in multi-column layouts, tables, and PDFs produced from scans. For structured extraction from complex PDFs use `pdfminer.six` with its layout analysis, or a specialized OCR pipeline.\n- **Merging PDFs without normalizing page sizes first.** Merging an A4 page and a Letter-size page produces a PDF where every other page is a different size. Verify that all source PDFs have the same page dimensions before merging, or resize pages to a common size with ReportLab canvas as an intermediary.\n- **Not setting document metadata (title, author, language).** A PDF without `title` and `lang` metadata fails basic accessibility checks and shows \"Untitled\" in browser tab bars and screen readers. Set `writer.add_metadata({\"\u002FTitle\": \"...\", \"\u002FAuthor\": \"...\"})` (pypdf) or `doc.build(story, onFirstPage=set_metadata)` (ReportLab) before saving.\n- **Generating PDFs with rasterized text (converting HTML to image first).** Tools that screenshot a page and save the image as a PDF produce files where text is not selectable, searchable, or accessible. Always generate PDFs from text-based sources (HTML, Platypus, canvas) so the text layer exists in the output.\n\n## Full reference\n\n### Page sizes\n\n```python\nfrom reportlab.lib.pagesizes import A4, A3, LETTER, LEGAL, landscape\n# A4 = (595.28, 841.89) points\n# landscape(A4) = (841.89, 595.28)\n```\n\nWeasyPrint CSS: `@page { size: A4 landscape; }` or\n`@page { size: 210mm 297mm; }`.\n\n### PDF metadata (pypdf)\n\n```python\nwriter.add_metadata({\n    \"\u002FTitle\": \"Q1 Report\",\n    \"\u002FAuthor\": \"Finance Team\",\n    \"\u002FSubject\": \"Quarterly Financial Report\",\n    \"\u002FKeywords\": \"finance, Q1, 2026\",\n    \"\u002FCreator\": \"processkit pdf-workflow\",\n    \"\u002FLang\": \"en-US\",\n})\n```\n\n### PDF\u002FA compliance (archival)\n\nFor archival PDFs (legal, government, long-term storage) you may need\nPDF\u002FA-1b compliance. WeasyPrint supports this with a CSS flag:\n`HTML(string=html).write_pdf(\"out.pdf\", presentational_hints=True)`.\nFull PDF\u002FA-1b requires embedding all fonts, ICC color profiles, and\nsetting the correct XMP metadata — use a specialized library like\n`pdfa-generation` or validate output with `VeraPDF`.\n\n### Encryption (pypdf)\n\n```python\nwriter.encrypt(\"owner_password\", \"user_password\",\n               use_128bit=True, permissions_flag=-1)\n```\n\n`permissions_flag=-1` allows all operations. To restrict printing,\nset specific bits in the permissions integer.\n\n### pdfminer text extraction (complex layouts)\n\n```python\nfrom pdfminer.high_level import extract_text, extract_pages\nfrom pdfminer.layout import LTTextBox\n\ntext = extract_text(\"document.pdf\")\n\nfor page_layout in extract_pages(\"document.pdf\"):\n    for element in page_layout:\n        if isinstance(element, LTTextBox):\n            print(element.get_text())\n```\n",{"name":5,"metadata":52,"description":59},{"processkit":53},{"id":54,"layer":55,"created":56,"version":57,"category":46,"apiVersion":58},"SKILL-pdf-workflow",2,1775606400000,"1.0.0","processkit.projectious.work\u002Fv1","Generating and manipulating PDF files — from HTML, DOCX, or raw content using reportlab, weasyprint, or pypdf. Use when producing PDF reports, invoices, certificates, or when merging, splitting, or extracting text from existing PDFs.\n","main","4876a92620ee792aac2ac9a1a806322d8a572367","archive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.10.0\u002Fcontext\u002Fskills\u002Fdocuments\u002Fpdf-workflow","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit","https:\u002F\u002Fprojectious-work.github.io\u002Fprocesskit\u002F","https:\u002F\u002Fgithub.com\u002Fprojectious-work","2026-11-11 23:24:18",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add projectious-work\u002Fprocesskit --skill pdf-workflow",{"tool":73,"command":74},"bunx","bunx skills add projectious-work\u002Fprocesskit --skill pdf-workflow",{"tool":76,"command":77},"pnpm","pnpm dlx skills add projectious-work\u002Fprocesskit --skill pdf-workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Farchive\u002Fprocesskit-install-20261101\u002Fcontext\u002Ftemplates\u002Fprocesskit\u002Fv0.10.0\u002Fcontext\u002Fskills\u002Fdocuments\u002Fpdf-workflow\u002FSKILL.md",true,[],[82,89,96,102,124,143],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":88},"01M7665G2ED3624R3X93304265","standard-ui-design","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fstandard-ui-design\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":88},"01M76651QTC6W0HJ4AFW2MMR3V","standard-agent-use","Company standard for working with AI agents. Use when deciding what to delegate to agents, capturing open work, keeping agent memory or knowledge notes, improving an agent workflow, or introducing agent work in a team or for a client.","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fstandard-agent-use\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":88},"01M76650NN4T8P241021NBR64S","standard-agent-building","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fstandard-agent-building\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":109,"publishedAt":47},"01M6X5MTC89B4ZGXW3JVSQCPF8","skill-management","Manage Skill package manifests as v1 ontology entities.","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Fsrc\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fskill-management\u002FSKILL.md",[108],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[110,111,112,34,113,114,42,115,116,117,118,119,104,120,121,122,123],"management","skill management","ontology","create","as","transition","get","manage","update","alpha","list","package","skill package","manifests",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":131,"publishedAt":47},"01M6X5MCV74NHW5MEDNHZRF2C8","schema-management","Manage generated processkit schema contracts through deterministic MCP rebuild and inspection workflows.","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Fsrc\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fschema-management\u002FSKILL.md",[130],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[132,133,110,134,135,136,137,37,138,139,140,141,42,116,117,119,142],"schema","schema management","contract","rebuild","contracts","workflows","generated","MCP","validation","deterministic","mode",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":47},"01M6X5M5G6YJ96AMZGSCZJ1D13","proposition-management","Record claims, risks, beliefs, world facts, WSJF estimates, and assumptions through the Proposition interface.","https:\u002F\u002Fgithub.com\u002Fprojectious-work\u002Fprocesskit\u002Fblob\u002Fmain\u002Fsrc\u002Fcontext\u002Fskills\u002Fprocesskit\u002Fproposition-management\u002FSKILL.md",[],[150,110,151,152,113,153,154,155,42,116,156,157,118,158,119,159,160,161,162,163],"proposition management","proposition","interface","claims","record","world","creation","event","WSJF","index","updates","query","facts","log"]