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.

Wed Aug 24, 2022 7:29 pm

I am creating a textbox field in a document and setting the font for it using the code below. However, when I open the pdf file, the font used in the textbox is something different. Does anyone have any idea what I am doing wrong?
Code: Select all
        Dim BodyStyle As PdfTrueTypeFont = New PdfTrueTypeFont(New Font("Arial", 8.0F, FontStyle.Regular))
        MyTextBox = New PdfTextBoxField(MyPage, "MyTextBox")
        MyTextBox.Bounds = New RectangleF(TextPoint2.X, TextPoint2.Y, DataGrid.Columns.Item(4).Width - 1, MyDataRow.Height - 1)
        MyTextBox.Font = BodyStyle
        MyTextBox.Multiline = True
        MyDataRow.Cells.Item(4).Value = MyTextBox


This is a screen shot of the pdf file created. The font used looks like Helvetica.
Image

Thanks in advance!

Darren Haverstick
Paul Mueller Company

dhaverstick
 
Posts: 2
Joined: Mon Jun 28, 2021 6:37 pm

Thu Aug 25, 2022 2:57 am

Hi,

Thank you for your inquiry,
I did an initial test using our latest Version (Spire.PDF Pack(Hot Fix) Version:8.8.6), but didn't reproduce your problem. If you were not using the latest version, I would suggest you give the latest one a try. If the issue still exist, please provide the following information for further investigation. You can attach your document here or send it to us via email (support@e-iceblue.com). Thank you in advance.
1) Your output document
2) Test environment, such as Win10, 64bit
3) Application type, such as Console App, .NET Framework 4.8

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Thu Aug 25, 2022 12:07 pm

I am using FreeSpire.PDF, version 8.6.0, in a Windows Forms application. The software runs on a Windows 10 x64 platform. Attached is the output document.

Darren Haverstick

dhaverstick
 
Posts: 2
Joined: Mon Jun 28, 2021 6:37 pm

Fri Aug 26, 2022 3:17 am

Hi,

Thank you for your reply.
I did a test using FreeSpire.PDF V8.6.0, but did not reproduce your issue. I suggest that you use our commercial version as it contains more fixes and stable than the free versions. If the problem still exists after testing with the commercial version, please provide your full test code for further investigation, if you could provide a sample demo that reproduces the problem, it would be more helpful.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Return to Spire.PDF