关于verydoc doc2any工具的参数

官方的readme.txt文件说明

C:\>doc2any.exe
Convert *.DOC, *.DOCX, *.RTF, *.TXT, *.PPT, *.PPTX, *.XLS, *.XLSX files to PDF,
PS, EPS, SVG, SWF, XPS, HPGL, PCL, TIF, PNG, JPG, BMP, GIF, TGA, PCX, EMF, WMF,
etc. formats
Usage: DOC2Any [options] <in-file> [<out-file>]
  -useoffice <int>         : Use MS Office to render DOC,DOCX,RTF,TXT,PPT,PPTX,PPTS,PPTSX,XLS,XLSX formats
    -useoffice 0: Don’t use MS Office to convert DOC,DOCX,RTF,TXT,PPT,PPTX,XLS,XLSX formats
    -useoffice 1: Use MS Office to convert DOC,DOCX,RTF,TXT,PPT,PPTX,XLS,XLSX formats
  -useprinter              : Convert DOC files to other formats via virtual printer
  -multipagetif            : Create multipage TIFF format
  -showofficeui            : Show Office Windows during conversion
  -resetofficeview         : Reset Office View type to wdPrintView
  -password <string>       : Set open password for office documents
  -checkpwd                : Check if MS Word document contains an open password
  -noretry                 : Don’t try to re-convert failed office documents
  -delay <int>             : Delay some milliseconds before conversion
  -width <int>             : Set page width to PDF file
  -height <int>            : Set page height to PDF file
  -emfheight <int>         : Split a long HTML file by height
  -pageheight <int>        : Split a long HTML page by page height, same as -emfheight
  -pageh <int>             : same as -pageheight
  -ph <int>                : same as -pageheight
  -xres <int>              : Set X resolution to image file
  -yres <int>              : Set Y resolution to image file
  -bitcount <int>          : Set color depth for image conversion
  -compression <int>       : Set compression for TIFF image
    -compression 1     : NONE compression
    -compression 2     : CCITT modified Huffman RLE
    -compression 3     : CCITT Group 3 fax encoding (1d)
    -compression 4     : CCITT Group 4 fax encoding
    -compression 5     : LZW compression
    -compression 6     : OJPEG compression
    -compression 7     : JPEG DCT compression
    -compression 32773 : PACKBITS compression
    -compression 32809 : THUNDERSCAN compression
    -compression 88880 : 204×98  G4 ClassF TIFF
    -compression 88881 : 204×196 G4 ClassF TIFF
    -compression 88882 : 204×98  G3 ClassF TIFF
    -compression 88883 : 204×196 G3 ClassF TIFF
    -compression 88884 : CCITT Group 3 fax encoding (2d)
  -rotate <int>            : Rotate pages, 90, 180, 270
  -margin <string>         : Set page margin to PDF file
    -margin 10         : Set margin to 10pt to left
    -margin 10×10      : Set margin to 10pt to left,top
    -margin 10x10x10   : Set margin to 10pt to left,top,right
    -margin 10x10x10x10: Set margin to 10pt to left,top,right,bottom
  -pagelayout <int>        : Set page layout that is used when opening the document in adobe Reader
   -pagelayout 0: Use viewer’s default settings
   -pagelayout 1: SinglePage
   -pagelayout 2: OneColumn
   -pagelayout 3: TwoColumnLeft
   -pagelayout 4: TwoColumnRight
   -pagelayout 5: TwoPageLeft
   -pagelayout 6: TwoPageRight
  -viewpagemode <int>      : Set page mode that is used when opening the document in adobe Reader
    -viewpagemode 0: No page mode is applied, default option
    -viewpagemode 1: Show outline tree
    -viewpagemode 2: Show thumbnails
    -viewpagemode 3: Open the document in full-screen mode
    -viewpagemode 4: UseOC
    -viewpagemode 5: UseAttachments
  -vieweropt <int>         : Set viewer preferences to Adobe Reader
    -vieweropt  1: HideToolBar
    -vieweropt  2: HideMenuBar
    -vieweropt  4: HideWindowUI
    -vieweropt  8: FitWindow
    -vieweropt 16: CenterWindow
    -vieweropt 32: DisplayDocTitle
    -vieweropt 64: Non-FullScreenPageMode, use -viewerval to set more options
  -viewerval <int>         : Additional values used by -vieweropt 64
    -vieweropt 64 -viewerval 1   : UseNone
    -vieweropt 64 -viewerval 2   : UseOutlines
    -vieweropt 64 -viewerval 4   : UseThumbs
    -vieweropt 64 -viewerval 1024: UseOC
  -viewerzoom <string>     : Set viewer zoom ratio to Adobe Reader
    -viewerzoom FitBH: Display pages to fit the width of its bounding box
    -viewerzoom FitH : Display pages to fit the width of page
    -viewerzoom Fit  : Display pages to fit window
    -viewerzoom FitV : Display pages to fit height of page
    -viewerzoom FitB : Display pages to fit its bounding box entirely
    -viewerzoom FitBV: Display pages to fit height of its bounding box
    -viewerzoom 25   : Display pages with magnification at 25%%
    -viewerzoom 50   : Display pages with magnification at 50%%
    -viewerzoom 1600 : Display pages with magnification at 1600%%
  -viewpage <string>       : set start page when opening it in Adobe Reader
  -view                    : View PDF file after creation
  -append <int>            : Append document to an existing PDF file
    -append 0: Overwrite if PDF file exists
    -append 1: Insert before first page if PDF file exists
    -append 2: Append to last page if PDF file exists
    -append 3: Rename filename if PDF file exists
  -producer <string>       : Set ‘producer’ to PDF file
  -creator <string>        : Set ‘creator’ to PDF file
  -subject <string>        : Set ‘subject’ to PDF file
  -title <string>          : Set ‘title’ to PDF file
  -author <string>         : Set ‘author’ to PDF file
  -keywords <string>       : Set ‘keywords’ to PDF file
  -openpwd <string>        : Set ‘open password’ to PDF file
  -ownerpwd <string>       : Set ‘owner password’ to PDF file
  -keylen <int>            : Key length (40 or 128 bit)
    -keylen 0:  40 bit RC4 encryption (Acrobat 3 or higher)
    -keylen 1: 128 bit RC4 encryption (Acrobat 5 or higher)
    -keylen 2: 128 bit RC4 encryption (Acrobat 6 or higher)
  -encryption <int>        : Restrictions
    -encryption    0: Encrypt the file only
    -encryption 3900: Deny anything
    -encryption    4: Deny printing
    -encryption    8: Deny modification of contents
    -encryption   16: Deny copying of contents
    -encryption   32: No commenting
    ===128 bit encryption only -> ignored if 40 bit encryption is used
    -encryption  256: Deny FillInFormFields
    -encryption  512: Deny ExtractObj
    -encryption 1024: Deny Assemble
    -encryption 2048: Disable high res. printing
    -encryption 4096: Do not encrypt metadata
  -unicode                 : Enable Unicode conversion
  -noempty                 : Delete empty pages from PDF file
  -killoffice <int>        : Kill or not kill MS Office instances before conversion
  -installprinter          : Install virtual printer only
  -printername <string>    : Alternate name for virtual printer on FILE: port
  -printername2 <string>   : Alternate name for virtual printer on LPT1: port
  -wtext <string>          : Watermark text on printed document
    -wtext does support following dynamic values:
    %PageCount%, %PageNumber%, %PageCountRoman%, %PageCountRoman2%,
    %PageNumberRoman%, %PageNumberRoman2%, %Author%, %Keywords%,
    %Subject%, %Title%, %Filename%, %Date%, %Time%
  -wtype <int>             : type of watermark
    0 : normal watermark
    1 : watermark on header
    2 : watermark on footer
  -wf <string>             : font name of watermark
  -wh <int>                : font size of watermark
  -wb                      : specify bold font
  -wi                      : specify an italic font
  -wu                      : specify an underlined font
  -ws                      : specify a strikeout font
  -wa <int>                : angle of watermark
  -wbox <string>           : a rectangle to output formatted text, it is only useful for "-walign" option, eg:
    -wbox "0,0,595,842"
    -wbox "0,0,612,792"
    -wbox "auto"
  -walign <int>            : set text align
    1 : left
    2 : center
    3 : right
  -wc <string>             : color of watermark,
    FF0000: Red color
    00FF00: Green color
    0000FF: Blue color
    HexNum: Other colors
  -wx <int>                : X offset of watermark
  -wy <int>                : Y offset of watermark
  -wpagebegin <int>        : first page to add the watermark
  -wpageend <int>          : last page to add the watermark
  -wpageoffset <int>       : a value to be added to page number
  -watermarkfile <string>  : a .ini file which contain information for multiple watermarks
  -svgnoclip               : remove clipping during SVG output
  -log <string>            : output log into a file
  -debug                   : Print log message on screen
  -runasuser <string>      : Run current EXE application from a user account
  -runaspwd <string>       : Password of specified user account
  -v                       : Print copyright and version info
  -h                       : Print usage information
  -help                    : Print usage information
  –help                   : Print usage information
  -?                       : Print usage information
  -$ <string>              : Input registration key
