Document Reader development ideas

Source: Internet
Author: User

 

Core tips: automatic on-line conversion of files such as doc.pdf.xls to generate SWF file principle: Use PHP to call flashpaper to convert files such as Doc. pdf. xls. txt to implement online browsing and douding. Similar to online browsing by Google and other library systems, the file server is converted to local storage and does not need to be accessed through other networks.

Automatically convert files such as doc.w..xls to generate SWF files locally

Principle: Use PHP to call the flashpaper software to convert files such as Doc. pdf. xls. txt for online browsing.
Function and douding. Similar to online browsing by Google and other library systems, the file server is converted to local storage without conversion from other websites.

------------------- Flashpaper Software Description --------------------------------:
Macromedia flashpaper2.2 and contribute3.1 are both components in Studio 8. The function of flashpaper is

Files (Word, Excel, and PowerPoint) are converted into Flash files and PDF files. The conversion speed is very fast and the effect is very beautiful. Me

It took about one minute to convert a two hundred-page Word document.
You can also convert an image into a PDF or Flash video.
Flash and PDF are suitable for network communication of documents and can protect your copyright.
Installation instructions:
Run "initialization. Bat" in the initialization folder. If the prompt "Flash Player not found" is displayed, run it again.

“Getflash.exe ".
Instructions for use:
1. Right-click the file to be converted and choose convert to flash or PDF from the menu.
2. After opening the file with office software, select "file -- print -- printer name" Macromedia flashpaper -- OK -- and then select

Save as flash or PDF.

Flashpaper2.2 download address:/html/down/scgj_857_42.html

--------------------------- Modifying the files involved ---------------------------------
D: \ wwwroot \ disk \ modules \ recycle. Inc. php automatically clears the generated SWF file after deleting the recycle bin File
D: \ wwwroot \ disk \ modules \ public. Inc. php automatically clears the generated SWF file after deleting the public file.
D: \ wwwroot \ disk \ Templates \ Default \ pd_viewfile.tpl.html: automatically generate SWF files for the first browsing
D: \ wwwroot \ disk \ viewfile. php ??? It doesn't matter if you don't modify it. I just kept the file address hidden.

----------------------- Specific file modification section ----------------------------------

Recycle. Inc. php file

It seems to be four places (wrong expert points out! However, I implemented the function and passed the test)
Put the source file
If ($ Rs ['store _ old']) {
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ rs

['File _ store_path '].'/'. $ Rs ['file _ real_name']);
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ rs

['File _ store_path']. '/'. $ Rs ['file _ real_name '].' _ thumb ');
} Else {
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ rs

['File _ store_path']. '/'. $ Rs ['file _ real_name ']. $ file_ext );
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ rs

['File _ store_path']. '/'. $ Rs ['file _ real_name '].' _ thumb. '. $ Rs ['file _ extension']);

Change to (as if there are 4 places in total)

If ($ Rs ['store _ old']) {
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ rs

['File _ store_path '].'/'. $ Rs ['file _ real_name']);
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ rs

['File _ store_path']. '/'. $ Rs ['file _ real_name '].' _ thumb ');
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.'.swf ');
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.'.txt ');
} Else {
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ rs

['File _ store_path']. '/'. $ Rs ['file _ real_name ']. $ file_ext );
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ rs

['File _ store_path']. '/'. $ Rs ['file _ real_name '].' _ thumb. '. $ Rs ['file _ extension']);
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.}file_ext.'.swf ');
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.}file_ext.'.txt ');

Public. Inc. php file

Put the source file

If ($ Rs ['store _ old']) {
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

['File _ real_name ']);
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

['File _ real_name '].' _ thumb ');
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.'.swf ');
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.'.txt ');
} Else {
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

['File _ real_name ']. $ file_ext );
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

['File _ real_name '].' _ thumb '. $ file_ext );
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.}file_ext.'.swf ');
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.}file_ext.'.txt ');
}

Modify

If ($ Rs ['store _ old']) {
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

['File _ real_name ']);
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

['File _ real_name '].' _ thumb ');
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.'.swf ');
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.'.txt ');
} Else {
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

['File _ real_name ']. $ file_ext );
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

['File _ real_name '].' _ thumb '. $ file_ext );
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.}file_ext.'.swf ');
@ Unlink (phpdisk_root. $ settings ['file _ path']. '/'. $ Rs ['file _ store_path '].'/'. $ rs

Using 'file_real_name'{.}file_ext.'.txt ');
}

Pd_viewfile.tpl.html File

This file is greatly changed. I packed it for your reference. It is not recommended that you overwrite it directly because a lot of things have been removed from my page.

If you really don't understand it, add my QQ! 76891828

Something is missing ~!~
The following are some problems I encountered during debugging:

1. [php Command running error] Warning: System () [function. System]: Unable

Use System ("mkdir **") to create a directory. By default, IIS guest accounts cannot access cmd. Therefore, you cannot create a thread for Fork.
The solution is simple. Find C:/Windows/system32/CMD. EXE and right-click Properties. Select security, and then add the IIS Guest account,

Select read and run permissions. Then press OK.

2. Modify the following when the page is opened for the first time

Max_execution_time = 300, the second can be set to a greater value, here is 300 seconds, and then restart the service

3. If system is not available, execute exec and delete the following.
Disable_functions = proc_open, popen, exec, system, shell_exec, passthru

 

 

Http://flexpaper.devaldi.com/retrieval of Flash documents

 

Http://75zg.com/UploadFiles/2010-06/admin/75zgphp.rar

 

Read: http://dingchaoqun12.blog.163.com/blog/static/1160625042010214102023480/

 

Http://www.cnblogs.com/penbox/archive/2011/09/02/2163646.html

 

Swftools pagination: http://www.blogjava.net/jforeverg/archive/2011/07/06/353813.html

 

Swftools command: http://wiki.swftools.org/index.php/Pdf2swf

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.