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
| API | Endpoint | Compatible with | Returns |
|---|---|---|---|
| HTML to PDF | POST /v3/convert/pdf | PDFShift v3 | |
| Screenshots | GET or POST /take | ScreenshotOne | PNG, 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
QuickstartFirst PDF and screenshot in five languages.
PDF referenceEvery parameter of the PDF endpoint.
Screenshot referenceViewports, full page, blocking cookie banners.
Arabic documentsFonts, digits, RTL tables, ZATCA QR codes.
MigratingFrom PDFShift or ScreenshotOne in one line.
Security and dataWhat is processed, logged and never stored.
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.