0

I am using itext7 PDFCalligraph module to render Hindi font in pdf through a java web application. I have acquired a trial license key for this after registering and it is loading also correctly. But complex hindi letters are not rendering as expected which was supposed to be the case after using the Calligraph module. Pl. help. Code snippet given below..

com.itextpdf.licensekey.LicenseKey.loadLicenseFile ("E:\\licensekeys\\itextkey-0.xml");

PdfFont fontHindi = PdfFontFactory.createFont("E:\\Devanagari_New\\FreeSans.ttf", PdfEncodings.IDENTITY_H);

cellpay = new Cell().add(new Paragraph("\u0915\u093e\u0930\u092a\u093e\u0930\u094d\u0915\u093f\u0902\u0917")
            .setFont(fontHindi)
            .setFontColor(new DeviceRgb(50, 205, 50)));
tablew.addCell(cellpay);

Thanks all for your inputs. I had indeed forgotten to load the callipgraph dependency , had loaded only the license module dependency. Thanks for your pointers.

Pundarik
  • 3
  • 5
  • If you are using pdfCalligraph with the intention of buying the product, you are of course allowed to ask your questions directly to our sales team. They will then create the appropriate ticket in our system. This enables you to get support much more quickly. – Joris Schellekens May 15 '17 at 07:30
  • 1
    Which version of pdfCalligraph are you using? What is the output you get (a screenshot or PDF output would be preferred)? How does the expected output look like for you in `FreeSans` font? Note that for your input the text looks differently in different fonts (`FreeSans`, `NotoSans-Devanagari`). I think the output with latest version of pdfCalligraph is correct. – Alexey Subach May 15 '17 at 12:21
  • Did you remember to add pdfCalligraph as a dependency to your product? Is the output the same with and without the license loaded (it shouldn't be, but if it is, you might not have added the dependency) – Samuel Huylebroeck May 15 '17 at 13:29

1 Answers1

1

Did you remember to add pdfCalligraph as a dependency to your product? Is the output the same with and without the license loaded (it shouldn't be, but if it is, you might not have added the dependency).

When added as a dependency and loaded in, together with a valid license, pdfCalligraph will do its work silently in the background. When it is not added as a dependency, no exceptions will be thrown (even if a valid license is loaded), so it's sometimes hard to tell if you did it correctly without looking at output.

Samuel Huylebroeck
  • 1,639
  • 11
  • 15