[jira] [Updated] (FOP-2865) stroke-opacity has no effect on text while conveting svg to pdf using fop-2.2

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (FOP-2865) stroke-opacity has no effect on text while conveting svg to pdf using fop-2.2

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/FOP-2865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Abdul Vazid updated FOP-2865:
-----------------------------
    Description:
I am upgrading batik-1.7 to 1.11 and fop-0.94 to 2.2. I am using PDFTranscoder of fop to convert SVG to PDF in my application. stroke-opacity is applied to text in svg. Before upgrading pdf looks good and result is as expected with opacity. But after upgrading stroke-opacity is not being applied to text.

*Below is the code used to convert svg to pdf:*
{code:java}
Transcoder transcoder = new PDFTranscoder();
TranscoderInput input = new TranscoderInput(svgFile.toURI().toString());
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
TranscoderOutput output = new TranscoderOutput(outStream);
transcoder.transcode(input, output);{code}
 

*SVG Used:*
{noformat}
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="418" viewBox="0,0 65416,45424" width="816" xml:space="preserve">
<defs>
<style type="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-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;
stroke-dasharray:none;
stroke-linejoin:miter;
stroke-miterlimit:10;
stroke-width:2px;
stroke-linecap:square;
stroke-opacity:1.0;
fill:#00F;
fill-rule:evenodd;
fill-opacity:1.0;
}

.dimmed{
stroke-opacity:1.0;
fill-opacity:0.0;
}
]]></style>
</defs>
<g>


<g>

<path class="dimmed P" d="M7964,25320h5669m-5669,0v1905m0,-1401h5669m-5669,467h5669m-5669,467h5669m-5669,467h5669m-4968,-1401v1401m934,-1401v1401m785,-1401v1401m743,-1401v1401m1295,-1401v1401m1210,-1905v1905"/>

<text class="dimmed M" x="10258" y="25695">CONN3</text>
<text class="M" x="8054" y="26172">Cav.</text>
</g>
</g>

</svg>
{noformat}
{{Stroke-opacity in "dimmed" class is not showing any effect on the text "CONN3" after upgrading batik and fop.}}

 

  was:
I am upgrading batik-1.7 to 1.11 and fop-0.93 to 2.2. I am using PDFTranscoder of fop to convert SVG to PDF in my application. stroke-opacity is applied to text in svg. Before upgrading pdf looks good and result is as expected with opacity. But after upgrading stroke-opacity is not being applied to text.

*Below is the code used to convert svg to pdf:*
{code:java}
Transcoder transcoder = new PDFTranscoder();
TranscoderInput input = new TranscoderInput(svgFile.toURI().toString());
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
TranscoderOutput output = new TranscoderOutput(outStream);
transcoder.transcode(input, output);{code}
 

*SVG Used:*
{noformat}
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="418" viewBox="0,0 65416,45424" width="816" xml:space="preserve">
<defs>
<style type="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-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;
stroke-dasharray:none;
stroke-linejoin:miter;
stroke-miterlimit:10;
stroke-width:2px;
stroke-linecap:square;
stroke-opacity:1.0;
fill:#00F;
fill-rule:evenodd;
fill-opacity:1.0;
}

.dimmed{
stroke-opacity:1.0;
fill-opacity:0.0;
}
]]></style>
</defs>
<g>


<g>

<path class="dimmed P" d="M7964,25320h5669m-5669,0v1905m0,-1401h5669m-5669,467h5669m-5669,467h5669m-5669,467h5669m-4968,-1401v1401m934,-1401v1401m785,-1401v1401m743,-1401v1401m1295,-1401v1401m1210,-1905v1905"/>

<text class="dimmed M" x="10258" y="25695">CONN3</text>
<text class="M" x="8054" y="26172">Cav.</text>
</g>
</g>

</svg>
{noformat}
{{Stroke-opacity in "dimmed" class is not showing any effect on the text "CONN3" after upgrading batik and fop.}}

 


> stroke-opacity has no effect on text while conveting svg to pdf using fop-2.2
> -----------------------------------------------------------------------------
>
>                 Key: FOP-2865
>                 URL: https://issues.apache.org/jira/browse/FOP-2865
>             Project: FOP
>          Issue Type: Bug
>            Reporter: Abdul Vazid
>            Priority: Major
>              Labels: fop
>
> I am upgrading batik-1.7 to 1.11 and fop-0.94 to 2.2. I am using PDFTranscoder of fop to convert SVG to PDF in my application. stroke-opacity is applied to text in svg. Before upgrading pdf looks good and result is as expected with opacity. But after upgrading stroke-opacity is not being applied to text.
> *Below is the code used to convert svg to pdf:*
> {code:java}
> Transcoder transcoder = new PDFTranscoder();
> TranscoderInput input = new TranscoderInput(svgFile.toURI().toString());
> ByteArrayOutputStream outStream = new ByteArrayOutputStream();
> TranscoderOutput output = new TranscoderOutput(outStream);
> transcoder.transcode(input, output);{code}
>  
> *SVG Used:*
> {noformat}
> <?xml version="1.0" encoding="UTF-8"?>
> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="418" viewBox="0,0 65416,45424" width="816" xml:space="preserve">
> <defs>
> <style type="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-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;
> stroke-dasharray:none;
> stroke-linejoin:miter;
> stroke-miterlimit:10;
> stroke-width:2px;
> stroke-linecap:square;
> stroke-opacity:1.0;
> fill:#00F;
> fill-rule:evenodd;
> fill-opacity:1.0;
> }
> .dimmed{
> stroke-opacity:1.0;
> fill-opacity:0.0;
> }
> ]]></style>
> </defs>
> <g>
> <g>
> <path class="dimmed P" d="M7964,25320h5669m-5669,0v1905m0,-1401h5669m-5669,467h5669m-5669,467h5669m-5669,467h5669m-4968,-1401v1401m934,-1401v1401m785,-1401v1401m743,-1401v1401m1295,-1401v1401m1210,-1905v1905"/>
> <text class="dimmed M" x="10258" y="25695">CONN3</text>
> <text class="M" x="8054" y="26172">Cav.</text>
> </g>
> </g>
> </svg>
> {noformat}
> {{Stroke-opacity in "dimmed" class is not showing any effect on the text "CONN3" after upgrading batik and fop.}}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)