Invoice PDFs print Language wrong direction
-
Plugin: Print Invoice & Delivery Notes for WooCommerce (Tyche Softwares)
Site: mobileonline.co.il (WooCommerce, store language: Hebrew)
Version: 7.2.1 (updated today from 7.1.2 — see below)ISSUE
Hebrew text in generated PDFs (invoices, delivery notes, packing slips) displays
character-reversed / mirrored — e.g. an address that should read
“ארלוזורוב 19 רמת גן” instead renders as “ןג תמר 19 בורוזולרא”.BACKGROUND — original fix (approx. 2 weeks ago)
Originally, PDFs had two problems: missing Hebrew glyphs (black boxes) AND reversed
text. We fixed it at the time by:- Settings → Font Settings → uploaded Noto Sans Hebrew (Regular + Bold) — this fixed
the missing glyphs. - Settings → General Settings → Document Formatting → Text Direction → set to
“Right to Left (RTL)” and saved — this appeared to fix the reversed text.
We confirmed at the time that a freshly generated invoice looked correct.
CURRENT ISSUE (today)
Hebrew text is reversed again on freshly generated PDFs (from live customer orders),
even though the site had no config changes in between. Steps taken today to diagnose
and attempt a fix, in order:- Verified fonts were still uploaded and intact (Noto Sans Hebrew Regular + Bold,
47KB each) — not the issue. - Verified Text Direction setting was still saved as “Right to Left (RTL)” — not
reverted. - Toggled Text Direction to LTR, saved, then back to RTL, saved again (to rule out a
stale save) — no change. - Cleared all site caches (Kinsta page cache, object cache, and CDN cache) — no
change. Verified with a freshly generated PDF (confirmed via a new Last-Modified
timestamp on the file) that the output was still reversed. - Updated the plugin from version 7.1.2 to the latest 7.2.1 — no change. Verified
again with a freshly generated, cache-bypassed PDF (new Last-Modified timestamp,
confirmed not served from cache) — Hebrew text was still reversed.
DIAGNOSIS
The RTL layout of the document is working correctly (e.g. field labels like
“Payment Method:” are properly right-aligned as expected for RTL). What’s broken is
that the dynamic Hebrew values pulled from order/customer data (name, address,
payment method, shipping method, product names) are not being bidi-reordered before
being placed into the PDF — they’re inserted in raw logical order instead of visual
RTL order, which is why they display backwards. This suggests the “Text Direction”
setting only controls page/table layout, and does not trigger the bidi text-reordering
step (e.g. mPDF’s built-in bidi handling) for these dynamically inserted values.This appears to be a genuine bug in the plugin’s Hebrew/RTL handling, not a site
configuration issue — font, RTL setting, caching, and plugin version have all been
ruled out.Happy to provide a sample generated PDF and full WordPress/WooCommerce/PHP version
info on request.The page I need help with: [log in to see the link]
- Settings → Font Settings → uploaded Noto Sans Hebrew (Regular + Bold) — this fixed
You must be logged in to reply to this topic.