Details
Description
the problem is, in some languages letters need to be joined together for example, consider this word
سلام
but after creating a pdf it contorts to
سلام
with extra semi-spaces. I think this is a bug in pdfbox and definetly is not related to font.
SampleCode.java
public class SampleCode { public static void main(String[] args) throws IOException { PDDocument document = new PDDocument(); //this font perfectly works in iText and JasperReport with the same text PDFont titleFont = PDType0Font.load(document, SampleCode.class.getResourceAsStream("/BYekan.ttf")); PDPage page = new PDPage(PDRectangle.A4); document.addPage(page); PDPageContentStream contentStream = new PDPageContentStream(document, page); contentStream.beginText(); contentStream.setFont(titleFont, 12); contentStream.newLineAtOffset(0, 100); contentStream.showText("سلام"); contentStream.endText(); contentStream.close(); document.save(new File("/home/omidp/temp/htmltopdf/output.pdf")); document.close(); } }
Attachments
Attachments
Issue Links
- duplicates
-
PDFBOX-3583 Seperate arabic character issue
- Closed
-
PDFBOX-3924 How to flatten pdf which contains acroform fields
- Closed
- is duplicated by
-
PDFBOX-3582 Arabic Annotation issue
- Closed