SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Calling Adobe Illustrator from PHP

    Hi there,

    what I want to do on my Windows server: open Illustrator, make it open a JavaScript file and execute it (manually you would go to File -> Scripts), all controlled via PHP.

    Unfortunately I got no idea on how to do this. I only got some codesnippet, that opens Illustrator. Not that much, Id say:

    PHP Code:
    $WshShell = new COM("WScript.Shell");
    $illustrator $WshShell->Run("Illustrator.exe"3true); 
    I googled quite a lot on this, but found actually nothing... I have no idea where to look at to find something on Illustrators Object hierarchy.

    Has anyone done something before like this with Illustrator? Any documentation you could point me to?

    Help would be greatly appreciated!

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Why can't you just click on the Illustrator icon in the start menu and go to File > Scripts...Maybe I just don't understand why one needs to do this.

    Adobe products arn't really a command line thing, just accessing one from the command line "Illustrator help" doesn't give any message to being wrong or right just opens.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because I want to generate PDFs on the fly using Illustrator.

  4. #4
    SitePoint Guru Ize's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    809
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do that without Illustrator

  5. #5
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using fpdf

    http://www.fpdf.org/

  6. #6
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do know that there are enough pdf libs for php out there, but I want to have a go with Illustrator.

    Does really nobody know how to do this?

  7. #7
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    You can't Illustrator has no command line connections.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  8. #8
    SitePoint Evangelist
    Join Date
    Jan 2006
    Location
    UK
    Posts
    537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    change the file association on your pc for .js to illustrator

    then in php e.g (jsx extension for photoshop script)

    exec(escapeshellcmd("your_script.jsx"));

    I've done this with a complicated graphics processing application that required photoshop filtering capabilities beyond what imagemagick could do and it works fine. Any dynamic data that required passing I wrote into the javascript before calling it.

    Should work ok with Illustrator too.
    Have a look too at http://partners.adobe.com/public/dev...ingStarted.pdf
    if you haven't already.

  9. #9
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I knew that .jsx thingy already, but I thought there was another way e.g. using com. But as it seems not, or at least nobody seems to know. Ill go with the .jsx file approach then. Thanks.


Bookmarks

Posting Permissions

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