Solution 5: Converting swftools to PDF to SwF

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.