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 293017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:13:59+00:00 2026-05-12T06:13:59+00:00

I am currently struggling with a side project I hope you can help me

  • 0

I am currently struggling with a side project I hope you can help me with.

I am trying to convert SVG images to JPEG with PHP4.

Originally I tried to interface java with php via the php_java.dll and jar that comes with PHP 4.2.2 but while I never got any warnings I never managed to get even the simplest test working. All text regarding it is for JDK1.4 and an article on setting it up on O’Reilly website is for JDK1.2. That would of enabled me to use Batik.

So I then looked harder and saw cryptic references to using PHP:GD to convert SVG to JPEG. GD seems to be able to load and save JPEG, PNG, GIF, etc, but not SVG directly. GD seems to use a vector graphics format but not entirely sure if it is SVG compatible (I am a noob to both).

I did find a Perl GD::SVG module, but obviously requires Perl – and considering the problems I had with PHP<->Java I am loathe to go that route.

I also found a site (which I can’t find now) that discussed speed of various SVG conversions with rsvg, Cairo and a couple of others. Talking of applications converting SVG to JPEG, people also discuss ImageMagick. While that might work on the linux box that is the server, I do 99% of my development in Windows – hence prefering a pure PHP solution and not wrestling with differences between applications on different platforms.

I am now considering writing a SVG->GD converter. The final alternative is to use SVG in the browser via Raphael. I’d rather convert to JPEG on the server and serve the image normally.

Has anyone had any use of SVG->GD, know of any OS (but not GPL) convertors or have any better ideas?

  • 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-12T06:14:00+00:00Added an answer on May 12, 2026 at 6:14 am

    I finally manage to fix it by actually downloading and installing the 1.4 JDK from Sun’s archive. Worked no problem. Something must of changed between 1.4 and 1.6.14 but I am glad I got it working.

    Also while researching a blog post on this subject I came across Image_Canvas which might be a better (ie it is written in PHP) option.

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

Sidebar

Related Questions

I'm currently struggling a bit trying to keep my controller specs DRY and succinct
I'm currently struggling to use UI elements in Interface Builder. I keep trying to
I'm currently struggling with one of the bindings I'm trying to add to my
I am currently struggling with Maven: I have a complex project made of several
I'm currently struggling with Oracle Apex. I'm trying to create an application which enables
I'm currently struggling with a problem I'd like you to help me solving... basically
I'm currently struggling to figure out a solution to a situation I'm in. I'll
Because I'm currently struggling to learn IBM Rational ClearCase, I'd like to hear your
I am currently struggling with HTTP Session replication on tomcat with complex objects. Some
I'm currently struggling with this Collection was modified; enumeration operation may not execute issue.

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.