Home  • Download  • Register Now!  • Benefits  • Help  • Testimonials  • Samples  • Screenshots  • Awards  • Forum  • Convert Documents Online  • Print2Flash APIs  • Print2Flash vs. FlashPaper  • Contact Us
 Help Contents

Enhanced Batch Processing


Enhanced Batch Processing lets you convert documents to Flash or HTML5 format programmatically without user assistance using operating system command line. 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

Enhanced 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]


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 on the 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 base output filename without extension. For Flash documents Print2Flash adds .swf extension to this name while for HTML5 documents it adds .xml extension.
    If this parameter is omitted, the file is put into the same folder as the original file. Flash documents are named after the original document with .swf extension appended to the original document name and HTML5 documents - with .xml extension appended;
  • sourcefiledir - the name of the directory where 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 output Flash documents are named after the original document with .swf extension appended to the original document name. The output HTML5 documents are named after the original document with .xml extension appended to the original document name. For example, if a file was named MyDoc.doc, the converted Flash document will be named MyDoc.doc.swf, and the converted HTML5 document will be named MyDoc.doc.xml.

If any file name or path parameters contain spaces, they must be enclosed in double quotes. In options parameter you can list one or more options. Most options corresponds to the properties and methods of Print2Flash OLE Automation API objects. The general syntax of an option is:


Here OptionName is the name of the option from the table below, and OptionValue specifies the option value and must be of the type specified in the table.  For example, to specify German document interface language, you need to specify this option:


The available options are listed in the table below.

Option name Value type Description

Document interface

InterfaceOptions Integer Similar to InterfaceOptions property of Profile object.
Language String Similar to Language property of Profile object.


SkinName String The name of the predefined skin to use. If other skin parameters listed below are specified, they override this skin settings. If this parameter is omitted, the default Skin object settings are used.
ToolbarBgrColor Integer Similar to ToolbarBgrColor property of Skin object.
OverButColor Integer Similar to OverButColor property of Skin object.
OverRectColor Integer Similar to OverRectColor property of Skin object.
DownButColor Integer Similar to DownButColor property of Skin object.
DownRectColor Integer Similar to DownRectColor property of Skin object.
DocBgrColor Integer Similar to DocBgrColor property of Skin object.
ScrollBarColor Integer Similar to ScrollBarColor property of Skin object.
TextHighlightColor Integer Similar to TextHighlightColor property of Skin object.
ColorAdjustment String Similar to ColorAdjustment property of Skin object.
BtnColorAdj Boolean Similar to BtnColorAdj property of Skin object. Can be either "on" or "off".
ZoomHandleOffset Integer Similar to ZoomHandleOffset property of Skin object.
LogoURL String Similar to LogoURL property of Skin object.
HelpButtonURL String Similar to HelpButtonURL property of Skin object.
TBBgrImgBehavior Integer Similar to TBBgrImgBehavior property of Skin object.
TBImage<Integer> String Specifies an image file name to use for a toolbar button or control. The image to be set is specified as a number at the end of the parameter name. This number must be one of the values of TOOLBARIMAGE enumeration. For example, parameter name TBImage10 corresponds to the Next Page button image. This parameter accomplishes a similar function as SetToolbarImage method of the Skin object.
NoSkin Boolean When this option is "on", it tells Print2Flash that no skin is used and no skin images are stored inside the document. It is helpful for reducing of document file size in case you either don't need the document toolbar at all or use your own custom document viewer for single file mode. When this option is "on", it cancels using of the default skin and overrides the SkinName and TBImage parameters. Can be "on" or 'off".

Document protection

ProtectionOptions Integer Similar to ProtectionOptions property of Profile object.
RestrictionDomains String Similar to RestrictionDomains property of Profile object.

Options for Flash documents

FlashVersion Integer Similar to FlashVersion property of Profile object.
CompressionMethod Integer Similar to CompressionMethod property of Profile object.
OutputFormat Integer Similar to OutputFormat property of Profile object.
DocTemplate String Similar to DocTemplate property of Profile object. If specified, TemplateType parameter is assumed to be equal to 1 (TEMPLATE_CUSTOM).
TemplateType Integer Similar to TemplateType property of Profile object.
PageFileName String Similar to PageFileName property of Profile object.
OutputResolution Integer Similar to OutputResolution property of Profile object.
ASVersion Integer Similar to ASVersion property of Profile object.
GenerateExternalViewer Boolean Similar to GenerateExternalViewer property of BatchProcessingOptions object. Can be either "on" or "off".
FrameWidth Integer Similar to FrameWidth property of Profile object.
FrameHeight Integer Similar to FrameHeight property of Profile object.

Options for HTML5 documents

HTML5Options.Compatibility Integer Similar to Compatibility property of HTML5Options object.
HTML5Options.Compression Boolean Similar to Compression property of HTML5Options object. Can be either "on" or "off".
HTML5Options.VersionIE String Similar to VersionIE property of HTML5Options object.
HTML5Options.VersionFirefox String Similar to VersionFirefox property of HTML5Options object.
HTML5Options.VersionChrome String Similar to VersionChrome property of HTML5Options object.
HTML5Options.VersionOpera String Similar to VersionOpera property of HTML5Options object.
HTML5Options.VersionSafari String Similar to VersionSafari property of HTML5Options object.
HTML5Options.ViewMode Integer Similar to ViewMode property of HTML5Options object.
HTML5Options.SinglePageModeThreshold Integer Similar to SinglePageModeThreshold property of HTML5Options object.

Document optimization

