Pending Review
Last Updated: 29 Apr 2025 15:55 by Svitlana
Svitlana
Created on: 29 Apr 2025 15:55
Category: PdfViewer
Type: Bug Report
0
Telerik RadPdfViewer doesn't support SVG stroke-width attribute when parsing and rendering embedded SVG content

Overview

This repository documents a bug found in the Telerik PDF Viewer control for Windows Forms. The issue specifically affects the rendering of SVG graphics embedded in PDF files, where the stroke-width attribute is ignored by the viewer.

Affected Component

  • Product: Telerik UI for WinForms
  • Control: `RadPdfViewer'
  • Version: 2025.01
  • Platform: Windows Forms (.NET Framework)

Description of the Issue

When a PDF file contains an embedded SVG graphic that utilizes the stroke-width CSS property (or SVG attribute), the stroke width is not rendered correctly in Telerik's PDF preview control. Regardless of:

  • Unit used (e.g., px, pt, em, %, etc.)
  • Value assigned (e.g., stroke-width: 5stroke-width: 30, etc.)

…the resulting line always appears thin, as if the stroke width were ignored entirely. This makes the SVG appear incorrectly and inconsistent with its rendering in other PDF viewers (e.g., Adobe Acrobat, Chrome's built-in viewer).

Steps to Reproduce

  1. Run the application from provided MCVE
  2. Observe the SVG lines in PDF preview: all strokes appear thin, regardless of defined stroke width.

Expected Behavior

The Telerik PDF viewer should correctly honor and render the stroke-width property defined within SVG elements embedded in the PDF file.

Actual Behavior

All strokes in SVGs appear very thin, with no visual difference despite varying stroke widths in the source SVG.

Sample Files

  • βœ… _PdfExample.pdf: A PDF with SVG lines that render correctly in Microsoft Edge.
  • βœ… _PdfExample.pdf: Screenshot of how the PDF file looks in Microsoft Edge.
  • ❌ _ScreenshotFromTelerik.png: Screenshot of how the same file looks in the Telerik PDF Viewer (note the thin lines).
  • πŸ” _LargeStroke.svg_SmallStroke.svg: The original SVGs used in the PDF file.

Environment

ComponentVersion
Telerik UI2025.1.211.48
.NET Framework.NET Framework 4.8
OSWindows 11

Suggested Fix

Ensure that the rendering engine used by RadPdfViewer fully supports the SVG stroke-width attribute when parsing and rendering embedded SVG content.

Attached Files:
0 comments