Developer API

Render readable PDFs from wide tables

Use the fitforpdf API to generate structured PDFs from Excel exports, CSV datasets, and database tables. Built specifically for wide business tables that break normal PDF rendering.

https://api.fitforpdf.com/v1No HTML templates. No PDF layout code.

Try it in 10 seconds

curl -X POST https://api.fitforpdf.com/v1/render \
  -H "X-FITFORPDF-KEY: YOUR_KEY" \
  -F "file=@sample.csv" \
  --output report.pdf
sample.csv14 cols × 2k rowsstructured PDF sections
Request access →

Why fitforpdf exists

Wide tables break every PDF renderer

Standard PDF libraries — wkhtmltopdf, Puppeteer, ReportLab — were built for documents, not data. Feed them a 20-column CRM export and you get cut-off columns, microscopic text, and broken page flows that no client wants to read.

fitforpdf was built specifically for this problem. The rendering engine analyses your table structure, splits wide tables into readable sections, and produces a PDF that actually communicates the data inside it.

Typical use cases

Built for SaaS products and data-heavy workflows

SaaS reporting

Generate PDF reports from your product data on demand

CRM exports

Turn wide CRM tables into client-ready documents

Financial exports

Render financial data with clean pagination and layout

Analytics tables

Export analytics dashboards as structured PDFs

Inventory reports

Convert inventory data into readable, shareable PDFs

What makes fitforpdf different

Designed around the wide-table problem

Splits wide tables into sections

No more cut-off columns — wide tables are restructured into readable grouped sections.

Preserves key columns across sections

Identifier columns stay visible on every section so records stay linked.

Full-width text rendering

Every column gets the space it needs. No cramped cells or truncated values.

Automatic pagination

Page breaks follow record boundaries, not arbitrary row counts.

Quick start

Generate a PDF in one command:

curl -X POST \
  -H "X-FITFORPDF-KEY: ffp_live_..." \
  -F file=@your-data.csv \
  https://api.fitforpdf.com/v1/render \
  -o report.pdf

Authentication

Pass your API key in the X-FITFORPDF-KEY header. Keys are prefixed ffp_live_ and should be kept server-side only.

curl -H "X-FITFORPDF-KEY: ffp_live_..." \
  https://api.fitforpdf.com/v1/quota

Request early access to get your key.

Endpoints

POST/v1/renderauth required

Render a readable PDF from a wide CSV or XLSX table (max 10 MB).

curl -X POST \
  -H "X-FITFORPDF-KEY: ffp_live_..." \
  -F file=@data.csv \
  -F 'options={"mode":"compact","branding":false}' \
  https://api.fitforpdf.com/v1/render \
  -o output.pdf
Response
Binary PDF (application/pdf)
GET/v1/quotaauth required

Returns your current plan, usage, and remaining exports.

curl -H "X-FITFORPDF-KEY: ffp_live_..." \
  https://api.fitforpdf.com/v1/quota
Response
{
  "plan": "credits",
  "free": { "limit": 50, "used": 0, "remaining": 50 },
  "credits": { "remaining": 8 },
  "pro": { "monthlyCap": 500, "usedInPeriod": 0 }
}
GET/v1/health

Returns API status. No authentication required.

curl https://api.fitforpdf.com/v1/health
Response
{
  "status": "ok",
  "version": "1"
}

Render options

Pass as a JSON string in the options form field.

KeyTypeValuesDefault
modestringnormal, compact, optimizednormal
brandingbooleantrue, falsetrue
columnMapstringoff, auto, forceoff
truncateLongTextbooleantrue, falsefalse
localestringen, fren
paginationbooleantrue, falsetrue
compressbooleantrue, falsefalse

Response headers

Every /v1/render response includes these headers:

HeaderDescription
X-Request-IdUnique request identifier
X-FitForPDF-ScoreQuality score (0–100)
X-FitForPDF-Verdictexcellent, good, fair, or poor
X-FitForPDF-PlanYour current plan
X-FitForPDF-RemainingRemaining exports
X-Render-MSRender time in milliseconds

Rate limiting

60 requests per minute per API key. Rate limit state is returned in headers: X-RateLimit-Limit, X-RateLimit-Remaining, and Retry-After (on 429). Maximum 50 columns and 5,000 rows per request.

Designed for business reporting exports.

Error codes

All errors use a standard envelope:

{
  "error": {
    "code": "api_key_missing",
    "message": "Missing X-FITFORPDF-KEY header",
    "requestId": "req-123"
  }
}
HTTPCodeDescription
401api_key_missingNo X-FITFORPDF-KEY header
403api_key_invalidInvalid or revoked API key
402free_quota_exhaustedFree plan exports used up
402credits_exhaustedNo credits remaining
429rate_limitedRate limit exceeded (60 req/min)
413file_too_largeFile exceeds 10 MB limit
415invalid_file_typeNot a .csv or .xlsx file

GitHub examples

Working API examples in Node.js and Python, plus the full OpenAPI 3.1 spec.

View API examples on GitHub

API Pricing

Start free. Scale when it matters.

50 renders included. Then predictable pricing as you grow.

Free

$0

  • 50 renders
  • 60 req/min rate limit
  • fitforpdf watermark
Recommended

Starter API

$49 / month

~$0.098 per render

  • 500 renders / month
  • No watermark
  • Priority queue

Scale API

$99 / month

~$0.033 per render

  • 3,000 renders / month
  • Faster processing
  • SLA light

Enterprise

Custom

  • Unlimited renders
  • SLA + dedicated support
  • Custom infra

Integrate in minutes.

One endpoint, one file upload, one PDF back.

Early access

Get your API key

We're onboarding developers in small batches to ensure quality and support. Early users get:

  • 50 free exports to test your integration
  • Direct access to the engineering team
  • Priority feature requests

Most requests approved within a few hours.