Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-77137

Code macro strips Chinese characters on PDF Export

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 7.4.14, 7.13.3, 7.15.0, 7.19.14, 8.5.3
    • Macros - Other Macros
    • None

      Problem

      Code macro strips Chinese characters on PDF Export

      Environment

      • Confluence Server/DC

      Steps to Reproduce

      1. Create a test page
      2. Copy the below storage format as the page content
        <p>PDF下载测试</p><ac:structured-macro ac:name="code" ac:schema-version="1" ac:macro-id="f4cf1880-afa5-4fc2-a9e2-c3c6c2cb655c"><ac:parameter ac:name="language">sql</ac:parameter><ac:parameter ac:name="title">Test code macro</ac:parameter><ac:plain-text-body><![CDATA[# 测试confluence user表
        SELECT * FROM cwd_user;]]></ac:plain-text-body></ac:structured-macro>
        <p><br /></p>
        
      3. Install the font to support Chinese lanage PDF export (tested with arialuni.ttc)
      4. Export the page to PDF

      Expected Results

      Chinese characters in code macro displayed

      Actual Results

      Chinese characters trimmed

      Workaround

      Add the below line to the PDF stylesheet to specify the font that supports Chinese

      .code pre, .preformatted pre {
          font-family:ConfluenceInstalledFont, Arial;
      }
      

        1. expected.png
          expected.png
          10 kB
        2. actual.png
          actual.png
          8 kB

              Unassigned Unassigned
              lwang3@atlassian.com Lei Wang
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: