Unplanned
Last Updated: 04 Jul 2025 09:12 by Sergey
Sergey
Created on: 27 Jun 2025 08:29
Type: Bug Report
1
Incorrect Rendering of SVG polyline stroke in PDF Export

When exporting an SVG image to PDF, polylines with stroke-dasharray are rendered incorrectly — the dash pattern is not applied.

Additionally, polylines with a stroke-width exhibit visual artifacts such as pixelation or inconsistent thickness.

Step by step instructions or code snippets how to reproduce the problem

  1. Save svg content (see below) as a file c:\test_svg_line_stroke.svg
  2. Create an empty report
  3. Add a picture box
  4. Select a value for the picture box - use file c:\test_svg_line_stroke.svg
  5. Go to preview - SVG is correct
  6. Click Export->Acrobat (PDF) file and export a PDF file
  7. Open PDF file to verify that the red line in a bottob does not have stroke-dasharray applied

If there's no black line with no stroke-dasharray - the red line in a bottom looks correct

 

test_svg_line_stroke.svg

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xml="http://www.w3.org/XML/1998/namespace" width="500" height="400" viewBox="0, 0, 500, 400" preserveAspectRatio="xMinYMin" transform="scale(1)">
  <polyline points="100, 100 400, 100" stroke-width="7" stroke-dasharray="40 40" style="fill:none;stroke:#FF0000;" />
  <polyline points="100, 200 400, 200" stroke-width="5" style="fill:none;stroke:#000000;" />
  <polyline points="100, 300 400, 300" stroke-width="7" stroke-dasharray="40 40" style="fill:none;stroke:#FF0000;" />
</svg>


test_svg_line_stroke.svg - svg source file 
test_svg_line_stroke.trdp - report with a picture box with SVG image
test_svg_line_stroke.pdf - generated PDF file

Attached Files:
2 comments
Sergey
Posted on: 04 Jul 2025 09:12
Hello Todor!

Thank you for Telerik points and providing a workaround as UseSvgVectorRendering=false.
With switch off UseSvgVectorRendering the produces picture looks blurry comparing to SVG.
As another workaround PNG images can be used, but they can look blurry when zommed in.
Looking forward for a possible fix.

Sergey
ADMIN
Todor
Posted on: 03 Jul 2025 15:50

Hi Sergey,

Thank you for the detailed description of the issue, the runnable report, and the steps to reproduce. I confirm the problem.

I also tested setting the PDF Device Info Setting UseSvgVectorRendering to false, and this fixed the issue when exporting to PDF. You may use this as a workaround.

As a token of gratitude for sharing the problem, I updated your Telerik points.

Regards,
Todor
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.