[ 
https://issues.apache.org/jira/browse/PDFBOX-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-1705:
------------------------------------
    Description: 
Can not write Hebrew or Chinese into PDF file. It shows unreadable codes.  If 
it does not support with latest version, please comments me. Thank you.
{code}
PDDocument document = new PDDocument();
PDPage page = new PDPage();
document.addPage( page );
PDFont font = PDTrueTypeFont.loadTTF(document, "pdf/simkai.ttf");
PDPageContentStream contentStream = new PDPageContentStream(document, page);
contentStream.beginText();
contentStream.setFont( font, 12 );
contentStream.moveTextPositionByAmount( 100, 700 );
contentStream.drawString("中文 = Chinese");
contentStream.drawString("Hebrew= העתק");
contentStream.endText();
contentStream.close();
document.save( "pdf/Hello World.pdf");
document.close();
{code}


  was:
Can not write Hebrew or Chinese into PDF file. It shows unreadable codes.  If 
it does not support with latest version, please comments me. Thank you.

PDDocument document = new PDDocument();
                PDPage page = new PDPage();
                document.addPage( page );
                PDFont font = PDTrueTypeFont.loadTTF(document, 
"pdf/simkai.ttf");
                PDPageContentStream contentStream = new 
PDPageContentStream(document, page);
                contentStream.beginText();
                contentStream.setFont( font, 12 );
                contentStream.moveTextPositionByAmount( 100, 700 );
                contentStream.drawString("中文 = Chinese");
                contentStream.drawString("Hebrew= העתק");
                contentStream.endText();
                contentStream.close();
                document.save( "pdf/Hello World.pdf");
                document.close();



> can not Write Hebrew and Chinese word into a PDF 
> -------------------------------------------------
>
>                 Key: PDFBOX-1705
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1705
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Writing
>    Affects Versions: 1.8.1
>            Reporter: meiyuanxun
>             Fix For: 2.0.0
>
>
> Can not write Hebrew or Chinese into PDF file. It shows unreadable codes.  If 
> it does not support with latest version, please comments me. Thank you.
> {code}
> PDDocument document = new PDDocument();
> PDPage page = new PDPage();
> document.addPage( page );
> PDFont font = PDTrueTypeFont.loadTTF(document, "pdf/simkai.ttf");
> PDPageContentStream contentStream = new PDPageContentStream(document, page);
> contentStream.beginText();
> contentStream.setFont( font, 12 );
> contentStream.moveTextPositionByAmount( 100, 700 );
> contentStream.drawString("中文 = Chinese");
> contentStream.drawString("Hebrew= העתק");
> contentStream.endText();
> contentStream.close();
> document.save( "pdf/Hello World.pdf");
> document.close();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to