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.
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:
stroke-width: 5
, stroke-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).
The Telerik PDF viewer should correctly honor and render the stroke-width
property defined within SVG elements embedded in the PDF file.
All strokes in SVGs appear very thin, with no visual difference despite varying stroke widths in the source SVG.
_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.Component | Version |
---|---|
Telerik UI | 2025.1.211.48 |
.NET Framework | .NET Framework 4.8 |
OS | Windows 11 |
Ensure that the rendering engine used by RadPdfViewer
fully supports the SVG stroke-width
attribute when parsing and rendering embedded SVG content.
For example, if you choose to print second page like this:
It prints only the first page of the document, instead of the second page.
Template PDF documents created for example with Foxit PDF Editor, or with documents created programmatically with Aspose.
If the documents are opened with other PDF viewers such as Foxit or Adobe, there are no problems, which is not the case with the Telerik viewer.
I am currently using Telerik UI for WinForms 2024 Q4 24.4.1113.0
The following assemblies are missing in the 2024_4_1127_Dev_Preview zip folder:
- Telerik.Windows.Documents.Flow.FormatProviders.Doc
- Telerik.Windows.Documents.Flow.FormatProviders.Pdf
- Telerik.Documents.SpreadsheetStreaming.dll
Open the Demo app and load the PDF document with such annotation. The following error occurs:
************** Exception Text **************The attached file lorem-ipsum.pdf is rendered incorrectly in PdfViewer. I suspect it has something to do with kerning, because monospace font is not affected. Adobe Acrobat, Foxit PDF Reader, and Chrome render the file correctly.
The file was created with Pandoc, open source software, converting a markdown file (.md) to .pdf.
When RadPdfViewer is in text selection mode and the user is trying to select a word by double-clicking on it, the last letter of the word is not selected when the word is followed by some symbols like '.', ':', '(', '...'
Also, the CaretPosition is not correct.
Steps to reproduce:
1. Load a PDF document with 0 pages
2. Enter some text in the search textbox and click the next/prev buttons
Expected: the search textbox should be either disabled or should ignore any search operation
Actual: an error occurs
Workaround:
Private Sub pdf_Viewer_DocumentLoaded(sender As Object, e As EventArgs)
If pdf_Viewer.Document.Pages.Count = 0 Then
pdf_Toolbar.SearchTextBox.Enabled = False
pdf_Toolbar.NextButton.Enabled = False
pdf_Toolbar.PreviousButton.Enabled = False
Else
pdf_Toolbar.SearchTextBox.Enabled = True
pdf_Toolbar.NextButton.Enabled = True
pdf_Toolbar.PreviousButton.Enabled = True
End If
End Sub
Hello
I am have a problem with pdf wiewer when the PDF file contains an images , it is slow in movement and it is difficult to navigate between pages. Is it possible to fix this problem