- Home
- Skills
- APIs & Backend
- Dependency-Free DOCX and PDF Report Writers
Dependency-Free DOCX and PDF Report Writers
Pulling a PDF library and a DOCX library into a server adds megabytes of transitive code to audit for two formats that are, at the level a report needs, small.
$35
Works with the AI Agents you already use
Dependency-Free DOCX and PDF Report Writers
Example session with this skill installed
Generate a PDF and DOCX audit summary for 'Project Alpha' with a title, a 2-column key-value table for 'Status' and 'Risk', and a final callout block.
- Read your context and instructions
- Compiled the dependency-free docx
I have generated the report buffers for Project Alpha. The PDF includes the calculated cross-reference table for standard readers, and the DOCX has been bundled into a valid ZIP archive with CRC-32 verification.
Report Render Summary
| Format | Size | Pages | Status |
|---|---|---|---|
| 12.4 KB | 1 | Success | |
| DOCX | 8.2 KB | 1 | Success |
Document Structure
[
{ "type": "title", "text": "Audit Summary: Project Alpha" },
{
"type": "keyvalue",
"rows": [
{ "key": "Status", "value": "Completed" },
{ "key": "Risk level", "value": "Low" }
]
},
{
"type": "callout",
"text": "All security controls verified against baseline."
}
]
Next steps
- Verify the PDF layout using any standard viewer to check Helvetica wrapping.
- Open the DOCX in Word to confirm the key-value pairs rendered as editable tables.
- Integrate the
renderPdfandrenderDocxfunctions into your Node.js API response stream.
Connects securely to your tools. The creator never sees your data.
About this skill
A statement, an audit summary or a CPA report must leave the system as a file a person can open, print and email: a PDF for the customer, a Word file for the accountant who wants to edit it. Pulling a PDF library and a DOCX library into a server adds megabytes of transitive code to audit for two formats that are, at the level a report needs, small.
One block vocabulary: title, heading, paragraph (bold, size), callout (shaded with an accent bar), key/value rows, table (columns with alignment and width in points), list, spacer, and an Intelligent Mail barcode block.
PDF (pdf.mjs): base-14 Helvetica and Helvetica-Bold so nothing is embedded; real advance-width metrics for textWidth and wrapText, so lines fill the column without overflowing; US Letter with 0.75-inch margins; tables whose rows never split and whose header is redrawn on every page; a "Page n of m" footer added after pagination; WinAnsi escaping that maps dashes, quotes and ellipses and octal-escapes Latin-1; a hand-assembled cross-reference table.
DOCX (docx.mjs): the five required OOXML parts in a correct ZIP (CRC-32 table, local and central headers, UTF-8 name flag, deflate only when it helps, [Content_Types].xml first), styles for Title, Heading 1, Callout and Table Grid, repeating header rows, right alignment, point widths converted to twips (the classic twenty-times-too-narrow bug avoided), XML escaping that also drops the control characters Word refuses.
CLI (render-report.mjs): one JSON definition to both files. 5 tests that do not trust the writers: a ZIP reader checks CRCs, sizes and the central directory; a PDF parser follows every xref offset to its object and counts pages; a 120-row table paginates with headers on each page; every block renders; escaping and twip conversion are asserted. reference/sample-report.json and reference/block-vocabulary.md included.
Node 18+, no packages, no network.
Supports Helvetica only. No images, links, or form fields. PDF text limited to Latin-1. US Letter portrait fixed by default. Requires Node 18+.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 17 days ago
Requires