Example:

   doc2any.exe C:\in.doc C:\out.pdf
   doc2any.exe C:\in.ppt C:\out.pdf
   doc2any.exe C:\in.xls C:\out.pdf
   doc2any.exe C:\in.docx C:\out.pdf
   doc2any.exe C:\in.pptx C:\out.pdf
   doc2any.exe C:\in.xlsx C:\out.pdf
   doc2any.exe C:\*.doc C:\*.pdf
   doc2any.exe -margin 100x100x100x100 C:\in.rtf C:\out.pdf
   doc2any.exe -append 2 -width 612 -height 792 C:\*.doc C:\out.pdf
   doc2any.exe -append 2 C:\*.doc C:\out.pdf
   doc2any.exe -width 612 -height 792 C:\in.doc C:\out.pdf
   doc2any.exe -append 1 C:\in.doc C:\out.pdf
   doc2any.exe -append 2 C:\in.doc C:\out.pdf
   doc2any.exe -subject "subject" C:\in.doc C:\out.pdf
   doc2any.exe -ownerpwd 123 -keylen 2 -encryption 3900 C:\in.doc C:\out.pdf
   doc2any.exe "C:\in.doc" C:\out.gif
   doc2any.exe "C:\in.doc" C:\out.png
   doc2any.exe -useprinter -xres 300 -yres 300 -bitcount 1 -compression 4 "C:\in.doc" "C:\out.tif"
   doc2any.exe -useoffice 1 -useprinter -showofficeui "C:\in.doc" "C:\out.pdf"
   doc2any.exe -useprinter -useoffice 1 -showofficeui -delay 10000 -resetofficeview -debug "C:\in.doc" "C:\out.pdf"
   doc2any.exe -useoffice 1 -useprinter -delay 5000 "C:\in.doc" "C:\out.pdf"
   doc2any.exe -killoffice 0 -useprinter "C:\in.doc" C:\out.pdf
   doc2any.exe -multipagetif -killoffice 0 -useprinter "C:\in.doc" C:\out.tif
   doc2any.exe -multipagetif -bitcount 1 -xres 300 -yres 300 -killoffice 0 -useprinter "C:\in.doc" C:\out.tif
   doc2any.exe -useprinter -compression 88880 "C:\in.doc" C:\out.tif
   doc2any.exe -useprinter -compression 88881 "C:\in.doc" C:\out.tif
   doc2any.exe -useprinter -compression 88883 "C:\in.doc" C:\out.tif
   doc2any.exe -multipagetif -useprinter -compression 88880 "C:\in.doc" C:\out.tif
   for %F in (D:\test\*.doc) do "doc2any.exe" "%F" "%~dpnF.pdf"
   for /r D:\test %F in (*.doc) do "doc2any.exe" "%F" "%~dpnF.pdf"
   doc2any.exe -useprinter -useoffice 1 -noretry -password 123456 D:\test.docx D:\out.pdf
   doc2any.exe -viewerzoom 1600 -viewpage 10 -viewpagemode 2 -view "C:\in.doc" C:\out.pdf
   doc2any.exe -useprinter "C:\example.odt" "C:\openofficedoc.pdf"
   doc2any.exe "C:\example.odt" "C:\openofficedoc.pdf"
   doc2any.exe -installprinter -printername myprinter1 -printername2 myprinter2

