Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts

    Creating EPS from PHP

    Does anyone know of any classes/functions that will help creating EPS files directly from PHP? I didn't have much luck searching :|

    Going via a pdf is an option, but if it can be done directly then that would be preferable.

  • #2
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    could you be a little more specific .. you want to go from text -> EPS ?
    If you have imagemagick installed on the server it sounds possible:
    http://www.imagemagick.org/script/formats.php
    it appears to require Ghostscript though.
    you'd probably go from text -> PS -> EPS or something like that.

  • #3
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    it's going to need to include images (company logos etc.) and shapes (coloured squares/circles/etc.). That list looks promising, but something ready-made would be nicer (I'm lazy you see...)

  • #4
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    mmm, well, I did some googling and didn't really see a whole lot, try a little testing around with convert, you are going from jpg -> EPS ? which format to EPS ?

  • #5
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    I'm wanting to create the text and shapes myself (based on coordinates or whatever EPS understands), and then there might be a need for existing gifs/jpgs to become part of the EPS.
    I know (vaguely) how to make a PDF like I want from PHP, and I know that PDFs can made into (E?)PS files quite easily, but if there's a way of skipping the inbetween steps then it would be handy.

  • #6
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I believe you can use gnuplot to create shapes in the EPS format(set terminal postscript eps):
    http://www.gnuplot.info/
    although if that is not installed on the server that might be a problem.

    mmm, you could try using PS then convert that to EPS:
    http://us2.php.net/ps

    also refer to this(and some googling for good measure):
    http://www.maths.ox.ac.uk/help/faqs/latex/ps2epsi.shtml

    edit: typo
    Last edited by fci; 02-08-2006 at 05:19 PM.

  • #7
    Regular Coder
    Join Date
    Apr 2005
    Location
    austin, tx
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm curious why you want to use EPS format. I know this is off the PHP topic, but EPS format is really only going to benefit you if it is in vector format which would prove to be extremely difficult to generate from a web page. If you turn a screen print into an EPS file that is raster based, it's no better than just making a jpeg image.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •