Menu

PhpGedView, TCPDF & RTL

Help
2009-07-23
2012-10-09
  • Meliza Amity

    Meliza Amity - 2009-07-23

    PhpGedView uses currently TCPDF 4.6.011.

    When we write a PDF document with Latin and Hebrew texts on Latin pages, the Hebrew text is printed in LTR word sequence.
    When we write a PDF document with Latin and Hebrew texts on Hebrew pages, the Latin text is printed in RTL word sequence.
    Words with a ' are in addition printed with wrong letter sequence.

    Samples:
    I should see on English and Hebrew pages
    Jacob Cohen יעקב כהן
    I see on English page
    Jacob Cohen כהן יעקב
    I see on the Hebrew page
    Cohen Jacob יעקב כהן

    On the English page I expect to see
    13 Tishrei ואדי אל-מע'סל
    I see
    13 Tishrei סל'מע-אל ואדי

    On the Hebrew page I expect to see
    Kiry'at Malachi, Israel י״ג תשרי
    I see
    Israel ,akhi'Mal Kiryat י״ג תשרי

    Arabic seems to have the same issues.
    See
    Ahmad Jarrar ‎احمد ابراهيم جرار

    Is this already corrected in a later version?
    Should I fill a bug report?
    When can we expect a solution?

    Meliza

     
    • Kai Schätzl

      Kai Schätzl - 2009-07-24

      with "directional font codes" do you refer to setRTL in TCPDF or something else?

       
      • Nicola Asuni

        Nicola Asuni - 2009-07-24

        No, I mean special unicode characters intended to indicate the language directions.
        Some of these characters codes are defined on the unicode_data.php file.

        /**

        • Left-to-Right Mark

        */

        define('K_LRM', 8206);

        /**

        • Right-to-Left Mark

        */

        define('K_RLM', 8207);

        /**

        • Left-to-Right Embedding

        */

        define('K_LRE', 8234);

        /**

        • Right-to-Left Embedding

        */

        define('K_RLE', 8235);

        /**

        • Pop Directional Format

        */

        define('K_PDF', 8236);

        /**

        • Left-to-Right Override

        */

        define('K_LRO', 8237);

        /**

        • Right-to-Left Override

        */

        define('K_RLO', 8238);

        For example, the LEFT-TO-RIGHT MARK character can be represented in html using the following entities:

        ‎
        ‎

         
    • Nicola Asuni

      Nicola Asuni - 2009-07-24

      To mix RTL and LTR, I suggest to use directional font codes or using HTML span tag with dir attribute:
      <span dir="rtl"> ... </span>
      Check the default example n.6 for further information.

       

Log in to post a comment.

Monday.com Logo