When converting the image
<svg height="200" width="300" xmlns="http://www.w3.org/2000/svg">
<line x1="0" y1="0" x2="300" y2="200" stroke="#FF0000" stroke-width="5" stroke-opacity="30%" />
</svg>
the line is drawn with a fill and stroke:
% Fill of line (black)
q
/cs0 cs
0 0 0 scn
0 0 m
300 200 l
f
Q
% Stroke of line (transparent red)
q
/gs0 gs
/cs0 CS
1 0 0 SCN
5 w
4 M
0 J
0 j
[] 0 d
0 0 m
300 200 l
S
Q
Even though the line has no inner area, the black fill is still visible as an additional line in some viewers (Chrome, Edge, but not PDF.js).

This can be circumvented by explicitly setting the line's fill to "none", but that probably shouldn't be necessary.
When converting the image
the line is drawn with a fill and stroke:
Even though the line has no inner area, the black fill is still visible as an additional line in some viewers (Chrome, Edge, but not PDF.js).
This can be circumvented by explicitly setting the line's fill to
"none", but that probably shouldn't be necessary.