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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:21:32+00:00 2026-05-27T03:21:32+00:00

Before I go ahead and try to code my own, are there any functions

  • 0

Before I go ahead and try to code my own, are there any functions / libraries for PHP which will generate SVG images with text wrapped to a bounding box?

I’m looking for a function which will accept a string and a bonding box, along the lines of: wrapText($text,$x,$y,$width)

So if $text were “The Quick Brown Fox Jumped Over The Lazy Dog” and $width were 125, the SVG file might show:

The Quick Brown
Fox Jumped
Over The Lazy
Dog.

This XML.com article looks like what I’d use, but it’s ECMAScript built into the SVG. I’m looking for something that generates pure SVG with no scripts (so it could be read by Adobe Illustrator, for example)

Before I re-code their algorithm in PHP, does anything like this already exist?

  • 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-27T03:21:33+00:00Added an answer on May 27, 2026 at 3:21 am

    In the end I did this myself. The final result is proprietary code, so I can’t share it here. But basically it involved creating an SVG 1.2 document with the text inside a <flowRect>, and then feeding that SVG through Inkscape to convert the SVG 1.2 <flowRect> to a series of SVG 1.1 <tspan>s

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

Sidebar

Related Questions

Before I start, I know there is this post and it doesn't answer my
I'm considering remaking my blog(currently in PHP, but <100 lines of non-layout code) in
I'd like to implement a date picker using a calendar. Before I go ahead
I've never used these functions before but after reading a lot about sprintf(), I
Now, I could go ahead and write this using FileSystemWatcher etc, but before I
I have a python for loop, in which I need to look ahead one
I'm looking for a compiler to translate Java bytecode to platform-independent C code before
before I go ahead and attempt to create a website, I wanted to know
Got some great help yesterday with some php code for a mailer and forgot
Before you answer this I have never developed anything popular enough to attain high

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.