Skip to main content

Generating conference certificates with Marathi characters

Posted by felipegaucho on April 26, 2009 at 10:15 AM EDT

Few days ago Tushar Joshi asked me how to use the Footprint Library to publish certificates with Marathi characters. This was a nice challenge since I had never realized Footprint was released without support for TrueType Fonts, but everything worked and now the library supports unicode characters.

The major change was in the config file, where a new element arose:

<fonts>
  <mapping pdfField="nome" fontFile="RVJanaMarathi.TTF" />
</fonts>

The contents of the fontFile is a path to a TTF file. I used a file I found here, and since I don't know Marathi I guess it is correct (otherwise please point me to a correct font file). I didn't have time to generate a new release, but I already committed the code in the subversion trunk and I also saved a demo project here. Below you find an image with the first unicode certificate ever published with the Footprint Project, and I hope you can adopt it in your own language from now on.

cert.png

Special note: after publishing this blog I realized that mixed languages are not supported. So, if you run the sample code, you will notice my own name is not printed in the certificate due to its non-Marathi data in the database. I will re-think what is the best strategy in this case: mixed languages - and I also need to think on how common is that problem :)

Related Topics >>