Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Here is the code. I guess syncfusion was not able to process the font correctly. This error came from a Japanese PC.
code starts--------
Try
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("
'Load a PDF document
Dim loadedDocument As New PdfLoadedDocument("C:\Users\Public\Documents\Sample.pdf")
Dim page As PdfLoadedPage = TryCast(loadedDocument.Pages(0), PdfLoadedPage)
'Creates PDF graphics for the page
Dim graphics As SyncFusion.Pdf.Graphics.PdfGraphics = page.Graphics
'Creates a solid brush
Dim brush As PdfBrush = New PdfSolidBrush(Color.Red)
Dim recBG As PdfBrush = New PdfSolidBrush(Color.White)
'Set the standard font
Dim font As PdfFont = New PdfCjkStandardFont(PdfCjkFontFamily.HeiseiMinchoW3, 20)
'Create PDF String format
Dim format As PdfStringFormat = New PdfStringFormat()
'Set text alignement.
format.Alignment = PdfTextAlignment.Center
format.LineAlignment = PdfVerticalAlignment.Middle
'RectangleF
Dim rectF As RectangleF = New RectangleF(200, 200, 200, 30)
graphics.DrawRectangle(PdfPens.Red, recBG, rectF)
'Draws the text
graphics.DrawString("こんにちは世界", font, brush, rectF, format)
graphics.Flush()
'Save the document
loadedDocument.Save("C:\Users\Public\Documents\Sample-PDF-Output.pdf")
loadedDocument.Close(True)
Catch ex As Exception
End Try