On 19 August 2010 02:52, Pree Kolari <p...@memetales.com> wrote:
> Thanks appreciate your response.

See bottom post for response..

> On Wed, Aug 18, 2010 at 12:25 AM, Chris Pugh <nisse...@googlemail.com>
> wrote:
>>
>> On 18 August 2010 00:48, Pree Kolari <p...@memetales.com> wrote:
>> > Any body has experience running pdf2swf on a hosted server like
>> > slicehost?
>> > Scribd does it and I am looking to do part of what scribd does (just the
>> > part that converts pdf to swf).
>> >
>> > I am hoping it can be used to generate swf files via a web interface.
>> > Any
>> > pointers to how someone else has done it would be really helpful.
>> > Thanks in advance.
>> >
>> > -pree
>>
>> If the enviroment that you are installing swftools into meets all the
>> necessary
>> prerequsites ( and since Slicehost is a VPS provider with root access,
>> they
>> should either already be there in the distribtuion you choose,  or if
>> missing
>> you could install tem ) , then there should be very little difference to
>> running
>> any of the tools locally.
>>
>> If you are looking to trigger conversions 'on-the-fly', then you obviosuly
>> have
>> a bit of scripting to do in whatever is your favourite choice, of
>> poison, i.e. Perl,
>> Python, PHP,
>>
>>   http://www.php.net/manual/en/book.exec.php
>>

Welcome.

Here's a very rough and ready.example to try locally.  Obviously you'd
need better
process control,  so the user either knows what's happening, and/or has somethng
to entertain them while the conversion takes place! ;o)

<?php
passthru (' your path to ]/pdf2swf input_pdf.pdf -o ['your path to
public url]/output_swf.swf');
passthru ('/usr/local/bin/swfdump -E output_swf.swf > output.html');
header("Location: output.html");
?>

NB  Watch your permissions if you try this remotely.  Doing this kind
of thing web side
could have a few nasty consequences if they are unrestricted!

I've replied On-List, since I presume your email to me was meant to go
there! ;o)

Regards,


Chris.

Reply via email to