StringBuffer sb = new
BufferedReader reader = new BufferedReader(new FileReader("c:/pdftest/1 (1).txt"));
int ch = -1;
while ((ch = reader.read()) > -1)
// Instantiate Pdf object by calling its empty constructor
Pdf pdf1 = new Pdf();
// Create a new section in the Pdf object
Section sec1 = pdf1.getSections().add();
// Create a new text paragraph and pass the text to its constructor as argument
Text text1 = new Text(sec1, sb.toString());
text1.getTextInfo().setFontName("Arial Unicode MS");
i losed the ‘pdf1.setUnicode();’.
jiunting:i losed the 'pdf1.setUnicode();'.But It;s not support full Chinese.in the attachments, it has three chinese words, but it only has two words in the pdf.About thie, you can look About Big-5EHi Danny,Thanks for sharing the resource fie.I have tested the scenario and I am able to notice the same problem. For the sake of correction, I have logged this problem as PDFNEWJAVA-33978 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.
Is it possible to change the font encode?
Thank you for being patient.
We have investigated the ticket reported by you PDFJAVA-34128, formerly PDFNEWJAVA-34128, and would like to update you that we do not notice any problem during conversion of input TXT file to PDF document with Aspose.PDF for Java 18.6 in our environment. If you still face the problem with latest available version of the API then please elaborate the issue for our reference.