Batch Processing

Overview
Print2Flash supports batch processing which lets you convert documents to
Flash programmatically without user assistance. You may even convert multiple
documents at once. This is useful for automating document conversion or
publishing tasks. Batch Processing is supported in
Pro mode of Print2Flash.
Server mode has even more powerful tools for automating document conversion
tasks: Enhanced Batch Processing and
Print2Flash OLE Automation API.
Command Line Syntax
Batch processing is activated when launching Print2Flash Print2Flash Server
application from operating system command line with certain parameters. The command line
syntax is as follows:
p2fserver.exe sourcefilename [outputfilename]
[options]
OR
p2fserver.exe sourcefiledir[\filemask] [outputdirname]
[options]
The first syntax option is used for conversion of a single file while the
second - for conversion of multiple files in a directory. You may need to
specify full path to the p2fserver.exe which is a Print2Flash
Server executable and is located in the same directory where Print2Flash
is installed, e.g. "C:\Program Files\Print2Flash".
This path is chosen at Print2Flash setup in Choose Destination Location screen.
There are following parameters:
- sourcefilename - the name of the document to convert. For
example, to convert a document named c:\MyDoc.doc use "c:\MyDoc.doc" as this
parameter value;
- outputfilename – specifies the output filename. If this parameter is
omitted, the file is named after the original document with .swf extension
appended to the original document name;
- sourcefiledir - the name of the directory where all the documents to
convert reside;
- filemask - the mask for the files to convert, e.g. "*.doc". If this
argument is not specified, all files are attempted to convert. For example, to convert all Microsoft Word (with .doc
extension) documents use "*.doc" value;
- outputdirname – specifies the output folder to which all converted
documents will be written. The files are named after the original
file names with .swf extension appended to the names. For example, if a file was named MyDoc.doc, the converted document will be named MyDoc.doc.swf.
In options parameter you can list one ore more options:
- /IncludeSubDirs:<Bool> - Boolean indicator specifying whether to
look for files to convert in all subdirectories of the sourcefiledir directory
in addition to the files located directly in sourcefiledir directory. This
option can only be used for directory conversion. Can be either "on" or "off".
By default it is "off";
- /CreateLogFile:<Bool> - similar to
CreateLogFile property of
BatchProcessingOptions object. Can be either "on" or "off". Default is "off";
- /LogFileName:<String> - similar to
LogFileName property of
BatchProcessingOptions object. If this option is specified, it implies that
CreateLogFile option is also specified. By default, the log is written to
p2fServer.exe.log file located in the same directory where Print2Flash is
installed;
- /PressPrintButton:<Bool> - similar to
PressPrintButton property of
BatchProcessingOptions object. Can be either "on" or "off". If omitted,
Print2Flash determines the best value for this setting automatically.
If any file name or path parameters contain spaces, they must be enclosed in
double quotes.
Using Batch Processing
To launch Print2Flash in batch mode, click Start button in Windows and select
Run. In the opened dialog window type the command line according to the
syntax and click OK.
Then Print2Flash is launched in the background (without user interface) and
starts converting specified documents. After a document is converted, the output
Print2Flash document file is created in the specified output folder. Note that
though Print2Flash is launched without user interface in batch processing mode,
the applications which send documents to Print2Flash may display user interface.
If you feel that there is a problem with document conversion, use
/LogFileName option to create a log file. It lists
all important events occurred at conversion including successful conversions and
errors and should help you in diagnosing the cause of the problem.
Examples
The following example converts a document named "C:\MyDocs\Report.xls" to
Flash document named "C:\MyDocs\Report.xls.swf":
p2fserver.exe C:\MyDocs\Report.xls
|
The next example converts all documents in a directory named "C:\MyDocs" to
Flash documents written into "C:\FlashDocs" directory. Files in
subdirectories of C:\MyDocs directory are not converted:
p2fserver.exe C:\MyDocs C:\FlashDocs
|
The following example differs from the previous in that the documents in
subdirectories of C:\MyDocs directory are converted as well:
p2fserver.exe C:\MyDocs C:\FlashDocs /IncludeSubDirs:on
|
The example below converts a document named "C:\MyDocs\Present.ppt" to the
Flash document named "C:\FlashDocs\Present.swf" and creates a log file written
to "C:\Print2FlashLogs\present.log":
p2fserver.exe C:\MyDocs\Present.ppt C:\FlashDocs\Present.swf /CreateLogFile:on /LogFileName:C:\Print2FlashLogs\present.log
|
|