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

WMFTranscoder/WMFPainter writes out "?" instead of numbers in resulting SVG document when attempting to convert a WMF image without a viewport width specified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 1.7
    • None
    • Utilities
    • None
    • Operating System: Windows XP
      Platform: PC

    Description

      Line 118 on WMFPainter.java resets the scale based on a calculation of scale * the width in pixels / the viewport width. In the event that the viewport width is zero, division by zero occurs and a the scale is set as "Infinity." This causes lots of issues downstream and eventually the SVG file is written out with "?" in place of numbers in the <path> tags, and the SVG renders completely blank. If this line is commented out, then the SVG resembles the original WMF, except that only about half of the original content is rendered in the view port. See the attachment for the original WMF image and the resulting two SVG files.

      Attachments

        1. wmf-without-viewport-width.zip
          315 kB
          Brent Pacheco

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            brent.pacheco@cerner.com Brent Pacheco
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: