How to parse SWF back to PDF using a FlexPaper script

8k views Asked by At

I have a site which shows PDF files in SWF. It users FlexPaper script. How can I get URLs of orignal PDF files?

Or maybe parse PDF out of SWF. The script is definitely a JavaScript for FlexPaper.

6

There are 6 answers

1
Joeytje50 On

I've done a lot searching on Google about how this would be possible, and I've eventually come to one conclusion: Flash files are compiled, and they would need to be decompiled first before they can be converted to anything. It is impossible to convert flash files to pdf, or atleast not by using free software only (I didn't buy/torrent any software to try this).

I'd be very interested in hearing otherwise, but considering the amount of time I spent / wasted trying to find this out, I am quite sure it is impossible to convert SWF to PDF.

1
ATNPGO On

In theory this is not possible. If the commercial version is used and setup to use HTML5 rendering mode (the one that uses PDF, not flash), it may be possible to get access to the original file by sniffing traffic and watching where the PDF came from.

1
toto On

You can open them with the stand-alone Flash player and then print them. If you have Acrobat Pro, you have the PDF print that outputs a PDF file, voilĂ .

0
forzayalta On

FlexPaper library is rendering PDF or images files "on the fly". Most of time, you have no direct access to the files as PDF files can be stored out of the website documentRoot: a PHP script (called "service.php" in FlexPaper library) is retrieving each file and rendering data in the requested format (PDF, JPG, SWF or PNG document).

0
jinowolski On

I've successfully extracted presentations out of FlexPaper SWF files with embedded data.

  1. Open the SWF file with https://www.free-decompiler.com/flash/.
  2. Find binaryData node with the actual SWF content.
  3. Save it as raw data.
  4. Rename the exported file to something.swf.
  5. Process it like a normal SWF file, e.g. use swfrender.

There is also an option to export SWF frames directly from ffdec, but I had rendering issues - some data was not visible in the exported PDF file.

0
jcp0908 On

There are several ways to get the contents of the document:

  1. Install a PDF virtual printer
  2. Right click on the player => Press print => use the virtual printer The result will be an image PDF file of the document

Or:

  1. Right click on the page => View page source (Firefox)
  2. The plain text of the document is here
  3. ...

Or:

  1. Install Adblock Plus
  2. View the blockable item
  3. Get the document SWF file here
  4. Download it

I have still not found a way to get the original source of the document.