Add watermarks into PDF files:

  

doc2any.exe -wtext "VeryPDF" "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "VeryPDF" -wc "0000FF" "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "VeryPDF" -wx 100 -wy 100 "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "VeryPDF" -wtype 1 "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "VeryPDF" -wtype 2 "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "VeryPDF" -wtype 0 -wa 45 "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "VeryPDF" -wf "Arial" "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "VeryPDF" -wf "Arial" -wh 20 "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "VeryPDF" -wf "Arial" -wh 20 -wb -wi -wu -ws "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "VeryPDF" -wf "Arial" -walign 3 -wh 20 -wbox "0,770,612,792" "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "Watermark %PageNumber% of %PageCount%" "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "Watermark %PageNumber% of %PageCount%" -wpagebegin 10 -wpageend 20 -wpageoffset 100 "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "Watermark %PageNumberRoman% of %PageCountRoman%" "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "Watermark %PageNumberRoman2% of %PageCountRoman2%" "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "Watermark %PageNumber% of %PageCount%" -walign 3 -wtype 1 "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "Watermark %PageNumber% of %PageCount%" -walign 2 -wtype 2 "C:\in.doc" C:\out.pdf
   doc2any.exe -wtext "%Filename% %Date% %Time% %PageNumber% of %PageCount%" "C:\in.doc" C:\out.pdf

