In this guide 6 sections
Right-to-left text breaks when the PDF engine lays out characters one by one instead of applying the bidirectional algorithm, or when the font lacks joining shapes. Mixed content such as numbers, product codes and brand names then lands in the wrong order. Test with a printed invoice, not a screen.
Where the reversal comes from
Arabic and Hebrew run right to left. Numbers, Latin brand names and product codes run left to right inside the same sentence. The Unicode bidirectional algorithm decides the order. Many PDF libraries do not run it.
When the engine skips that step, it draws each character in storage order. You see Arabic letters reversed, or Hebrew words in the right order but the sentence flipped.
Arabic adds a second fault. Letters change shape by position in a word. A basic engine prints isolated forms, so the word looks like loose letters.
- Engine ignores the bidirectional algorithm
- Font lacks initial, medial and final forms
- Text stored in visual order, not logical order
- Template fixed to a left-aligned layout
Tables, totals and mirrored layouts
A right-to-left page should mirror its layout. The item column moves to the right, the total column to the left, and the logo and address block swap sides. A template built for English only flips the words and leaves the grid behind.
Check column order on the invoice. Description, quantity, rate and amount should read in the direction the customer reads. Header text aligned left over right-aligned content looks careless to a buyer in Riyadh or Tel Aviv.
Page numbers, bullet marks and parentheses also flip. A closing bracket may appear on the wrong end of a line.
Numbers, codes and brand names inside sentences
The classic bug is a line such as an Arabic sentence ending in an order number. The number jumps to the start, or its digits reverse. A product code like AB-2041/7 can come out as 7/2041-AB.
Mixed content needs direction marks or isolate controls around the Latin run. The template author has to add them, or the engine has to detect them correctly. Neither happens by accident.
Decide which digits you print. Arabic-Indic digits and Western digits are both used in different markets. Ask the customer, and keep one rule per country.
- Order numbers and invoice references
- SKU and part codes with hyphens and slashes
- Brand names in Latin script
- Dates, decimal marks and currency signs
- Email addresses and web links
Fonts and PDF engines
Pick a font with full Arabic or Hebrew coverage and embed it in the file. If the font is only referenced, the customer’s viewer substitutes another, and shapes or spacing change.
Some engines, such as headless browsers, shape text correctly. Older libraries that draw glyphs from coordinates often do not. Ask the developer which one produces your PDFs and whether it applies shaping and bidirectional ordering.
Watch line breaks. A narrow cell can split a word at the wrong place, and the wrapped line may continue on the wrong side.
Test on paper with a native reader
A screen preview hides faults that appear in print: clipped digits, shifted columns, missing glyphs. Print the invoice, the delivery note and the statement. Use real data with long names, a part code and a foreign brand.
Ask a native reader to mark every line that looks wrong. Do not rely on your own eye. Keep the marked copy and attach it to the bug.
Then add three sample documents to your release checks, so every template change gets printed again.
Right-to-left print test sheet
A single printed checklist of ten rows. Each row names an element, such as page mirroring, column order, order number, SKU with slashes, brand name, date, currency sign, embedded font, line wrap and page number. Columns hold pass or fail, the printed sample and the reader’s note.
Open a blank worksheet to printQuestions owners ask
Why do Arabic letters appear disconnected in my PDF?
The engine is printing isolated letter forms. It needs text shaping, and a font that includes the joining shapes.
Why does my order number jump to the other end of the line?
Numbers are left-to-right text inside a right-to-left sentence. Without correct direction marks, the engine places the run in the wrong spot.
Do I need a separate template for Hebrew and Arabic?
Usually one mirrored right-to-left template can serve both, with the font and digit style set per language. Test each one on paper.
Is a screen preview enough to approve a template?
No. Print it. Clipped digits and shifted columns often show only on paper, and a native reader should review the result.
