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!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

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