pdfbox

Create arabic text pdf file using pdfbox


I want to create a PDF in arabic using PdfBox but don't want to use any external .ttf file. Is there any other way to do this? I have already gone through many stuffs but all are using .ttf files.


Solution

  • PdfBox has the following fonts: TIMES_ROMAN,HELVETICA,COURIER,SYMBOL,ZAPF_DINGBATS with their styled counter parts. if you have tried all these fonts with no results, it means that the character encoding used for them does not support the Arabic characters.
    Your best bet is to attach a .ttf font that contains those symbols. Also you might want to take a look at this Write arabic characters with PDFBOX