PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Using "Courier New" messes up the highlight feature
https://forum.pdfsharp.net/viewtopic.php?f=3&t=1015
Page 1 of 1

Author:  chris [ Fri Jan 08, 2010 2:22 pm ]
Post subject:  Using "Courier New" messes up the highlight feature

My team came across your product and we absolutely love it. The model is very intuitive. We were up and running in no time. We were using pdf_lib which is a nightmare. However...one of the reports we are generating requires us to use a fixed-width font like Courier. The first issue we noticed is that setting the font to Courier doesn't seem to work. It appears that the reader falls back to the default font. We then tried "Courier New" which seemed to do the trick except that when we try to highlight some text on the reader, it highlights part of the line below.

Assuming that I had done something wrong, I opened up the example project and changed the Hello World app to use "Courier New" and it has the same behavior. I have included the line of code I am using to change the font.

Code:
var text = paragraph.AddFormattedText(content, new Font("Courier New"));


Am I doing something wrong?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/