Jump to content


New Members
  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

JDTornado's Achievements


Newbie (1/5)



  1. I tried using Imagick as well, and am getting pretty much the same issue. Any ideas?
  2. Hi, I have been pulling my hair out for the last week trying to figure this out and am just stuck. I have a set of PDF's (roughly 3,000) that I will need to convert to JPG's. I can do this using a batch through photoshop, but after it is done, I will need all new PDF's that are uploaded to be converted to a large JPG and a thumbnail JPG. Through my research it has appeared that the best way to do this is by using GraphicsMagick, with GhostScript. I am trying to get this to work with: Windows 2008 rc2 IIS 7 PHP 5.3.3 Non-Thread Safe GraphicsMagick-1.3.12-Q8 GhostScript 9.00 php_gmagick_nts.dll from http://valokuva.org/builds/ After I got everything installed on the server, it works fine through command line. I can convert a PDF to a jpg with no problems using something like: gm convert test.pdf[0] test.jpg However, when I use this PHP script: <?php //Instantiate a new Gmagick object $image = new Gmagick('C:\inetpub\siteDir\test.pdf[0]'); //Make thumbnail from image loaded. 0 for either axes preserves aspect ratio $image->thumbnailImage(100, 0); header( "Content-Type: image/jpeg" ); echo $image; ?> I get the following error: thrown in C:\inetpub\siteDir\drawings.php on line 13 #1 {main} #0 C:\inetpub\siteDir\drawings.php(13): Gmagick->__construct('C:\inetpub\sit....') Stack trace: [17-Oct-2010 18:40:46] PHP Fatal error: Uncaught exception 'GmagickException' with message 'Postscript delegate failed (C:\inetpub\siteDir\test.pdf)' in C:\inetpub\siteDir\drawings.php:13 I have tried doing this as well: <?php exec('gm convert C:\\inetpub\\siteDir\\test.pdf[0] C:\\inetpub\\siteDir\\test.jpg'); ?> If I do that in the command line on the server, it works without any problems. When I do that in the PHP script, I get no errors, but the conversion doesn't happen either. Does anyone have any ideas? Is there a better method for doing this? Am I just missing something? Any help would be greatly appreciated. Thanks!
  3. I tried that, but am not getting values from the output parameters. The only time that the parameter gets passed back is when I use call. Have you tested your method? If so, were you able to get the value of the ouput parameter using exec?
  4. I've actually read all through the help documentation, but that only shows how to execute a stored proc using call, and I would like to use exec so I can use specific parameters instead of needing to have a placeholder for every single parameter.
  5. Hi Everyone, I have just started using the SQLSRV driver from Microsoft so I could work with SQL Server 2008 a bit better, but I am having some problems with the output parameters. I know how to access them by passing a variable by reference if I use "call StoredProcedure(?,?)", but then I have to list out every single parameter in a stored proc, rather than just binding the ones I need like the MSSQL driver does. I have been able to run a stored proc using something like "exec StoredProcedure @i_param1=?". But if I try to include an output parameter by doin something like "exec StoredProcedure @i_param1=?, @o_result=? OUTPUT". I get no value passed back to my variable that was passed by reference. Is anyone aware of a way to do this, or am I literally gonna have to pass every single parameter for every stored proc. Thanks for your advice!
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.