swftools-common
[Top][All Lists]

## Re: [Swftools-common] Couple of Questions and request for plain swf file

 From: Matthias Kramm Subject: Re: [Swftools-common] Couple of Questions and request for plain swf files Date: Fri, 10 Oct 2008 19:54:25 +0200 User-agent: Mutt/1.5.13 (2006-08-11)

On Fri, Oct 10, 2008 at 09:04:15PM +0800, Greg & Michelle <address@hidden>
wrote:
>
> 1.  I note there is a GUI for the pdf2swf called qpdf2swf but it looks
> like it has not been updated since 1996 and I could not get it to work
> on a Vista PC, so is there anything else available via a GUI interface?

Of course. Install the .exe version of a recent snapshot, and you'll
have a GUI-version of pdf2swf on the desktop and in the start menu.

It's called pdf2swf_gui, and it's based on wx windows and fairly recent.

> 2.  If for 1 there is no gui is there a command to get it to process a
> batch of pdf files in a directory please

Hm, you can't do that right now with either the GUI or the command-line
executable (and least not without some batch scripting), but it's very
easy with the gfx module.
Then, put xpython.exe and the following script into a directory of your
choice:

-------------------------------------------------
#!/usr/bin/python
import gfx
import os

directory = "c:\\path\\to\\pdfs\\"

for file in os.listdir(directory):
if file.endswith("pdf"):
file = os.path.join(directory, file)
doc = gfx.open("pdf", file)
swf = gfx.SWF()
for pagenr in range(1,doc.pages+1):
page = doc.getPage(pagenr)
swf.startpage(page.width, page.height)
page.render(swf)
swf.endpage()
swf.save(os.path.splitext(filename)[0]+".swf")
-------------------------------------------------

Run this with
xpython.exe convert.py

> 3.  I have tried to create my own viewer in Flash but my Flash skills
> are well - hopeless :).  Does anyone have a plain, no buttons just
> simple swf file I can use please.

If you don't want buttons, you might try keyboard_viewer.swf.

Greetings

Matthias