Author Topic: how to get pdf2megazine working  (Read 4744 times)

krmr

  • Newbie
  • *
  • Posts: 4
how to get pdf2megazine working
« on: April 01, 2009, 03:37:48 pm »
Hi, I just have downloaded Megazine3, looking for a pageflip component, and I am fascinated by the capabilities. But I encountered a problem to get the tool pdf2megazine working.
I have a 130 pages PDF, that I want to make into a standalone autorun CD, so making the pages one by one in pdf2swf will be a hell of manual labour.
So, I have installaed the swftools on C:\Program Files
I set the path in the pdf2megazine.bat file:
 SET PDF2SWF=C:\Program Files\SWFTools\pdf2swf.exe
then I tried doubleklicking the bat file: nothing...
tried call: mypath\to\pdf2megazine.bat
but it returns errors: Error: couldn't open file '" "files/page 1 to 16.swf (tested 16 pages)
What am I doing wrong?
Please help!

My other question is: how to make the exe/app out of the megazie book?
thanks a lot!
krmr
« Last Edit: April 01, 2009, 04:08:10 pm by krmr »

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1989
  • MegaZine3 Developer
    • MegaZine3
Re: how to get pdf2megazine working
« Reply #1 on: April 01, 2009, 04:09:52 pm »
Just an idea, but try
SET PDF2SWF="C:\Program Files\SWFTools\pdf2swf.exe" (note the "s)
instead. Not sure if the space is the problem or not, though.

To create a projector (.exe/.app) you'll need the Flash IDE. Open the megazine.fla,
set the stage dimensions, tell it to publish to .exe/.app and publish it. That's it.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

ramjet

  • Newbie
  • *
  • Posts: 23
Re: how to get pdf2megazine working
« Reply #2 on: July 02, 2009, 11:17:00 am »
krmr, if you are on Vista heres what you need to do...
First, Florian is right, any file paths with a space (eg: Program Files) in them need "quotes around the filepath".
so open your bat with a text editor and change
Code: [Select]
SET PDF2SWF=C:\SWFTools\pdf2swf.exe to...
Code: [Select]
SET PDF2SWF="C:\Program Files\SWFTools\pdf2swf.exe"(i know you've done this, but i'll outline all steps)  :)

Next, you can't just click on the .bat
You need to do the following:
Open cmd.exe as an administrator. It live 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
Quote
Administrator:cmd.exe
The prompt you see should say
Quote
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
Quote
cd C:\megazine
, hit enter.
The prompt should now be
Quote
C:\megazine>_
Now type for instance
Code: [Select]
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
Furthur command parameters are in the bat file.

Be careful with your / and \ characters.

Vista can be a pain  :) :)
« Last Edit: July 02, 2009, 11:23:41 am by ramjet »

MPete

  • Full Member
  • ***
  • Posts: 62
Re: how to get pdf2megazine working
« Reply #3 on: November 12, 2009, 04:57:48 pm »
I know this is a really old forum post but this is a workaround I have made with my pdf2swf. I don't like using the cmd at the best of times and needed somethign easier for my clients to use without anything too technical, I wonder if this could be incorporated into pdf2megazine:

Create a text file with the following contents, save it as run.bat in the same directory as pdf2swf.exe

Code: [Select]
@echo off
set /p output=Output filename (eg page1)

pdf2swf.exe -o %output%.swf %1 -w -i -s dots -s linktarget=_self
pause

Now all you need to do is drag and drop your pdf onto the run.bat. It will ask what you want to save the resulting files as and it's done.

%1 is automatically replaced with the file path you drag onto the bat
linktarget, dots, etc are parameters I use that are optional