Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Apr 12, 2021 8:40 pm

Hi

the attached code give me an error 'character is not supported but the font parameter name index'
this used to work fine with the previous versions of spire.pdf. Please advise

grid.RepeatHeader = True
Dim format As PdfGridLayoutFormat = New PdfGridLayoutFormat()
format.Layout = PdfLayoutType.Paginate
format.Break = PdfLayoutBreakType.FitElement
format.PaginateBounds = New RectangleF(0, 0, page.Canvas.ClientSize.Width, page.Canvas.ClientSize.Height)
Dim result As PdfLayoutResult = grid.Draw(page, New PointF(0, 0), format)

the font used in the grid is PdfFont(PdfFontFamily.TimesRoman, 10.0F, FontStyle.Regular)

I'm printing French.

Thanks

cmarin
 
Posts: 10
Joined: Fri Jun 05, 2015 12:46 pm

Tue Apr 13, 2021 10:43 am

Hello,

Thank you for your inquiry.
Kindly note the French characters need a font that supports to render. The font you definded in PdfFont doesn't support rendering the TimesRoman, please use the following code to defind font instead. I tested it with the latest Spire.PDF Pack(Hot Fix) Version:7.3.3, the French characters were drawn well in grid. Please have a try. If the issue still happens, please provide your full code, your testing environment such as Region setting (E.g. France, French) and OS information (E.g. Windows 7, 64bit) for further investigation.
Code: Select all
Dim font As New PdfTrueTypeFont(New Font("Times New Roman", 15f), True)


Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Fri Apr 16, 2021 6:17 am

Hello,

Greetings from e-iceblue. How is your issue going? Has it been resolved? Can you give us some feedback at your convenience? Thank you in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.PDF

cron