Component Diagram

PDF Component Diagram API

Generate component diagram images in PDF format with a single HTTP request. Print-ready document format with preserved vector graphics. ChartQuery renders publication-ready PDF output that works everywhere, dashboards, emails, documents, and print.

Live Preview

This image is generated in real time by the ChartQuery API, no static assets.

PDF Component Diagram API, live preview generated by ChartQuery

Quick Start

A single HTTP request is all you need. No SDK, no dependencies.

Terminal
curl -X POST https://api.chartquery.com/v1/diagram \
  -H "Content-Type: application/json" \
  -d '{"diagram_type":"mermaid","diagram_source":"graph TD\\n  A[Start] --> B{Decision}\\n  B -->|Yes| C[Process]\\n  B -->|No| D[End]","output_format":"pdf"}' \
  --output diagram.pdf

How It Works

1

Send a Request

POST a JSON body or use GET with query parameters. No SDK or library needed.

2

Get Your Image

ChartQuery renders your chart, diagram, barcode, QR code, or label and returns it as PNG or SVG.

3

Use It Anywhere

Embed in emails, PDFs, dashboards, documents, or print directly. Works everywhere images work.

Features

PDF Output

Print-ready document format with preserved vector graphics. Every response returns a valid PDF file ready to use, no post-processing needed.

Sub-500ms Response

Charts, diagrams, barcodes, and labels render in under 500ms. Get your PDF file back before the next line of code runs.

No Dependencies

No rendering library, no headless browser, no canvas. A single HTTP request returns a PDF image. Works from any language or platform.

Pixel-Perfect at Any Size

PDF output preserves vector graphics for crisp print at any page size.

Use Cases

  • Generate diagrams for print-ready technical manuals
  • Create architecture diagrams for compliance documents
  • Export flowcharts and ER diagrams for offline review
  • Produce presentation-ready process flow documentation

Frequently Asked Questions

How do I generate component diagram as PDF with an API?

Send a request to the ChartQuery diagram endpoint with format: "pdf" in your JSON body (POST) or as a query parameter (GET). The API returns a PDF file directly in the response body. No API key is required for basic usage.

Why choose PDF over other output formats?

Print-ready document format with preserved vector graphics. PDF preserves vector quality and is the standard format for printed documents, contracts, and reports.

What is the maximum resolution for PDF output?

PDF is a vector format, so resolution is infinite. The output scales to any size without quality loss.

Is the PDF component diagram API free?

Yes. Anonymous access gives you 60 requests per hour without an API key. A small watermark is added to free-tier output. Paid plans remove the watermark and increase rate limits.

Can I embed PDF component diagram in emails and documents?

PDF output is designed for embedding in documents and printing. Attach it directly or merge it into larger PDF reports.

What content type does the API return for PDF?

The API returns application/pdf in the Content-Type header. The response body is the raw PDF file data, ready to save to disk or stream to the client.

Start generating charts today

No API key required to get started. Generate charts, diagrams, and more with a single HTTP request.

Get StartedView Pricing