Embedding Courier New font to a pdf when using WebForms library

Bijaya Rai 60 Reputation points
2023-03-15T13:16:44.7333333+00:00

I am unable to create a pdf document that uses 'Courier New' true-type font, using LocalReport class in Microsoft.Reporting.WebForms lib.

The pdf is generated with CourierStd, Type 1, font.

Is this a bug in the lib or am I missing a config? I will accept it if it embeds CourierNewPSMT, TrueType font, since I am after the correct font family and font type.

I have checked that

  • this font exists in my System
  • this issue does not happen when using Times New Roman
  • this issue does not happen when using MS Word. (Embeds CourierNewPSMT, TrueType font)

I am using LocalReport class in Microsoft.ReportViewer.WebForms, Version=15.0.0.0

RDL Template:

<Style>
       <FontFamily>Courier New</FontFamily>
       <FontSize>26pt</FontSize>
    </Style>
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,063 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-03-16T05:24:02.9633333+00:00

    Hi @Bijaya Rai

    For PDF embedded fonts, please check this link to check if font embedding meets the required conditions.

    https://learn.microsoft.com/en-us/sql/reporting-services/report-builder/exporting-to-a-pdf-file-report-builder-and-ssrs?view=sql-server-ver16

    If the answer is helpful, please click "Accept Answer" and upvote it. If you have any questions, please feel free to let me know.

    Best regards,

    Aniya


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.