[Swftools-common] pdf2swf conversion error using php

2009-09-12 Thread franck ruzzin
I have on a Linux server the file 'convert.php', containing :

?php
$output=array();
$command = ../pdf2swf -t -o Notre_participation.pdf.swf 
Notre_participation.pdf;
$return_var=0;
$s=exec($command,$output,$return_var);

array_push ($output, EXEC RETURN VALUE :  . $return_var);
print_r($output);
?


If I type via SSH the following code

(uiserver):u44819199:~/swftest/script  bphp convert.php/b
I have the following response


Array
(
[0] = NOTICE  processing PDF page 1 (595x842:0:0) (move:0:0)
[1] = NOTICE  File contains jpeg pictures
[2] = NOTICE  processing PDF page 2 (595x842:0:0) (move:0:0)
[3] = NOTICE  processing PDF page 3 (595x842:0:0) (move:0:0)
[4] = NOTICE  processing PDF page 4 (595x842:0:0) (move:0:0)
[5] = NOTICE  Writing SWF file Notre_participation.pdf.swf
[6] = EXEC RETURN VALUE : 0
)


and the file 'Notre_participation.pdf.swf' is generated.

But if open the same file via a navigator (ie http://mysite/convert.php),
I have the following response


[0] = NOTICE processing PDF page 1 (595x842:0:0) (move:0:0) 
[1] = NOTICE File contains jpeg pictures 
[2] = EXEC RETURN VALUE : 6


the process stops and the file Notre_participation.pdf.swf is not created.

I have an other file with a return value of 1, and many files where the process 
ends correctly, with file generation and a return 
code of 0.

Have an idea ?



Un max d’humour, un max de sensation, un max de tendresse ! C’est 
video.voila.fr  







Re: [Swftools-common] pdf2swf how to create one swf per page?

2009-09-12 Thread Chris Pugh
http://lists.gnu.org/archive/html/swftools-common/2008-10/msg00101.html

One example of many references.  Search that mailing list!

Regards,


Chris.

2009/9/11 Gilbert Mizrahi mizr...@aptima.com:
 I while ago I was using the command line version (on an old computer) and
 QPdf2Swf which has an option to separate pages.



 I downloaded pdf2swf (0.9.0.exe)  and I am clueless of how to separate the
 pages.

 I tried to download the 2009-08-24 swftools-2009-08-24-2042.rar version, but
 I got an error when unzipping.



 I found the QPdf2Swf and download it, but is looking for swftools and it
 does not like what it gets on the folder where I install the version
 0.9.0.exe.



 So, how can I convert pdfs to swf one swf per page?



 Thanks,



 Gilbert

 The information transmitted is intended only for the person or entity to
 which it is addressed and may contain confidential and/or privileged
 material. Any review, retransmission, dissemination or other use of, or
 taking of any action in reliance upon this information by persons or
 entities other than the intended recipient is prohibited. If you received
 this in error, please contact the sender and delete the material from any
 computer.





Re: [Swftools-common] pdf2swf conversion error using php

2009-09-12 Thread Ricardo Pedroso
On Sat, Sep 12, 2009 at 11:18 AM, franck ruzzin fruz...@voila.fr wrote:
 I have on a Linux server the file 'convert.php', containing :

 ?php
        $output=array();
        $command = ../pdf2swf -t -o Notre_participation.pdf.swf 
 Notre_participation.pdf;
        $return_var=0;
        $s=exec($command,$output,$return_var);

        array_push ($output, EXEC RETURN VALUE :  . $return_var);
        print_r($output);
 ?


 If I type via SSH the following code

 (uiserver):u44819199:~/swftest/script  bphp convert.php/b
 I have the following response


 Array
 (
    [0] = NOTICE  processing PDF page 1 (595x842:0:0) (move:0:0)
    [1] = NOTICE  File contains jpeg pictures
    [2] = NOTICE  processing PDF page 2 (595x842:0:0) (move:0:0)
    [3] = NOTICE  processing PDF page 3 (595x842:0:0) (move:0:0)
    [4] = NOTICE  processing PDF page 4 (595x842:0:0) (move:0:0)
    [5] = NOTICE  Writing SWF file Notre_participation.pdf.swf
    [6] = EXEC RETURN VALUE : 0
 )


 and the file 'Notre_participation.pdf.swf' is generated.

 But if open the same file via a navigator (ie http://mysite/convert.php),
 I have the following response


 [0] = NOTICE processing PDF page 1 (595x842:0:0) (move:0:0)
 [1] = NOTICE File contains jpeg pictures
 [2] = EXEC RETURN VALUE : 6


 the process stops and the file Notre_participation.pdf.swf is not created.


Could this be a timeout issue???
How long the file takes to be converted when you execute from shell?

If this is the problem you have two timeouts to take care of.
One from php (30 seconds by default), and the other from the webserver.

 I have an other file with a return value of 1

Is this one correctly converted when executed from shell?

Regards,
Ricardo