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

[PATCH] Headless problem in transcoders

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: None
    • Component/s: SVG Rasterizer
    • Labels:
    • Environment:
      Operating System: All
      Platform: Other

      Description

      Transcoders have a problem with headless mode. The reason is they invoke
      Toolkit.getDefaultToolkit().getScreenResolution() that throws
      java.awt.HeadlessException (a RuntimeException) which then trips up the application.

      Calls to the above method must catch the exception and assign a default screen
      resolution, 100 DPI, for instance. I guess a serious solution would take a
      parameter.

      The following code contains such calls:
      transcoder/ToSVGAbstractTranscoder.java
      transcoder/wmf/tosvg/AbstractWMFReader.java
      transcoder/wmf/tosvg/WMFPainter.java

      Running transcoders in headless mode is very common.

        Attachments

        1. Batik-Bug42408-PatchV1.1.patch
          17 kB
          Helder Magalhães
        2. bug42408.patch
          13 kB
          Hervé Girod

          Issue Links

            Activity

              People

              • Assignee:
                batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
                Reporter:
                programvaruverkstad@yahoo.se Hakan Soderstrom
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: