Frequently Asked Question:
Does Quick PDF support adding Chinese characters into PDF files?
Does Quick PDF support adding Chinese characters into PDF files?
Yes, you can add Chinese text to a PDF using Quick PDF Library by using the AddSubsettedFont function. Here is a Visual Basic example showing how to subset a font and draw text using Unicode characters.
Dim PDF As TQuickPDF0718
Set PDF = CreateObject("TQuickPDF0718")
Call PDF.UnlockKey (" - your license key here - " )
Dim S As String
S = "Hello: " & ChrW(&H4F60) & ChrW(&H597D)
Call PDF.AddSubsettedFont ("Verdana", 7, S)
Call PDF.DrawText (100, 500, PDFSq.GetSubsetString (S))
Call PDF.SaveToFile ("c:\unicode.pdf")
Set PDF = Nothing
It's also possible to add Chinese, Japanese and Korean text into PDF files using the AddCJKFont function. Here's a sample in C#:
int fontid = QP.AddCJKFont(1);
string inputText = "这是ä¸æ–‡æ–‡æœ¬ã€‚"; // Chinese text
string UTF16inputText = QP.ToPDFUnicode(inputText);
QP.SelectFont(fontid);
QP.DrawText(100, 600, UTF16inputText);
QP.SaveToFile("Unicode.pdf");
If you want to write Japanese or Korean text just update the inputText string.