1 Reply Latest reply on Mar 24, 2008 3:05 PM by Andrew_11

    FlashPaper & Command Line Conversion

      I need for work purposes to use FlashPaper for ppt pdf swf conversion, but I want to do such things from our J2EE FlashCom webapp (calling run.exec("C:\Program Files.....\flashpaper.exe... ")) as if we were running FlashPaper from command line. Is there a way to run it from the command line lets say :flashpaper -inputfile - outputfile. If yes does somebody know the synopsis for doing that?

      Thanks & Cheers,

        • 1. Re: FlashPaper & Command Line Conversion

          Originally posted by: JC!
          Yes. If you run the FlashPaper.exe file with the file to convert and specify the output file name with a -o flag, you can do it via the command line. What this does is launch Acrobat Reader, load the file, and print to SWF. It isn't elegant, but it works.
          • FlashPaper.exe MyFile.pdf -o MyFile.swf

            The problem with simply sticking this into a loop is that the command returns immediately, even though the conversion hasn't completed yet. Since Acrobat Reader is actually doing the conversion, you have to wait until the PDF file exists before you process the next file.

            Here is a Perl script a co-worker found that basically does this for a folder, recursively. Move the source and output files elsewhere and pop the whole thing into another loop and it should go indefinitely. It is pretty simple, and should be easy to convert into the scripting language of your choice.

            <legal mumbo-jumbo>
            This script is provided as-is, with no guarantee that it will be appropriate for your use.
            </legal mumbo-jumbo>