下面是为原文件每个页面生成一个SWF文件。

You can add "%" to output filename, then you can create a SWF file for each page, for example,

doc2any.exe "C:\test.doc" "C:\out%.swf"
doc2any.exe "C:\test.ppt" "C:\slide%.swf"

Sothink SWF Decompiler 5.0 Build 503 Full

Sothink SWF Decompiler is a professional tool to convert SWF to FLA and extract elements from SWF into variable formats. Compatible with all Flash versions including Flash 6, Flash 7, Flash 8 and Flash CS3 (9.0). Supports both ActionScript 2.0 and 3.0. After the converting, you can get the completed FLA file including linkages, components, *.as, etc. With SWF Decompiler, you can extract any element of the Flash movie such as shapes, morph shapes, images, sounds, videos, frames, fonts, texts, buttons, sprites and ActionScripts. E.g. you can extract ActionScript as *.as or *.bin file, get sounds as mp3 or wav, images as jpeg, bmp or png, videos as flv, shapes as gls, etc. Both standard SWF and EXE (Flash project) files are supported.

Sothink SWF Decompiler provides a user-friendly interface (Office 2007 Style). A built-in player enables you to preview the movie and every element before exporting. A thumbnail view enables you to pick element easily. And the interface layout can be customized to meet your needs. To make SWF Decompiler more appealing, SWF Catcher is offered. It is a free tool that can capture Flash movies online from Internet Explorer or Firefox.

Main Features
* Supports Flash 9 and ActionScript 3.0 completely.
* Converts SWF to FLA stably.
* Full supports Flash 6, Flash 7, Flash 8 and Flash CS3 (9.0).
* Compatible with both ActionScript 2 and ActionScript 3.
* Supports exporting FLA file with ActionScript 3.
* Supports exporting ActionScript in .as format.
* Supports Flash components.
* Decompiles the ActionScript code and generates neat and readable code.
* Shows the script code neatly within the program and exports the ActionScript while converting the swf to FLA.
* Can extract the shapes, sounds, images, sprites, fonts, texts and ActionScript from a Flash movie.
* Can extract the video file from a Flash movie and export it in *.flv format.
* Support scanning the cache of IE and listing all Flash files you have viewed.
* Enable to browse and preview any resource before exporting.
* Show detail properties of elements in Flash movies.
* Can be invoked from Windows Explorer.
* User-friendly Explorer-like interface.
* Supplies SWF Catcher for Firefox and SWF Catcher for IE.

点击下载此文件

多SWF程序类静态空间共享

 采用flexBuilder 3.0开发测试,目的是了解加载后的程序之间的类实例空间共享。

一个主程序为MainApp.swf,一个子程序 sub.swf。

主程序执行初始后,自动加载子程序。

任务:

1)由主程序执行创建并调用子程序的HelloWorld类方法sayHello,带入姓名,返回“Hello ”+姓名。

2)由主程序执行创建并调用子程序的CustomComponent类,该类从Canvas继承,加载到主程序中的TabNavigator控件中。

3)由主程序给单一模式对象CommonInformation动态创建属性为“mainName”,子程序CustomComponent类中有Button按钮来激活事件,显示单一模式对象CommonInformation属性“mainName”的值。

测试结果:

1、在主程序Loader加载时,要将URLRequest对象的content属性置空,再进行加载Sub.swf文件,不然采用loader.contentLoaderInfo.ApplicationDomain.getDefinition无法获取相应的类类型。

CommonInformation.Instance["mainName"] = this.name;
lc.applicationDomain = appDomain;
u.contentType = ""; // <– 注意

2、测试出,子程序和主程序中有相同命名空间的类,其静态空间是共享的,由此我们可以直接采用单一模式来传递两个在同一根ApplicationDomain中SWF程序的接口、变量、和类及对象。

  源码:shareTest.zip

查看实例