When I create a pdf file using jPDFjetLibrary , Unicode (Arabic) text is not showing when I open the output file using Adobe reader.Any one knows what should I do enable it to show?
According to PDFjet webPage in order to do that you must
Declare the font
(JAVA)
B4X:
BufferedInputStream bis2 =newBufferedInputStream( getClass().getResourceAsStream("fonts/DroidFonts/DroidSerif-Regular.otf"));
Font f2 =newFont(pdf, bis2,CodePage.UNICODE,Embed.YES);
SO.... you should use something like this:
B4X:
private Sub test
Dim InputS As InputStream = File.OpenInput("path","FileName") ' of your arabic font
Dim pd As PDFjetPDF
pd.Initialize("test","FileTest") ' of your PDF
Dim pdCode As PDFjetCodePage ' This is an ENUM so no initialize needed
Dim F As PDFjetFont
F.Initialize4(pd,InputS,pdCode.UNICODE,True) 'Relevant Code
End Sub
Okay,thank your response.
but when I call this function :
PDFFont1.Initialize4(PDFjetPDF1,InputS ,pdCode.UNICODE,True )
I get this Error:
java.lang.NoSuchMethodError: com.pdfjet.Font.<init>(Lcom/pdfjet/PDF;Ljava/io/InputStream;IZ)V
Which PDF Jet version are you using?? did you downloaded the Open Source version from their web page? their evaluation version may be? WarWound wrapper is 2 or 3 versions behind, that means that it will not work with newer versions of pdfjet.
Download my ready compiled Open Source Edition PDFJet.jar
If you want to have the paid version or the evaluation version up to date, i am afraid that you will need to create your own wrapper or do it with InLine java.