On Thu, Nov 22, 2007 at 06:15:26PM +0000, Colin Dodd wrote:
> I'm trying to get the pdf2swf conversion working from within a perl 
> script. Basically the user will upload a pdf and the server converts 
> this to swf so it can be neatly embedded in a webpage.
> 
> If I enter the command at the shell it works fine, however if I pass the 
> command to Unix via a perl script (using system,exec,qx or backticks) 
> the conversion process goes fine but the inclusion of a viewer and/or 
> preloader does not go well. As I say it works fine except when called 
> from a perl script, here's the output I get from calling via perl:
> [...]

Not sure why Perl breaks this.
Try maybe running the commands manually:
    
    system("pdf2swf file.pdf -o file.swf");
    $sizes = `swfdump -XY file.swf`;
    chomp $sizes;
    $p = "/usr/local/share/swftools/swfs/PreLoaderTemplate.swf";
    $l = "/usr/local/share/swftools/swfs/default_loader.swf";
    $v = "/usr/local/share/swftools/swfs/default_viewer.swf";
    system("swfcombine $v viewport=file.swf -o file.swf");
    system("swfcombine $sizes -r 20 $p loader=$l movie=file.swf -o file.swf");

Greetings

Matthias




Reply via email to