Report measurement options used to improvise the appearance of report in rendering and export outputs.
ASP.NET Core Report Viewer provides the property MeasureTextOption
that helps to include following improvements in text rendering,
To enable the above benefits, set the MeasureTextOption
property value to PdfFont
in OnInitReportOptions
of Report Viewer Web API controller as shown in below code snippet.
```csharp
[NonAction]
public void OnInitReportOptions(ReportViewerOptions reportOption)
{
reportOption.ReportModel.MeasureTextOption = MeasureTextOptions.PdfFont;
}
```
The above measurement option uses the custom fonts added in the
reportOption.ReportModel.PDFOptions.Fonts
collection.
When the RoundLayoutMeasures
property is false, all non-integral values that are calculated during the report processing are rounded to whole pixel values. It provides following improvements,
To enable the above benefits, set the RoundLayoutMeasures
property value to false
in OnInitReportOptions
of Report Viewer Web API controller as shown in below code snippet.
```csharp
[NonAction]
public void OnInitReportOptions(ReportViewerOptions reportOption)
{
reportOption.ReportModel.RoundLayoutMeasures = false;
}
```