swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Ricardo Pedroso
Subject: Re: [Swftools-common] pdf2swf conversion error using php
Date: Wed, 16 Sep 2009 14:38:31 +0100

On Sun, Sep 13, 2009 at 8:20 AM, franck ruzzin <address@hidden> wrote:
> Hi Ricardo,
>
> Following the results for 2 problematic files, one with a return code of 1 
> and the other with a return code of 6, when executing the php script via http.
>
> You'll notice that the execution from shell always ends with the generation 
> of the swf file, the return code is 0.
> You'll notice that the http execution results in an error code (<>0) and no 
> file generation.
>
> In the begining, I thought of a error inside the pdf files (the two files 
> come from windows, one is written and converted to pdf with openoffice, the 
> other is written with word and converted with PDFcreator). But in this case, 
> why does the shell conversion succeed ?
>
> If it can help, I can send you the pdf files.
>
> Regards,
> Franck
>
>
>
> The results.
>
>
>
> *****************************************************************
> File "Notre_participation.pdf" (size = 746532 bytes)
>
>
> ----------------------
> EXECUTION FROM SHELL :
> ----------------------
>
> X-Powered-By: PHP/4.4.9
> Content-type: text/html
>
> millisec: 0.93638400 1252824381
> 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
> )
>
>
> millisec: 0.82071800 1252824383
> execution time : 1.8843340873718 seconds
>
> The file "Notre_participation.pdf.swf" is created
>
> ---------------------
> EXECUTION FROM HTTP :
> ---------------------
>
> millisec: 0.18996000 1252824477
> Array (
>    [0] => NOTICE processing PDF page 1 (595x842:0:0) (move:0:0)
>    [1] => NOTICE File contains jpeg pictures
>    [2] => EXEC RETURN VALUE : 6
> )
> millisec: 0.85771300 1252824477
> execution time : 0.66775298118591 seconds
>
> The file "Notre_participation.pdf.swf" is not created
>
>
> *****************************************************************
> *****************************************************************
>
>
> File "JT-2008-jan_fev_mar.pdf" (size = 3974136 bytes)
>
> ----------------------
> EXECUTION FROM SHELL :
> ----------------------
>
> X-Powered-By: PHP/4.4.9
> Content-type: text/html
>
> millisec: 0.00954700 1252824400
> Array (
>    [0] => NOTICE  processing PDF page 1 (612x792:0:0) (move:0:0)
>    [1] => NOTICE  File contains jpeg pictures
>    [2] => NOTICE  processing PDF page 2 (612x792:0:0) (move:0:0)
>    [3] => NOTICE  processing PDF page 3 (612x792:0:0) (move:0:0)
>    [4] => NOTICE  processing PDF page 4 (612x792:0:0) (move:0:0)
>    [5] => NOTICE  processing PDF page 5 (612x792:0:0) (move:0:0)
>    [6] => NOTICE  processing PDF page 6 (612x792:0:0) (move:0:0)
>    [7] => NOTICE  processing PDF page 7 (612x792:0:0) (move:0:0)
>    [8] => NOTICE  processing PDF page 8 (612x792:0:0) (move:0:0)
>    [9] => NOTICE  processing PDF page 9 (612x792:0:0) (move:0:0)
>    [10] => NOTICE  processing PDF page 10 (612x792:0:0) (move:0:0)
>    [11] => NOTICE  Writing SWF file JT-2008-jan_fev_mar.pdf.swf
>    [12] => EXEC RETURN VALUE : 0
> )
>
>
> millisec: 0.51346000 1252824426
> execution time : 26.50391292572 seconds
>
> The file "JT-2008-jan_fev_mar.pdf.swf" is created
>
> ---------------------
> EXECUTION FROM HTTP :
> ---------------------
>
> millisec: 0.02592200 1252825019
> Array (
>    [0] => NOTICE processing PDF page 1 (612x792:0:0) (move:0:0)
>    [1] => NOTICE File contains jpeg pictures
>    [2] => NOTICE processing PDF page 2 (612x792:0:0) (move:0:0)
>    [3] => NOTICE processing PDF page 3 (612x792:0:0) (move:0:0)
>    [4] => NOTICE processing PDF page 4 (612x792:0:0) (move:0:0)
>    [5] => NOTICE processing PDF page 5 (612x792:0:0) (move:0:0)
>    [6] => EXEC RETURN VALUE : 1
> )
> millisec: 0.95641000 1252825025
> execution time : 6.93048787117 seconds
>
> The file "JT-2008-jan_fev_mar.pdf.swf is not created"
>

So, doesn't seems to be a timeout problem.
It's is not easy to know what really is happening, at least for me.
You may check your server logs, maybe they can give some hints.

Depending you apache/php configuration (mod_php, fastcgi, suphp, ...)
the process will run
in a different environment/user.
You can try to run pdf2swf with that user from shell.

pdf2swf needs to write some tempfiles, could be some
restriction/privileges to write tempfiles?
But if you successfully convert some pdf's I suppose the problem is not here.

I really don't know...

You can send me the files, I can try exec them on lighttpd (I don't
have apache installed) on my laptop

Please, do a "Reply all" to keep the discussion in the mailing.
Someone can jump into, and give you the answer.
But If you want to send me the files then send them directly to me.

Ricardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]