[jira] [Updated] (BATIK-1264) stroke-opacity specified for text in svg is not being applied to the generated pdf using fop
"Abdul Vazid (JIRA)" <[email protected]> Thu, 13 Jun 2019 17:44:00 +0000 (UTC)
| Newsgroups | gmane.text.xml.batik.devel |
|---|---|
| Message-ID | <[email protected]> |
[ https://issues.apache.org/jira/browse/BATIK-1264?page=3Dcom.atlassia=
n.jira.plugin.system.issuetabpanels:all-tabpanel ]
Abdul Vazid updated BATIK-1264:
-------------------------------
Description:=20
I am upgrading batik-1.7 to 1.11 and fop-0.93 to 2.2. I am using PDFTransco=
der of fop to convert SVG to PDF in my application. stroke-opacity is appli=
ed to text in svg. Before upgrading pdf looks good and result is as expecte=
d with opacity. But after upgrading stroke-opacity is not being applied to =
text.
Below is the code used to convert svg to pdf:
Transcoder transcoder =3D new PDFTranscoder();=20
TranscoderInput input =3D new TranscoderInput(svgFile.toURI().toString());=
=20
ByteArrayOutputStream outStream =3D new ByteArrayOutputStream();=20
TranscoderOutput output =3D new TranscoderOutput(outStream);=20
transcoder.transcode(input, output);
=C2=A0
svg Used:
{{<?xml version=3D"1.0" encoding=3D"UTF-8"?> <svg xmlns=3D"http://www.w3.or=
g/2000/svg" xmlns:xlink=3D"http://www.w3.org/1999/xlink" height=3D"418" vie=
wBox=3D"0,0 65416,45424" width=3D"816" xml:space=3D"preserve"> <defs> <styl=
e type=3D"text/css"><![CDATA[ .P{ font-family:"Arial"; font-weight:normal; =
font-size:247px; font-family:"Lucida Sans"; font-style:normal; stroke:#000;=
stroke-width:16px; stroke-dasharray:none; stroke-linejoin:miter; stroke-mi=
terlimit:10; stroke-width:0.5px; stroke-linecap:square; stroke-opacity:1.0;=
fill:none; fill-opacity:0.0; fill-rule:evenodd; } .M{ font-family:"Arial";=
font-weight:normal; font-size:282px; font-style:normal; stroke:#00F; strok=
e-dasharray:none; stroke-linejoin:miter; stroke-miterlimit:10; stroke-width=
:2px; stroke-linecap:square; stroke-opacity:1.0; fill:#00F; fill-rule:eveno=
dd; fill-opacity:1.0; } .dimmed{ stroke-opacity:0.5; fill-opacity:0.0; } ]]=
></style> </defs> <g> <g> <path class=3D"dimmed P" d=3D"M7964,25320h5669m-5=
669,0v1905m0,-1401h5669m-5669,467h5669m-5669,467h5669m-5669,467h5669m-4968,=
-1401v1401m934,-1401v1401m785,-1401v1401m743,-1401v1401m1295,-1401v1401m121=
0,-1905v1905"/> <text class=3D"dimmed M" x=3D"10258" y=3D"25695">CONN3</tex=
t> <text class=3D"M" x=3D"8054" y=3D"26172">Cav</text> </g> </g> </svg>}}
=C2=A0
{{Stroke-opacity in "dimmed" class is not showing any effect on the text "C=
ONN3" after upgrading batik and fop}}
=C2=A0
was:
I am upgrading batik-1.7 to 1.11 and fop-0.93 to 2.2. I am using PDFTransco=
der of fop to convert SVG to PDF in my application. stroke-opacity is appli=
ed to text in svg. Before upgrading pdf looks good and result is as expecte=
d with opacity. But after upgrading stroke-opacity is not being applied to =
text.
Below is the code used to convert svg to pdf:
Transcoder transcoder =3D new PDFTranscoder();=20
TranscoderInput input =3D new TranscoderInput(svgFile.toURI().toString());=
=20
ByteArrayOutputStream outStream =3D new ByteArrayOutputStream();=20
TranscoderOutput output =3D new TranscoderOutput(outStream);=20
transcoder.transcode(input, output);
=C2=A0
> stroke-opacity specified for text in svg is not being applied to the gene=
rated pdf using fop
> -------------------------------------------------------------------------=
-------------------
>
> Key: BATIK-1264
> URL: https://issues.apache.org/jira/browse/BATIK-1264
> Project: Batik
> Issue Type: Bug
> Reporter: Abdul Vazid
> Priority: Major
>
> I am upgrading batik-1.7 to 1.11 and fop-0.93 to 2.2. I am using PDFTrans=
coder of fop to convert SVG to PDF in my application. stroke-opacity is app=
lied to text in svg. Before upgrading pdf looks good and result is as expec=
ted with opacity. But after upgrading stroke-opacity is not being applied t=
o text.
> Below is the code used to convert svg to pdf:
> Transcoder transcoder =3D new PDFTranscoder();=20
> TranscoderInput input =3D new TranscoderInput(svgFile.toURI().toString()=
);=20
> ByteArrayOutputStream outStream =3D new ByteArrayOutputStream();=20
> TranscoderOutput output =3D new TranscoderOutput(outStream);=20
> transcoder.transcode(input, output);
> =C2=A0
> svg Used:
> {{<?xml version=3D"1.0" encoding=3D"UTF-8"?> <svg xmlns=3D"http://www.w3.=
org/2000/svg" xmlns:xlink=3D"http://www.w3.org/1999/xlink" height=3D"418" v=
iewBox=3D"0,0 65416,45424" width=3D"816" xml:space=3D"preserve"> <defs> <st=
yle type=3D"text/css"><![CDATA[ .P{ font-family:"Arial"; font-weight:normal=
; font-size:247px; font-family:"Lucida Sans"; font-style:normal; stroke:#00=
0; stroke-width:16px; stroke-dasharray:none; stroke-linejoin:miter; stroke-=
miterlimit:10; stroke-width:0.5px; stroke-linecap:square; stroke-opacity:1.=
0; fill:none; fill-opacity:0.0; fill-rule:evenodd; } .M{ font-family:"Arial=
"; font-weight:normal; font-size:282px; font-style:normal; stroke:#00F; str=
oke-dasharray:none; stroke-linejoin:miter; stroke-miterlimit:10; stroke-wid=
th:2px; stroke-linecap:square; stroke-opacity:1.0; fill:#00F; fill-rule:eve=
nodd; fill-opacity:1.0; } .dimmed{ stroke-opacity:0.5; fill-opacity:0.0; } =
]]></style> </defs> <g> <g> <path class=3D"dimmed P" d=3D"M7964,25320h5669m=
-5669,0v1905m0,-1401h5669m-5669,467h5669m-5669,467h5669m-5669,467h5669m-496=
8,-1401v1401m934,-1401v1401m785,-1401v1401m743,-1401v1401m1295,-1401v1401m1=
210,-1905v1905"/> <text class=3D"dimmed M" x=3D"10258" y=3D"25695">CONN3</t=
ext> <text class=3D"M" x=3D"8054" y=3D"26172">Cav</text> </g> </g> </svg>}}
> =C2=A0
> {{Stroke-opacity in "dimmed" class is not showing any effect on the text =
"CONN3" after upgrading batik and fop}}
> =C2=A0
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)