Arabic & RTL Support
Generate all 5 document types in Arabic with full right-to-left layout. Arabic labels, bilingual support, and 12+ Arabic currencies. The RTL layout also works for Hebrew and Persian text, but automatic label translation is Arabic only. Just add one field to any request.
How to Enable RTL
Add direction: "rtl" to any endpoint request. That's it — the entire PDF layout flips automatically.
{"direction": "rtl",...rest of your normal request}
Works with all 5 endpoints: Invoice | Receipt | Quote | Credit Note | Packing Slip
What Changes in RTL Mode
| Feature | LTR (Default) | RTL |
|---|---|---|
| Text direction | Left to right | Right to left |
| Layout | Company info left, title right | Company info right, title left |
| Table columns | Description first, Amount last | Amount first, Description last |
| Totals position | Right-aligned | Left-aligned |
| Labels | English | Arabic |
| Font | DM Sans | Noto Sans Arabic |
| Numbers | Left to right | Left to right (stays the same) |
Arabic Labels
When direction: "rtl", all document labels automatically switch to Arabic:
| English | Arabic |
|---|---|
| Invoice | فاتورة |
| Receipt | إيصال |
| Quote | عرض سعر |
| Credit Note | إشعار دائن |
| Packing Slip | قائمة التعبئة |
| Bill To | فاتورة إلى |
| Date | التاريخ |
| Due Date | تاريخ الاستحقاق |
| Description | الوصف |
| Quantity | الكمية |
| Unit Price | سعر الوحدة |
| Amount | المبلغ |
| Subtotal | المجموع الفرعي |
| Tax | الضريبة |
| Total | الإجمالي |
| Notes | ملاحظات |
| PAID | مدفوع |
Supported Currencies
All standard currencies work, plus these Arabic currencies are fully supported:
| Currency | Code | Symbol |
|---|---|---|
| Saudi Riyal | SAR | ﷼ |
| UAE Dirham | AED | د.إ |
| Egyptian Pound | EGP | ج.م |
| Qatari Riyal | QAR | ر.ق |
| Kuwaiti Dinar | KWD | د.ك |
| Bahraini Dinar | BHD | د.ب |
| Omani Rial | OMR | ر.ع |
| Jordanian Dinar | JOD | د.أ |
| Iraqi Dinar | IQD | ع.د |
| Lebanese Pound | LBP | ل.ل |
| Moroccan Dirham | MAD | د.م |
| Tunisian Dinar | TND | د.ت |
Full Arabic Invoice Example
curl -X POST https://api.kagyz.com/v1/invoice \-H "Authorization: Bearer YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"invoice_number": "INV-001","issue_date": "2026-03-15","due_date": "2026-04-15","currency": "SAR","direction": "rtl","from": {"name": "شركة أكمي للتقنية","email": "billing@acme-tech.sa","address": "شارع الملك فهد\nالرياض 12345"},"to": {"name": "شركة التقدم للحلول","email": "accounts@taqadum.sa"},"items": [{ "description": "تصميم وتطوير الموقع الإلكتروني", "quantity": 1, "unit_price": 15000 },{ "description": "صيانة شهرية ودعم فني", "quantity": 6, "unit_price": 2000 }],"tax": { "rate": 15 },"notes": "يرجى السداد خلال 30 يوماً من تاريخ الفاتورة."}' \--output invoice-arabic.pdf
const response = await fetch('https://api.kagyz.com/v1/invoice', {method: 'POST',headers: {'Authorization': 'Bearer YOUR_API_KEY','Content-Type': 'application/json'},body: JSON.stringify({invoice_number: 'INV-001',issue_date: '2026-03-15',due_date: '2026-04-15',currency: 'SAR',direction: 'rtl',from: { name: 'شركة أكمي للتقنية', email: 'billing@acme-tech.sa' },to: { name: 'شركة التقدم للحلول' },items: [{ description: 'تصميم وتطوير الموقع الإلكتروني', quantity: 1, unit_price: 15000 },{ description: 'صيانة شهرية ودعم فني', quantity: 6, unit_price: 2000 }],tax: { rate: 15 },notes: 'يرجى السداد خلال 30 يوماً.'})});
Bilingual Documents
You can mix Arabic and English text in any document regardless of direction. The renderer handles bidirectional text automatically:
{"direction": "ltr","from": {"name": "شركة الخليج للتجارة — Gulf Trading Co."},"items": [{ "description": "Consulting Services — خدمات استشارية", "quantity": 1, "unit_price": 5000 }]}
Arabic text will render correctly within LTR documents, and English text will render correctly within RTL documents.
Language Field (Optional)
You can optionally pass a language field for metadata purposes:
{"direction": "rtl","language": "ar"}
Supported values include: ar (Arabic), he (Hebrew), fa (Persian/Farsi), ur (Urdu). This field is optional and doesn't change rendering — use direction to control layout. Note: automatic Arabic labels only apply when direction: "rtl" is set. Hebrew, Persian, and Urdu text will render correctly in RTL mode, but labels will be in Arabic (not translated to those languages).
RTL works with all endpoints: Invoice | Receipt | Quote | Credit Note | Packing Slip