Ok, I found snippets that talk about using either exec() or backticks. 
The problem is that it still doesn't call the perl script. Or at least 
doesn't seem to.

        exec("convert-pdf.pl Blank.gif",$out);
        echo(implode("\n",$out));
        $out = `convert-pdf.pl Blank.gif`;
        echo($out);

If I run
        perl convert-pdf.pl Blank.gif
from the shell, it responds with 135x105 and creates a secondary file. 
This is what the script is meant to do. Calling it in either of the 
example above, results in either an Array or nothing being displayed. No 
secondary file gets created.


On Wednesday, October 24, 2001, at 11:05 AM, Terry Romine wrote:

> I have a small situation where it would be good to be able to embed a 
> perl routing in a php script. Is this possible? Or do I need to pass 
> control from php to a perl script and return?
>
> A quick synopsis would be (in pseudo code)
>
> <?php
>       if($theFileType == "pdf" {
>               // call convert.pl to get a thumbnail
>       }
>       else {
>               // other file type processing
>       }
> ?>
>
>
> Alternatively, is there a module that can take a pdf file and make a 
> thumbnail of the first page?
>
>
> Thanks,
> Terry


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to