Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Arabic PDF Generation (RTL reportlab)

    1

    Arabic and RTL PDFs with joined letters, correct word order, proper line wrapping and right-to-left tables, using reportlab.

    Free

    1 useSecurity scanned
    Arabic PDF Generation (RTL reportlab)

    Arabic PDF Generation (RTL reportlab)

    Example session with this skill installed

    Create a one-page Arabic PDF menu for our café: a title, a short welcome paragraph, and a price table that includes Latte, Cappuccino and Iced Tea. Add a page number at the bottom.

    • Read your context and instructions
    • Compiled the arabic pdf generation

    Summary

    Created cafe-menu.pdf: a one-page right-to-left Arabic menu, ready to print or share. I rendered the page and checked it visually.

    What's on the page

    PartContent
    Titleقائمة المشروبات
    WelcomeA short paragraph inviting customers to try the new drinks
    Price tableالمشروب، الحجم، السعر — includes Latte, Cappuccino and Iced Tea
    FooterPage number

    Checked before delivery

    CheckResult
    Arabic letters are joined, not separated✓
    Words and lines read right to left in the right order✓
    English names like «Iced Tea» stay in place inside Arabic sentences✓
    Table columns read right to left✓

    Next steps

    • Prefer a more formal Arabic font? Name one (for example Amiri) and the menu will be regenerated with it.
    • Need an editable version? Ask for a Word file instead.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    reportlab has no text engine, so an AI agent's first Arabic PDF almost always comes out wrong: letters stand apart instead of joining, each line reads back to front, multi-line paragraphs swap their lines, and English names like iPhone 15 jump out of the sentence. The text extracts fine, so the agent thinks it worked.

    This skill gives your agent a tested builder that shapes, reorders and wraps Arabic correctly, line by line.

    What it handles

    • Shaping and bidi: letters join, words read right to left, mixed English terms and numbers stay in place.
    • Line wrapping done right: text is wrapped first and reordered per line, so long paragraphs keep their line order.
    • Brackets and mixed text: brackets and numbers never end up on the wrong side.
    • RTL tables: columns given in reading order, first column on the right.
    • Fonts: finds an Arabic-capable font automatically, or uses yours (Amiri, Noto Naskh…).
    • Images: draw_text() writes Arabic labels into Pillow images, using libraqm when available.
    • Visual check: preview() renders every page to PNG so the agent can look before delivering.

    Works for Arabic, Persian, Urdu and Hebrew. Free and open source (MIT).

    The builder covers titles, headings, paragraphs, bullet lists, RTL tables and page numbers. It does not add images, a table of contents, bookmarks or links; for long documents with those, generate a Word file with the arabic-docx skill and export it to PDF. Because reportlab has no text engine, Arabic is stored pre-shaped in visual order: the PDF looks correct, but copying or searching Arabic text in a PDF viewer may return reversed or altered characters. An Arabic-capable TTF font is required (found automatically on most systems, or pass your own). Bullets are typed markers, not true list structures.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Requires

    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    File Scopes

    *.pdf
    *.png
    *.ttf

    Runs a local Python script that writes the PDF and a PNG preview per page. Reads installed font files to find an Arabic-capable font. No network access, no accounts, no API keys, and no Office applications needed.

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    Standard reportlab lacks a text engine to handle complex scripts, resulting in disconnected letters and reversed word orders. This skill provides a specialized builder that manages shaping and bidirectional reordering so your agent can generate professional, readable Arabic PDFs.

    The skill handles right-to-left (RTL) scripts including Arabic, Persian (Farsi), Urdu, and Hebrew, while correctly preserving the order of mixed-in English text and numbers.

    Yes, the skill includes a specific RTL table handler that ensures columns are rendered in reading order, starting from the right-hand side of the page.

    This skill is designed for any AI agent capable of executing Python code. It includes an automated font-discovery feature and a preview function that renders pages to PNG so the agent can visually verify the layout.

    Unlike basic scripts, this builder wraps text before reordering each line. This prevents the common 'line-swap' bug where the bottom of a paragraph accidentally appears at the top.

    You receive the full source code under the MIT license, including the core PDF builder, the Pillow-based image labeling tool, and the visual preview utility.