0

I have a jsf project. So i put it on server (jboss). it exports (using ByteArrayOutputStream) pdf file using itextpdf. it's working fine on localhost. But Cyrillic font is unknown on server. I typed it following.

FontFactory.getFont("Arial", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 9,  Font.BOLD); 

how to resolve this problem. please suggest me. I tested many way. it but still not working.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Amar
  • 43
  • 5
  • The question is a duplicate, but the reference to the answer is wrong. I have written this tutorial in French based on three StackOverflow answers that *do* address the actual problem: http://www.developpez.net/forums/blogs/133351-blowagie/b521/utilisation-polices-pdf-itext/ The relevant answer on SO can be found here: http://stackoverflow.com/q/26631815 – Bruno Lowagie Aug 06 '15 at 09:32
  • I tried it. But occurs error on server. error is not found file or resource on this path /c:/windows/fonts/arial.ttf/. in locally it working fine and knowing font. But on server it is not working. – Amar Aug 06 '15 at 23:53
  • I bet there's no C: drive on the server. Or if there is, I bet the application server doesn't have access to it. This is not an iText question. This is related to shipping resources with a web application. You could post a new question and rephrase it, asking: why do I have access to arial.ttf on my local machine, but not on my server? (Such a question would risk downvotes, though, because it's a very trivial problem.) – Bruno Lowagie Aug 07 '15 at 06:21

0 Answers0