UseJpeg Boolean Similar to UseJpeg property of Profile object. Can be either "on" or "off".
JpegQuality Integer Similar to JpegQuality property of Profile object. If specified, it is implied that UseJpeg option is on.


ParseLinks Boolean Similar to ParseLinks property of Profile object. Can be either "on" or "off".
ExtractLinks Integer Similar to ExtractLinks property of Profile object.
LinkTargetAuto Boolean Similar to LinkTargetAuto property of Profile object. Can be either "on" or "off".
LinkTarget Integer Similar to LinkTarget property of Profile object.


WatermarkImage String Similar to WatermarkImage property of Profile object.
WatermarkScale Integer Similar to WatermarkScale property of Profile object.
WatermarkTransparency Integer Similar to WatermarkTransparency property of Profile object.
WatermarkAnchor String Similar to WatermarkAnchor property of Profile object.
WatermarkXOffset Integer Similar to WatermarkXOffset property of Profile object.
WatermarkYOffset Integer Similar to WatermarkYOffset property of Profile object.

Page thumbnails

ThumbnailPageRange String Similar to ThumbnailPageRange property of Profile object.
ThumbnailFileName String Similar to ThumbnailFileName property of Profile object.
ThumbnailFormat Integer Similar to ThumbnailFormat property of Profile object.
ThumbnailImageHeight Integer Similar to ThumbnailImageHeight property of Profile object.
ThumbnailImageWidth Integer Similar to ThumbnailImageWidth property of Profile object.

Metadata file

CreateMetaDataFile Boolean Similar to CreateMetaDataFile property of Profile object. Can be either "on" or "off".
MetaDataFileFormat Integer Similar to MetaDataFileFormat property of Profile object.
MetaDataFileName String Similar to MetaDataFileName property of Profile object.

Log file

CreateLogFile Boolean 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 Integer Similar to LoggingLevel property of BatchProcessingOptions object. Default value is 0.

Special document processing

UseAutomation Integer Similar to UseAutomation property of BatchProcessingOptions object.
KillAllAutomationProcesses Integer Similar to KillAllAutomationProcesses property of BatchProcessingOptions object.
Excel.SheetRange String Similar to SheetRange property of ExcelOptions object.
Excel.OverridePrintQuality Boolean Similar to OverridePrintQuality property of ExcelOptions object. Can be either "on" or "off".
PowerPoint.FitToPage Boolean Similar to FitToPage property of PowerPointOptions object. Can be either "on" or "off".
PowerPoint.FrameSlides Boolean Similar to FrameSlides property of PowerPointOptions object. Can be either "on" or "off".
PowerPoint.OutputType Integer Similar to OutputType property of PowerPointOptions object.
PowerPoint.PrintHiddenSlides Integer Similar to PrintHiddenSlides property of PowerPointOptions object. Can be either "on" or "off".
CheckPDFEncryption Integer Similar to CheckPDFEncryption property of BatchProcessingOptions object.

Printing preferences

FormName String Similar to SetFormName method of PrintingPreferences object.
Orientation Integer Similar to Orientation property method of PrintingPreferences object.
PaperLength Integer PaperLength and PaperWidth can be specified to denote a custom paper size similar to SetCustomPaperSize method of PrintingPreferences object.
PaperWidth Integer See PaperLength option above.
Resolution Integer Similar to Resolution property of PrintingPreferences object.

Abnormal situation control

ActivityTimeout Integer Similar to ActivityTimeout property of BatchProcessingOptions object.
AfterPrintingTimeout Integer Similar to AfterPrintingTimeout property of BatchProcessingOptions object. Default is 10 seconds.
BeforePrintingTimeout Integer Similar to BeforePrintingTimeout property of BatchProcessingOptions object. Default is 30 seconds.
KillProcessIfTimeout Boolean Similar to KillProcessIfTimeout property of BatchProcessingOptions object. Can be either "on" or "off". If omitted, Print2Flash determines the best value for this setting automatically.
KillSplWOW64 Boolean Similar to KillSplWOW64 property of BatchProcessingOptions object. Can be either "on" or "off". If omitted, Print2Flash determines the best value for this setting automatically.
PressPrintButton Boolean Similar to PressPrintButton property of BatchProcessingOptions object. Can be either "on" or "off". If omitted, Print2Flash determines the best value for this setting automatically.
PrintingTimeout Integer Similar to PrintingTimeout property of BatchProcessingOptions object. Default is infinite time.

Other options

IncludeSubDirs Boolean 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".
DocumentType Integer Similar to DocumentType property of Profile object.
PageRange String Similar to PageRange property of BatchProcessingOptions object.

Using Enhanced 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.


  1. The following example converts a document named "C:\MyDocs\Report.xls" to a Flash document named "C:\MyDocs\Report.xls.swf" and HTML5 document named "C:\MyDocs\Report.xls.xml" and enables only Drag, Select Text, Previous Page and Next Page buttons in the resulting documents:

  2. 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=646
  3. The next example converts all documents in a directory named "C:\MyDocs" to Print2Flash documents written into "C:\FlashDocs" directory and disables printing and copying text in the 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.
  4. The example below converts a document named "C:\MyDocs\Conference.txt"  to a Flash document named "D:\Publish\Report2.swf" and to an HTML5 document named "D:\Publish\Report2.xml" selecting Landscape page orientation and Letter paper size for output file pages:
    p2fserver.exe C:\MyDocs\Conference.txt D:\Publish\Report2 /FormName:Letter /Orientation:2 

    The orientation value is taken from PAPER_ORIENTATION enumeration.

 Copyright © Print2Flash Software 2005-2017. All rights reserved.

Support | Privacy policy