Using pdf2megazine.bat
From MegaZine3
- See also: PDF2SWF
This tutorial shows how to use pdf2megazine.bat on windows (sourced from forum).
You must already have installed swftools
Contents |
[edit] Example
[edit] Setting the filepath:
Open your pdf2megazine.bat (found in megazine\source\tools) with a text editor and change
SET PDF2SWF=C:\SWFTools\pdf2swf.exe
to...(path/to/your/swftools/)
SET PDF2SWF="C:\Program Files\SWFTools\pdf2swf.exe"
Either use with or without quotes (this apparently differs in some cases, I used without(XP))
[edit] Run the batch file
Next, you can't just click on the .bat, you need to do the following:
Open cmd.exe as an administrator. (It lives in C:\Windows\System 32\cmd.exe)
You may need to right click it and "run as an administrator".
If all is good you should see at the top of it
Administrator:cmd.exe or c:\windows\system32\cmd.exe
The prompt you see should say
C:\Windows\System 32>_I'd now make a directory in C: (eg: C:\megazine) and put a subdirectory in megazine (eg: C:\megazine\src).
Put your bat and your pdf into
C:\megazine
C:\megazine\src is where your swfs will be written to.
You now need to change Directory in cmd.exe to where your pdf2megazine.bat is. This is because in Vista the working directory is where cmd.exe is running from, NOT where the bat is
Type in:
cd C:\megazinehit enter.
The prompt should now be:
C:\megazine>_
Now type for instance:
pdf2megazine.bat theNameofYourPdf.pdf "src/page" 12 600 900
hit enter.
This gives you 12 swfs called page1.swf,page2.swf etc(one for each pdf page) written to C:\megazine\src and a megazine.xml file written to C:\megazine that tells all swfs to display at 600px wide and 900 high and sets the swfs paths to "src/page1.swf" etc Further command parameters are in the bat file.
Be careful with your / and \ characters.
[edit] See also
For more information about pdf2swf and other variations to this tutorial, see PDF2SWF.
