CodePDF How-To Guide & Visual Studio Documentation
Learn CodePDF step by step: build Flexbox layouts, bind dynamic JSON data and arrays, add form fields, and export clean code for 22 PDF libraries.
Step-by-Step Workflow
- 01. Create or Open a Project: Configure A4, US Letter, Legal, or custom dimensions and margins, or open a local
.pdftemplatefile directly from disk with zero cloud uploads. - 02. Compose on the Visual Canvas: Drag Views, Text, Tables, Repeating Sections, Barcodes, QR Codes, Images, and Form Controls into Flexbox containers with live hierarchy inspection.
- 03. Style with the Property Inspector: Configure typography, flex alignments, margins, padding, border radii, and color palettes validated against your chosen target PDF library.
- 04. Bind Dynamic JSON Data Models: Declare typed schema fields with sample values and bind fields to props or mustache expressions like
Invoice #{{invoiceNumber}}. - 05. Preview & Compile Production Code: Verify layout accuracy in the instant Canvas Preview and PDFium WebAssembly renderer, then download standalone source files for Node.js, Python, PHP, Rust, Go, C#, Java, Ruby, or browser apps.
Dynamic JSON Data Binding & Array Reflow
Every component property can switch between Static literals, Dynamic schema variables (such as customerName), and Mustache Expressions (such as Invoice #{{invoiceNumber}} · Due {{dueDate}}). When you bind a Table or repeating section to an object array (for example lineItems[].description), CodePDF computes vertical flow offsets at runtime so totals, notes, and signatures automatically push down or wrap across pages without overlapping.
{
"invoiceNumber": "INV-2026-0842",
"customerName": "Northwind Logistics Inc.",
"currency": "USD",
"lineItems": [
{ "sku": "API-PRO", "description": "Enterprise PDF Engine Seats (Annual)", "qty": 25, "amount": "$12,500.00" },
{ "sku": "SLA-247", "description": "Priority Support & Dedicated SLA", "qty": 1, "amount": "$2,400.00" }
],
"totalDue": "$14,900.00"
}
Choosing the Right PDF Target Engine
CodePDF compiles one visual layout into 22 engines across 8 runtimes: @react-pdf/renderer for React/Next.js Route Handlers, pdf-lib or jsPDF for browsers and Edge Workers, PDFKit for fast Node.js streams, ReportLab or fpdf2 for Python, Dompdf/TCPDF/FPDF for PHP, QuestPDF for C#/.NET, gofpdf for Go, pdf-writer/printpdf/lopdf for Rust, Apache PDFBox for Java, Prawn for Ruby, and Playwright/Puppeteer for Chromium CSS. Compare measured speed, CPU, RAM, and PDF size on 22-Engine Benchmarks.
Keyboard Shortcuts & Git Workflow
- Cmd/Ctrl + C / V / D: Copy, paste, or duplicate the selected component
- Cmd/Ctrl + Z / Shift + Z: Undo or redo up to 100 canvas mutations
- Cmd/Ctrl + A / Escape / Delete: Select all, clear selection, or delete selected nodes
- Git Pull-Request Tip: Store
.pdftemplatefiles undertemplates/in your repository alongside the exported code so layout updates remain versioned with your application.
Browse 100 Free Templates | View All 22 Libraries | Benchmark Rankings | Launch Studio