KhaleejiAPIKhaleejiAPI
PricingDocumentationAbout
Sign InGet Started
Back to all APIs

PDF Generation

Generate real PDF invoices, receipts, and reports

Category: Media & FilesEndpoint: /v1/pdf/generate

Avg Response

<50ms

Uptime SLA

99.99%

Free Tier

1,000/mo

Quick Start

JavaScript / TypeScript

javascript
import { KhaleejiAPI } from '@khaleejiapi/sdk';
const client = new KhaleejiAPI('your_api_key');
const pdf = await client.media.generatePDF({
type: 'invoice',
invoiceNumber: 'INV-001',
from: { name: 'Acme LLC', address: 'Dubai, UAE' },
to: { name: 'Client Co' },
items: [
{ description: 'API subscription', quantity: 1, unitPrice: 99.99 }
],
currency: 'AED',
taxRate: 5,
});
// pdf is a Buffer/Blob of the PDF file

Python

python
from khaleejiapi import KhaleejiAPI
client = KhaleejiAPI('your_api_key')
pdf = client.media.generate_pdf(
type="invoice",
invoice_number="INV-001",
from_info={"name": "Acme LLC", "address": "Dubai, UAE"},
to_info={"name": "Client Co"},
items=[{"description": "API subscription", "quantity": 1, "unitPrice": 99.99}],
currency="AED",
tax_rate=5
)
with open("invoice.pdf", "wb") as f:
f.write(pdf)

cURL

curl
curl -X POST "https://khaleejiapi.dev/api/v1/pdf/generate" \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{"type":"invoice","invoiceNumber":"INV-001","items":[{"description":"API subscription","quantity":1,"unitPrice":99.99}],"currency":"AED","taxRate":5}' \
-o invoice.pdf
Get Your API KeyView Documentation

Related APIs

Image Processing

Resize, crop, blur, sharpen, and compress images via sharp

Image ProcessingEmirates ID Validation
KhaleejiAPIKhaleejiAPI

Fast, affordable APIs built in Dubai for developers across the Middle East.

All systems operational

APIs

  • Email Validation
  • Phone Validation
  • VAT Validation
  • IP Geolocation
  • Exchange Rates
  • Image Processing
  • View all →

Resources

  • Documentation
  • API Reference
  • SDKs
  • Status
  • Changelog

Company

  • About
  • Blog
  • Careers
  • Contact

Legal

  • Privacy
  • Terms
  • DPA

© 2026 KhaleejiAPI. All rights reserved.

Made with love in Dubai by Berd-i & Sons