Enhanced Batch Processing

Overview
Enhanced Batch Processing is similar to Batch processing feature of
Print2Flash and lets you convert documents to Flash programmatically without
user assistance but it provides much wider set of capabilities and options. Enhanced Batch Processing
is available only in Server mode. Another option for automatic document
conversion in Server mode is
Print2Flash OLE Automation API.
Command Line Syntax
Batch processing is activated when launching 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. There are three group
of options corresponding to Profile,
BatchProcessingOptions and
PrintingPreferences objects in
Print2Flash OLE Automation API. Below is given
only basic information regarding these options so refer to respective help
topics on these objects to learn more.
Document Options
Default settings for these options are specified in
Default Document Options
window.
Batch Processing Options
- /BeforePrintingTimeout:<Int> - similar to
BeforePrintingTimeout property
of BatchProcessingOptions object. Default is 30 seconds;
- /PrintingTimeout:<Int> - similar to
PrintingTimeout
property of BatchProcessingOptions object. Default is infinite time;
- /AfterPrintingTimeout:<Int> - similar to
AfterPrintingTimeout property of
BatchProcessingOptions object.
Default is 10 seconds;
- /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;
- /KillProcessIfTimeout:<Bool> - similar to
KillProcessIfTimeout
property of BatchProcessingOptions object. Can be either "on" or "off". If
omitted, Print2Flash determines the best value for this setting automatically;
- /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;
- /LoggingLevel - similar to
LoggingLevel property of
BatchProcessingOptions object.
Default value is 0;
- /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";
- /PageRange:<String> - similar to
PageRange property of
BatchProcessingOptions object.
Default is empty string which means all document pages are converted.
Printing Preferences
Default settings for these options are specified in
Default Printing
Preferences window.
Using Batch Processing
Using of Enhanced Batch Processing is similar to using
Batch Processing except that more powerful command line options are supported. See
Batch Processing
topic to learn more.
Examples
All Batch Processing examples are applied to Enhanced Batch Processing as
well so refer to them for basic usage examples.
The following example converts a document named "C:\MyDocs\Report.xls" to
Flash document named "C:\MyDocs\Report.xls.swf" and enables only Drag, Select
Text, Previous Page and Next Page buttons in the resulting Flash document:
p2fserver.exe C:\MyDocs\Report.xls /InterfaceOptions:646
|
The InterfaceOptions argument is obtained by addition of the respective
constants from INTERFACE_OPTION enumeration: 2+4+128+512=646The next example converts
all documents in a directory named "C:\MyDocs" to
Flash documents written into "C:\FlashDocs" directory and disables
printing and copying text from the resulting Flash documents:
p2fserver.exe C:\MyDocs C:\FlashDocs /ProtectionOptions:3
|
The ProtectionOptions argument is obtained by addition of the respective
constants from PROTECTION_OPTION enumeration: 1+2=3.
The example below converts
a document named "C:\MyDocs\Conference.txt" to
a Flash document named "D:\Publish\Report2.swf" selecting Landscape page
orientation and Letter paper size for the output file pages:
p2fserver.exe C:\MyDocs\Conference.txt D:\Publish\Report2.swf /FormName:Letter /Orientation:2
|
The orientation value is taken from PAPER_ORIENTATION
enumeration.
|