pdflib-syntax-drawing
OfficialDraw precise PDF shapes with correct colors
System Documentation
What problem does it solve?
Many developers produce visually incorrect PDFs because of subtle pdf-lib API differences: color values in the wrong range, mismatched option names for lines versus shapes, incorrect ellipse sizing, and coordinate-origin confusion for top-aligned placement. This Skill captures the precise semantics and best practices for drawing shapes, lines, and SVG paths so generated pdf-lib code is correct and predictable.
Core Features & Use Cases
- Explicit guidance on color constructors and the required 0.0–1.0 numeric range to avoid silent color errors.
- Clear property mappings and method rules for drawRectangle, drawSquare, drawCircle, drawEllipse, drawLine, and drawSvgPath, including stroke/fill, dash, cap, and blend options.
- Practical examples for building diagrams, header bars, separators, annotations, and complex SVG path compositions in PDF documents.
Quick Start
Render a rotated dashed rectangle and a semi-transparent overlapping circle at the top of an A4 page using pdf-lib 1.x while ensuring rgb/cmyk/grayscale values are in the 0.0–1.0 range and positions are computed from page.getSize().
Dependency Matrix
Required Modules
None requiredComponents
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: pdflib-syntax-drawing Download link: https://github.com/OpenAEC-Foundation/pdf-lib-Claude-Skill-Package/archive/main.zip#pdflib-syntax-drawing Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.