Note that there are some explanatory texts on larger screens.

plurals
  1. POWhich PDF Generation API (Java) supports Gujarati Font?
    primarykey
    data
    text
    <p>I have tried iText, PDFBox &amp; Oracle Forms. And I also succed in case of iText to generate Gujarati PDF Document. But, unfortunately it is not generating proper Font in Gujarati (UTF-8) language.</p> <p>I have my project in jdk 1.4 &amp; that is mandatory to use. So, I need older version of API that support Gujarati Font.</p> <p>Please suggest if any option is available.</p> <p><strong>Sample Code:</strong> </p> <pre><code>public void GeneratePDFusingiText(String lStrGujaratidata) { try { BaseFont bf = BaseFont.createFont("C:\\Windows\\Fonts\\Shruti.ttf", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); Font font = new Font(bf, 12); Document document = new Document(); PdfWriter.getInstance(document, new FileOutputStream("D:/GeneratePDFusingiText.pdf")); document.open(); document.add(new Paragraph(lStrGujaratidata, font)); document.close(); } catch(Exception e) { System.out.println("Exception while generating PDF"); e.printStackTrace(); } } </code></pre> <p><strong>EDIT 1:</strong></p> <p>Perhaps the image is not getting displayed. It is uploaded <a href="https://i.stack.imgur.com/zHm8R.jpg" rel="nofollow noreferrer">here</a>.</p> <p><strong>EDIT 2:</strong></p> <p><img src="https://i.stack.imgur.com/dyT2R.jpg" alt="image of font examples"></p> <p><strong>Step-1)</strong> I type a gujarati String Google Transliterate.</p> <p><strong>Step-2)</strong> I convert it into unicode using BableMap Software to use it using Resourse Bundle.</p> <p><strong>Issue:</strong> Let me have a String: <strong>બિલાડી</strong> (Biladi)</p> <p>It's unicode will be : \u0AAC <strong>\u0ABF</strong>\u0AB2\u0ABE\u0AA1\u0AC0</p> <p>Check the Bold Unicode character above. That is where I am getting the problem. Now if I change this unicode to <strong>\u0ABF</strong>\u0AAC\u0AB2\u0ABE\u0AA1\u0AC0 , it prints proper output in PDF.</p> <p>At the same time it prints wrong output in HTML i.e. : <strong>િબલાડી</strong></p> <p>I have to manage in between them.</p> <p>I have tried using "gu" &amp; "gu.UTF-8" &amp; "UTF-8". But, everytime I am getting same output.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload