简体   繁体   中英

ABCpdf unicode character as?

I am using ABCPDF version 9.1.2.5

our process for creating PDF is like navigate URL in the background and get the full HTML as a string we are using AddImageHtml() method for creating a PDF, that would work perfectly with the English language but not works for another language like Chinese Japanese which is represented as a "?" mark

Dim PDFData() As Byte = Nothing
Dim HtmlPage As String
Dim PDFDoc As New Doc
PDFDoc.Font = PDFDoc.EmbedFont("Arial Unicode MS", LanguageType.Unicode, False, True)
HtmlPage = myclass.GetWebPageAsString(TargetURL, PostData)
If Orientation = Myclass.PDFOrientation.Landscape Then
 Width = PDFDoc.MediaBox.Width
 Height = PDFDoc.MediaBox.Height
 Left = PDFDoc.MediaBox.Left
 Bottom = PDFDoc.MediaBox.Bottom
 PDFDoc.Transform.Rotate(90, Left, Bottom)
 PDFDoc.Transform.Translate(Width, 0)
 PDFDoc.Rect.Width = Height
 PDFDoc.Rect.Height = Width
End If
PDFDoc.Rect.Inset(20, 20)
PDFDoc.HtmlOptions.Timeout = 3600000
PDFDocID = PDFDoc.AddImageHtml(HtmlPage)
PDFData = PDFDoc.GetData
PDFDoc.Clear()

The version of ABCpdf that you are using was discontinued early in 2015. The rendering of CJK characters for the default engine you are using is dependent on the version of Internet Explorer installed on the machine where you are running your application. From version 11, it is now possible to use the Chrome engine which is much less dependent on your operating system configuration. It is also faster and very much more standards compliant.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM