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.

Sat Oct 20, 2018 8:37 pm

I'm using free version library.
In my test all work great but drawing text in my pdf show font very thickness.
There is a way to reduce it?

This is my code:

doc.LoadFromFile(strTemplateStampa)

Dim page As PdfPageBase = doc.Pages(0)
Dim state As PdfGraphicsState = page.Canvas.Save()

Dim pen As PdfPen = PdfPens.Black
Dim format As New PdfStringFormat()
Dim font As New PdfFont(PdfFontFamily.Helvetica, 9.0F, PdfFontStyle.Regular)

page.Canvas.DrawString(NrAttestato, font, pen, 125, 140, False)

page.Canvas.DrawString(Prot.Protocollo, font, pen, 125, 635, False)

corrado.lembo
 
Posts: 1
Joined: Sat Oct 20, 2018 4:32 pm

Mon Oct 22, 2018 8:14 am

Hello,

Thanks for your post.
Please use PdfBrush instead of PdfPen to test, below is the code snippet for your better reference. If there is still any issue after trying, please provide your input template pdf to help further investigate. You could send it via email([email protected]).
Code: Select all
......
Dim brush As PdfBrush = PdfBrushes.Black
page.Canvas.DrawString(NrAttestato, font, brush, 125, 140, False)
......

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Wed Oct 24, 2018 5:52 am

Hello,

Greetings from E-iceblue.
Could you please let us know how is the issue going? Thanks in advance for your valuable feedback and time.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF