0

I'm working on a PDF generated based on an HTML template. We have the template as the customer used it before (written in Word) and the font they require is Verdana. The problem is Verdana in CSS appears to be smaller in size and has a smaller font weight than in Word. I tried to trick it into looking similar to the Word version by:

  1. increasing font-weight - the issue is that it supports either 400(normal) or 700(bold) - when I need something in between
  2. adding text-shadow - when playing with the HTML template I achieved something that looked similar by adding text-shadow: 0.1px 0 black; - yet when rendering the PDF it was ignored, only taking into account fixed px sizes like text-shadow: 1px 0 black; - which again was too bold.

Any idea of how I can solve this? Verdana is their signature font and it's a must have.

Note for PDF rendering I'm using SelectPDF .Net core version.

Thanks,

Lorena

Lorena Sfăt
  • 215
  • 2
  • 7
  • 18
  • Hm maybe the server machine has the font not installed? You can get it here: https://www.fonts.com/font/microsoft-corporation/verdana?QueryFontType=Web – keuleJ Nov 14 '19 at 12:27
  • I'm testing on my local machine - Windows-based - so in theory Verdana is pre-installed on my PC. – Lorena Sfăt Nov 14 '19 at 12:33

1 Answers1

0

In general browser and PDF have different layout and font engines, so they render everything in different manner. You can try to tweak DPI value for your PDF to match what you have on monitor.

Dima Vishnyakov
  • 1,361
  • 10
  • 21
  • Thanks for the tip. Unfortunately SelectPDF does not look too flexible on this side. All I found related to the DPI is the resolution, which I don't want to change. – Lorena Sfăt Nov 14 '19 at 13:51