Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2003
    Location
    Uk midlands I think
    Posts
    42

    ghostscript on linux

    Righty ...

    What Im doing is creating a application for a client that allows users to select pre-made pdf docs, that are then merged into one document using ghostscript and emailed to them.

    Bellow is the script to merge the selected docs;


    PHP Code:
    $command 'gswin32c -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output/' $_POST['filename'];

    foreach(
    $_POST['files'] as $file) {

        
    $command .= ' files/' $file;

    }

    passthru($command$ret_var); 
    gswin32c being the command line .exe file for Ghostscript. So far so good, Now I need to upload this to a web host (shared hosting) on LINUX!!!! so I need a Ghostscript command line file, executable ? for linux. Now I have used linux (mandrake) and i know it all comes as source most of the time, but basicly I dont have the time or resources to install linux just to 'make' this file, can anyone advise/help me here.

    I am awhere that my host may not allow this sort of php, passthru/exec/system functions, uptill now it hasnt been promising,(I will have to contact them). but if anyone has done this before, or can send a linux copy of gs to me, i would be very grateful to say the least.

  2. #2
    Join Date
    Apr 2003
    Location
    Uk midlands I think
    Posts
    42
    *bump*

  3. #3
    Join Date
    Apr 2003
    Location
    Uk midlands I think
    Posts
    42
    * bump *

  4. #4
    Join Date
    Jan 2003
    Location
    Alabama, USA
    Posts
    4
    First thing you'll want to do is find out what Linux distribution (and version of that distribution) the server is running, since an executable not built on that distribution might not work due to library dependencies and differing versions between distributions. If you're unable to find out, a statically linked executable might work, but getting an executable that was built on the same distribution that your server is running would probably be your best bet.

  5. #5
    Join Date
    Apr 2003
    Location
    Uk midlands I think
    Posts
    42
    php_uname returns

    Linux infong 2.4.20-grsec #1 SMP Tue Jan 28 09:09:35 CET 2003 i686 unknown

    Mean anything to you ?

  6. #6
    Join Date
    Jan 2003
    Location
    Alabama, USA
    Posts
    4
    Originally posted by koorb
    php_uname returns

    Linux infong 2.4.20-grsec #1 SMP Tue Jan 28 09:09:35 CET 2003 i686 unknown

    Mean anything to you ?
    That kernel version seems unique, so I searched google for it, but couldn't really find out if it's from a specific distribution.

Posting Permissions

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