Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7600237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:51:48+00:00 2026-05-30T22:51:48+00:00

On one server, and on my Windows laptop, producing PDFs with this method works

  • 0

On one server, and on my Windows laptop, producing PDFs with this method works fine:

http://www.databasesandlife.com/svg-to-pdf/

But on the other server I get this error:

org.apache.batik.transcoder.TranscoderException: Error while setting up PDFDocumentGraphics2D
Enclosed Exception:
Error while setting up fonts
    at org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:189)
    at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
    at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
    at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown Source)
    at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source)

I have been Googling and searching for hours, but to no avail. What can I do?

I tried installing the following packages but they didn’t help:

sudo apt-get install gsfonts gsfonts-x11 gsfonts-other batik \
    libbatik-java libxmlgraphics-commons-java  \
    libxmlgraphics-commons-java fop sun-java6-fonts

My situation is:

  • Debian 6.0.3
  • Sun Java version “1.6.0_26”
  • JARs: avalon-framework-4.2.0.jar batik-all-1.7.jar commons-io-1.3.1.jar commons-logging-1.0.4.jar fop-0.95.jar log4j-1.2.15.jar xml-apis-ext.jar xmlgraphics-commons-1.3.1.jar
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:51:49+00:00Added an answer on May 30, 2026 at 10:51 pm

    The approach to solving this problem is in log4j.properties I turned up the level to TRACE.

    There I saw the extra log before the TranscoderException that I’d seen previously:

    2012-02-28 11:51:24,863 DEBUG: org.apache.fop.fonts.FontCache: 
       Writing font cache to /usr/share/jetty/.fop/fop-fonts.cache
    org.apache.batik.transcoder.TranscoderException: 
       Error while setting up PDFDocumentGraphics2D
    

    Horray for logs! (And writing a log about what the program is about to do, not just once it has done it, so that if the operation fails, then you know what it was trying to do while it failed.)

    On Debian, the Jetty webserver runs under the user jetty and has its home directory at /usr/share/jetty/. However, the jetty user does not have write-access to its own home directory, therefore this ~/.fop directory could not be created.

    adrian@10770-02:~$ grep jetty /etc/passwd
    jetty:x:107:111::/usr/share/jetty:/bin/false
    adrian@10770-02:~$ ls -ld /usr/share/jetty
    drwxr-xr-x 7 root root 4096 Feb 28 11:52 /usr/share/jetty/
    

    I don’t know whether this is by design, or a bug, but creating this directory so that Jetty could write it…

    sudo mkdir -p -m 0777 /usr/share/jetty/.fop
    

    …solved the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a strange one. A web application which runs fine on Windows Server
I just installed Ubuntu 10.10 server with NodeJS 0.4.6 using this guide: http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/ on
I have a newly configured Windows Server 2003 VM. One of the issues with
We've installed Windows Search Server Express on one of our servers, which apparently runs
I'd like to have one server make an http post request to another server.
I have one server and three clients in which a windows service is running
I have the Xming X Window Server installed on a laptop running Windows XP
I have a C# service that works without any problems on my laptop (Windows 7).
Windows Server 2003 (IIS6), .NET 4.0 I recently upgraded one of my sites from
I have two Windows Server 2008 machines on the same domain. Server one is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.