Documentation menu

Getting started

API reference

Guides

Trust and support

Overview

Sahifa turns HTML into PDF documents and web pages into screenshots. It runs in Jeddah, Saudi Arabia, and accepts the same requests as PDFShift and ScreenshotOne.

Base URL

https://api.sahifa.dev

All requests use HTTPS. The server runs on Oracle Cloud in the Jeddah region (me-jeddah-1), and nothing you send is stored after the response.

Two APIs, one key

APIEndpointCompatible withReturns
HTML to PDFPOST /v3/convert/pdfPDFShift v3PDF
ScreenshotsGET or POST /takeScreenshotOnePNG, JPEG, WebP or PDF

One PDF or one screenshot counts as one render against your plan's monthly allowance.

Your first PDF

# HTML to PDF with an Arabic footer. Requires: SAHIFA_API_KEY in the environment.
curl https://api.sahifa.dev/v3/convert/pdf \
  --user "api:$SAHIFA_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "source": "<html dir=\"rtl\" lang=\"ar\"><body><h1>فاتورة ضريبية</h1><p>الإجمالي: 1,150.00 ر.س</p></body></html>",
    "format": "A4",
    "margin": "20mm",
    "footer": { "source": "<div style=\"width:100%;text-align:center\">صفحة {{page}} من {{total}}</div>" }
  }' \
  --fail-with-body --output invoice.pdf

More languages are in the quickstart.

Where to go next

Getting an API key

Self-service sign-up opens soon. Until then, write to support@sahifa.dev with your company name and expected monthly volume, and a key will be sent to you. You can try both APIs without a key in the demo on the home page.