[Top][All Lists]

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

Re: [Swftools-common] Getting pdf2swf working in a perl script

From: Colin Dodd
Subject: Re: [Swftools-common] Getting pdf2swf working in a perl script
Date: Fri, 23 Nov 2007 12:00:57 +0000
User-agent: Thunderbird (Windows/20071031)

Matthias Kramm wrote:
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");


That worked a treat! Thank you very much was tearing my hair out yesterday trying to figure this out!

All the best,

reply via email to

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