Special characters in PDF is not supporting

Certified Associate Developer

Hello Everyone,

we have a requirement where we need to generate PDF with few special characters(which are selected by user from interface). 

Special characters values are successfully getting saved into DB but while generating PDF i am getting Hash values (#) in the place of special characters in that field. 

some special characters examples like : ζδΥεαβα₁α₂α₁аα₁ь (which includes super scripts and sub scripts). 

we are using document PDF smart service to generate PDF . 

How to get rid of hash values to get actual values into PDF. 

Please let me know if any suggestions .

 

TIA 

Siva

  Discussion posts and replies are publicly visible

Parents Reply
  • Hi Ritesh,

    I actually tried giving the text like this,,,

    1. I have a word Doc in that i am creating the document using a template and populating the data in that, <fo:block>
    <fo:inline font-family='Symbol'>Σ</fo:inline>
    </fo:block>
    I have given like this..

    2. Post that, i have used the pdf from docx and when i error, i am getting it as Exception exporting package

    Can you please help us it is very critical for us to get the special characters onto the pdf.
Children
  • 0
    Certified Lead Developer
    in reply to harshav420

    Hi,

    The issue is with the transforming between encodings. Docx files are ANSI encoded whereas FOP is converting it to UTF-8.

    The difference is nicely explained here: 

    In our case, when Greek letters are encoded from ANSI to UTF-8 shows a rectangle box, as mentioned in above link 'The first 128 characters are the same as ASCII but differ in the high 128 bytes. A byte with the high bit set (or >= 0x80) is an extended character in ASCII while in UTF-8 it indicates the start byte of a multi-byte sequence'.

    However, not sure about the solution for the issue yet :(.

    Some more useful links