Q: We use com.qoppa.pdfWriter.PDFPrinterJob class in Qoppa’s jPDFWriter library to convert an RTF document to PDF. The converted PDF does not seem to contain standard text content. The size of the output PDF (220 KB) is larger than the original RTF (40KB). Is there any way to convert to real text that can be selected in any PDF reader?
A: When converting an RTF to PDF using jPDFWriter, it is converting as vector commands not as an image. When it comes to text however, only characters that are inside WINANSI encoding are converted as text content in the output PDF. Characters outside the WINANSI encoding (such as CJK fonts) are drawn using shape commands, so they can not be selected or searched in a PDF reader such as Adobe Reader.
At the moment, none of our PDF libraries are able to convert from RTF to PDF and preserve non WINANSI characters.
If creating your original documents in Word instead of RTF is a possibility, you could look at our jOfficeConvert library which converts Word to PDF and offers strong font support, allowing to subset and embed most types of fonts (including CJK).