Solution 5: Convert swftools to PDF. Reference: SwF. Applications cannot create their own runtime instances. You can use the getruntime method of the runtime class to obtain the current runtime.
AD: the 2013 cloud computing architect summit is selling tickets at Ultra-low prices
The unzip 2swf tool in the swftools Toolkit can be used to convert PDF files into SWF files.
Use the following command to convert a PDF file to a single-page SWF File
Ipv2swf pdfpath-O swfpath-T 9-f.
Pdf2swf is the absolute path of the pdf2swf BINARY command, pdfpath is the absolute path of the PDF file to be converted, and swfpath is the path of the SWF file after conversion; -T 9 is used to set the conversion SWF version to 9. This setting is because some versions of SWF files cannot be normally displayed using flexpaper.-F inserts a frame into each page of the conversion document, improve the stability of the converted documents.
Each Java application has a runtime class instance, enabling the application to be connected to the running environment. Applications cannot create their own runtime instances. You can use the getruntime method of the runtime class to obtain the current runtime. After obtaining the runtime class instance, you can call the exec method of the class to create a new process to execute the specified string command. Therefore, the exec method can be used to call the aforementioned unzip 2swf command to Convert PDF files to SWF files.
The algorithm flow for converting a PDF file to swf format using swftools is shown in Figure 5-1:
Step 1: Create the escape 2swf conversion command string.
Step 2: Obtain the runtime of the current runtime. Call the set conversion command in step 1 to perform conversion.
Figure 5-1 use swftools to convert a PDF document to a SwF Process
Source code: docconverter
Link: http://www.cnblogs.com/luckyxiaoxuan/archive/2012/06/15/2550303.html