Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1241

Transcoder failed when transforming svg to pdf

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.10
    • Fix Version/s: None
    • Component/s: SVG Rasterizer
    • Labels:
      None

      Description

       

      During processing svg document by pdf transcoder I get failure:

      The attribute "transform" of the element <text> is invalid

      The document which I try to process has <text> elements inside. Those elements contains transform attribute. Example below:

      <text class="c3-axis-x-label" transform="none" style="text-anchor: middle;font-size: 0.6rem;" x="243.546875" dx="0" dy="3em"/>

      The problem is, that Chrome web browser processing such as document, remove "none" word by empty string. In that specyfic case transcoder works perfectly. We got pdf document with proper svg content. But when I use Microsoft Edge web browser, which processes svg content differently than Chrome, we got <text> element with transform="none" attribute. In this case, transcoder throws exception.

      I have made some test that revealed some problem with transcoder. When I remove only "none" word (transform=""), everything is good. 

       

      I have used: 

      Microsoft Edge 42.17134.1.0

      Chrome:  69.0.3497.100

      org.apache.xmlgraphics:batik-transcoder:1.10

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Makapaka Przemysław Boryka
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: