hebrew-document-generator
FreeRuns bundled scriptsNot checkedNot legal advice. Generate Hebrew documents (PDF, DOCX/Word, PPTX) with correct RTL layout, mixed Hebrew-and-English bidi handling, and Hebrew typography. Use…
by skills-il★ 28 GitHub starsAbout this skill
Hebrew Document Generator
Legal notice
This is a free information tool operated by an AI model. It lays out and formats Hebrew documents (PDF, Word and PowerPoint) from the content you supply, and shows the customary section and field structure for a contract, invoice, receipt and price proposal. All of its output is produced automatically by an AI model, without the involvement, review or approval of a lawyer, tax advisor or accountant. The output is not legal advice, not a legal opinion and not a document prepared by a lawyer; it is a layout template that you fill in and adapt yourself. The tool does not examine the circumstances of your transaction, does not assess whether any clause is valid or enforceable, and does not adapt the clauses to the law that applies to you. An AI model may err, omit information or reach a wrong conclusion.
Any contract, letter or other text this skill drafts is an automatic draft for personal organization only. It is not a document prepared by a lawyer, and it must not be relied on as evidence. The invoice and receipt samples are layout examples, not issued tax documents. Responsibility for reporting and paying tax is yours, the binding computation is the Tax Authority's, and representation before the Tax Authority is reserved to those the law permits. It does not replace advice that considers each person's specific facts and needs: before taking a legal step, signing a document, or filing one with an authority or a court, consult a lawyer. Any use of the output is at the user's sole responsibility.
Instructions
Step 1: Choose the Output Format
| Format | Library | Best For | RTL Support |
|---|---|---|---|
| reportlab | Invoices, tax docs, printable forms | Register Hebrew font, use canvas.drawRightString() |
|
| WeasyPrint | Styled documents from HTML/CSS | Native via dir="rtl" in HTML |
|
| DOCX | python-docx | Contracts, proposals, meeting minutes | scripts/docx_rtl.py: paragraph bidi, runs split by script, w:rtl on Hebrew runs only, w:cs font on every run |
| PPTX | pptxgenjs (Node) | Presentations, slide decks | RTL text boxes with rtlMode: true |
Step 2: Install Dependencies and Hebrew Fonts
Python PDF generation:
pip install reportlab weasyprint python-bidi
WeasyPrint also needs the Pango system library. The simplest route on macOS is brew install weasyprint; on Debian or Ubuntu install libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz-subset0 before pip install. A missing library fails with cannot load library 'libgobject-2.0-0'; on macOS with Homebrew Pango already installed, export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib fixes it.
Python DOCX generation:
pip install python-docx
Node.js PPTX generation:
npm install pptxgenjs
Recommended Hebrew fonts (install on system):
| Font | Style | Best For | Source |
|---|---|---|---|
| Heebo | Sans-serif, modern | Web-style documents, invoices | Google Fonts |
| David | Classic serif | Legal contracts, formal letters | System (Windows; macOS with Microsoft Office) |
| Narkisim | Serif, elegant | Proposals, invitations | System (Windows) |
| Frank Ruehl | Traditional serif | Academic, literary | Google Fonts (Frank Ruhl Libre) |
| Rubik | Sans-serif, rounded | Presentations, marketing | Google Fonts |
| Assistant | Sans-serif, clean | Business correspondence | Google Fonts |
See references/hebrew-fonts.md for download links and installation instructions.
Step 3: Generate Hebrew PDF with reportlab
See scripts/generate_doc.py for the full generation pipeline.
from reportlab.lib.pagesizes import A4
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.units import mm
from bidi.algorithm import get_display # NOT `from bidi import get_display`, see below
# Register Hebrew font
pdfmetrics.registerFont(TTFont('Heebo', 'Heebo-Regular.ttf'))
pdfmetrics.registerFont(TTFont('Heebo-Bold', 'Heebo-Bold.ttf'))
def create_hebrew_pdf(filename, title, content_lines):
c = canvas.Canvas(filename, pagesize=A4)
width, height = A4
# Title -- right-aligned for RTL
c.setFont('Heebo-Bold', 18)
hebrew_title = get_display(title)
c.drawRightString(width - 20*mm, height - 30*mm, hebrew_title)
# Body lines
c.setFont('Heebo', 12)
y = height - 50*mm
for line in content_lines:
display_line = get_display(line)
c.drawRightString(width - 20*mm, y, display_line)
y -= 7*mm
c.save()
Key points for reportlab Hebrew:
- Always use
get_display()from python-bidi to reorder characters - Use
drawRightString()for right-aligned RTL text - Register TTF Hebrew fonts explicitly -- reportlab has no built-in Hebrew support
- Set line height to at least 1.5x font size for Hebrew readability
- **python-bidi import, use `from bidi.alg
Install hebrew-document-generator in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
Bash(python:*)Bash(pip:*)Bash(node:*)Bash(npm:*)Bundled files
FAQ
What does the hebrew-document-generator skill do?
Not legal advice. Generate Hebrew documents (PDF, DOCX/Word, PPTX) with correct RTL layout, mixed Hebrew-and-English bidi handling, and Hebrew typography. Use whenever the output is a Hebrew or mixed Hebrew/English Word document, Hebrew PDF, or Hebrew PowerPoint ("Hebrew Word document", "מסמך Word בעברית", "create a .docx in Hebrew"), or Israeli templates like Heshbonit Mas, Hozeh, or Protokol. ALSO use this for the symptom where a Hebrew document looks fine on screen or in Claude but comes out scrambled, reversed, or broken in Word, with English, numbers, or punctuation on the wrong side ("Hebrew text reversed in Word", "fix Hebrew formatting in Word"); the fix is regenerating the .docx with paragraph-level RTL/bidi, NOT a web/CSS RTL change. Prefer over the generic docx/pdf skills ONLY when the document is Hebrew or RTL; for English-only docs use the generic skill. Covers reportlab, WeasyPrint, python-docx, pptxgenjs. Do NOT use for OCR or reading existing documents (use hebrew-ocr-forms).
How do I install the hebrew-document-generator skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the hebrew-document-generator skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
by AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
by Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
by Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
by Anthropic