80
pages
Indicates the range of pages to be printed, semicolon separated
examples:
to print all pages, beginning from 2nd: 2-
to print 1st, 3rd, and 5th page: 1;3;5
to print first 10 pages: 1-10
to print 1st, 2nd and a range from 10 to 20: 1;2;10-20
to print 2nd, and the rest from 10th: 2;10
openpass
Password that allows the user to open the PDF file,
enclose the value in double-quotes if you want to use space(s)
examples: openpass=hj1uLWl
openpass="Best Converter 2 PDF and SWF"
optimize
Specifies the optimization level (0, 1, 2). Each optimization level
is a different algorithm and adds more compression. 0 means no
compression.
embedfonts
Embed fonts in swf for a better search in swf (Default No:0)
(Values= 0 or 1)
ignoreswferrors
SWF conversion might at times result in errors.
This flag forces swf conversions (Default No:0) (Values= 0 or 1)
totalpages
Returns the number of the pages in document
(Returns accurate total number of pages but requires more
processing time)
fastpgcnt
Returns the number of the pages in document based on
properties
(Faster, but might not be accurate, use totalpages for actual page
count)
pagesize
Used when converting tiff image, possible values:
a4 - resize the result pages to A4 (210 x 297 mm) (default)
letter - resize the result pages to Letter (8,5 x 11")
original - keep the original size of the pages
modulesdir
Directory to be used for modules and inter-process
communication
(by default this directory exists in the installation directory)
pagetype
used when converting multi-page tiff images, possible values:
a4 - resize the result pages to A4 (210 x 297 mm)
letter - resize the result pages to Letter (8,5 x 11")
original (default) - keep the original size of the pages
dpi
for specifying depth per index ratio of output swf and image files
pdfdensity
used when converting PDF to TIFF or other image formats, such
as PNG .When not specified, it defaults to 150. The value may
vary from 11 to 4799.
fidelity
the factor which will make docx, xlsx and pptx documents appear
exactly same as original; setting fidelity as 'high' means more
time spent for conversion (default: normal)
convtimeout
maximum time to wait for the conversion to be done (in seconds)
(used for large files). Use 0 to wait for infinite time, default: 660
seconds
flashver
sets the flash version of the converted swf (default: 9)
(Viewer
supports only 9+)
thumbnail
specifies thumbnail image width and height, e.g.: 150x200. Only
used for
creating thumbnails in png format of document pages
customerid
Customer id
regkey
Registration key
monochrome
Create grayscale TIFF images (monochrome=1)
getattachments
Get attachment List for msg & eml formats (getattachments=1)
extractattachments
Extract attachments from msg & eml formats
(extractattachments=1)
14
48
xlsfidelity
suppress the XLS pre-processing of one page per sheet. Default:
high
(Values: low/high)
allowTextSelect
Allows users to select text in a document when set to true.
Setting to No disallows text selection. (Default=true)
showFullscreenNotice
Allows the fullscreen keyboard events notice to not be displayed
if set to No. (Default=Yes)
suppressSaveAnnotationNotice Allows Annotation Saved notice to not be displayed when set to
Yes. (Default=No)
srcencoding
Specify the text import filter parameters for text files.
(Gets used only for .txt and .text files)
For the Korean files srcencoding would be:
srcencoding=EUC_KR,CRLF,Times New Roman,ko-KR
where:
EUC_KR is the encoding, complete list is here:
http://docs.python.org/release/2.4.2/lib/standard-encodings.html
CRLF is the line ending character (either: CR, LF, CRLF)
Times New Roman is the default font used
ko-KR is the language encoding
Default AJAX Based Client Examples:
Example 1:
To convert sample.doc to sample.swf having Proxy Server running on 18580 in Demo Mode:
java -jar convert2swfclient.jar source=sample.doc
Example 2:
To convert page 1 only of sample.doc to sample.swf:
java -jar convert2swfclient.jar pages=1 source=sample.doc
Example 3:
To convert pages 1,5,7 only of sample.doc to sample.swf:
java -jar convert2swfclient.jar pages=1,5,7 source=sample.doc
Example 4:
To get total pages in sample.doc:
java -jar convert2swfclient.jar totalpages source=sample.doc
Example 5:
To get fast page count in sample.doc:
java -jar convert2swfclient.jar source=sample.doc
fastpgcnt – gets total pages in the document quickly but might not be as accurate as totalpages
Example 6:
To create a thumbnail of page 1 of sample.doc:
java -jar convert2swfclient.jar source=sample.doc thumbnail=100x100 pages=1
Example 7:
To create a thumbnail of all pages of sample.doc:
java -jar convert2swfclient.jar source=sample.doc thumbnail=100x100
Note: If the registration information is not valid or empty, the library runs
15
35
in demo mode. Some features are limited.
Note: For unregistered products or in trial mode, the Convert2SWF runs in trial mode and
produces a DEMO watermark on converted documents.
Zero Footprint Client Examples:
Example 1:
To convert sample.tiff to sample.png having Proxy Server running on 18580 in Demo Mode:
java -jar convert2swfclient.jar source=sample.tiff target=sample.png
Example 2:
To convert page 1 only of sample.pdf to sample.png:
java -jar convert2swfclient.jar source=sample.pdf target=sample.png pages=1
Example 3:
To convert pages 1,5,7 only of sample.tiff to sample.png having Proxy Server running on 18580:
java -jar convert2swfclient.jar source=sample.tiff target=sample.png pages=1,5,7
Example 4:
To get total pages in sample.pdf:
java -jar convert2swfclient.jar source=sample.pdf totalpages
Example 5:
To create a thumbnail of page 1 of sample.tiff:
java -jar convert2swfclient.jar source=sample.tiff thumbnail=100x100 pages=1
target=sample.png
Example 6:
To create a thumbnail of all pages of sample.tiff:
java -jar convert2swfclient.jar source=sample.tiff thumbnail=100x100 target=sample.png
Note: If the registration information is not valid or empty, the library runs
in demo mode. Some features are limited.
Note: For unregistered products or in trial mode, Convert2SWF runs in trial mode and produces
a DEMO watermark on converted documents.
proxyserver.jar - Prizm Proxy Server
Proxy server is required to be running for convert2swf utility to run. This service is installed and
started during the installation process.
Prizm Services basically creates a proxy which handles document conversions and provides load
balancing by using various ports on the machine.
convert2swf_proxy.properties contains the parameters and port information needed for
proxy server to run and is located in the C:\Prizm\conf directory.
16
44
Starting the Proxy Server
Method 1: Starting from the Control Panel
Prizm Services should ideally be started\stopped from the control panel. Simply right click on
Prizm services in control panel to Start\Stop the services.
If access to the control panel is not available, services can also be started\stopped from the
command line using following commands:
net start Convert2SWFSvc
net stop Convert2SWFSvc
Logs are created in C:\Prizm\logs directory
Method 2: Starting as a service manually
jrunner.exe utility is provided for installation & set up of Prizm Services
jrunner.exe requires jrunner.properties & ooodir as arguments
If oodir is not mentioned, jrunner.exe takes the oodir mentioned in jrunner.properties
jrunner.properties contains the Prizm Proxy Service setup information and is located in
C:\Prizm\conf.
jrunner Usage:
jrunner <command> <configuration file> [configuration properties] [...]
jrunner <configuration file> [configuration properties] [...]
(<command> implicitly '-c')
jrunner <command>
(<configuration file> implicitly 'jrunner.properties')
jrunner
(<command> implicitly '-c' and <configuration file> 'jrunner.properties')
where <command> can be one of:
-c --console run as a Console application
-t --start start an NT service
-a --pause pause a started NT service
-e --resume resume a paused NT service
-p --stop stop a running NT service
-i --install Install as an NT service
-r --remove Remove as an NT service
-q --query Query the current status of the service
-qs --querysilent Silently Query the current status of the service
-v --version print the wrapper's version information
-? --help print this help message
<configuration file> is the jrunner.properties to use. Name must be absolute or relative to the
location of jrunner
[configuration properties] are configuration name-value pairs which override values in
jrunner.properties. For example: jrunner.debug=true
Method 3: Starting with provided utility scripts
To set up the service manually or to start the service manually you can use the included scripts
to start, stop or install and uninstall the services. These utilities reside in C:\Prizm\scripts and
assume that correct ‘ooo_installation’ parameter is specified in the
17
32
C:\Prizm\conf\jrunner.properties file
Make sure that OpenOffice.org installation base directory is specified correctly in the
C:\Prizm\conf\jrunner.properties file
# OpenOffice.org installation base directory
ooo_installation=C:\Prizm\App\openoffice
Script
Description
install-service
Install the Prizm Content Connect Services
start-service
Start the Prizm Content Connect Services
stop-service
Stop the Prizm Content Connect Services
remove-service
Remove the Prizm Content Connect Services
Viewer.swf
Viewer.swf is Prizm Content Connect’s default client navigation and viewer file containing the UI
code. Viewer.swf basically acts as a wrapper viewing file and makes AJAX calls to get the
document pages in swf format. This file is used with convert2swf utility to produce the resulting
swf file with the navigation UI.
settings.xml
settings.xml file contains parameters used by the viewer. Update this based on your conversion
file name.
Parameter
Value
conversionFileURLFile which will take care of ajax calls and performs the conversion
Default value : convert.aspx
Example settings.xml file
<settings>
<conversionFileURL>convertdocument.asp</conversionFileURL>
</settings>
18
61
Chapter 3
Document Conversion ProxyWebservice
Prizm Content Connect has a built in HTTP & HTTPS WebServer which serves the document
conversion requests and does load balancing and various other tasks.
By default, after complete installation you can check if the HTTP WebServer is running by
pointing your browser to:
http://localhost:18680/convert2swf
convert2swf Webservice by default is setup to run on port 18680 and in http mode.
Usage:
ooserver
OpenOffice.org server hostname:port
proxyserver
Convert2SWF Proxy server hostname:port
source
Source file path
target
Target directory or target file path
if target is empty, the result is saved to the source directory
log
Log file path, if not specified all logging goes to a terminal
pages
Indicates the range of pages to be printed, semicolon separated
examples:
to print all pages, beginning from 2nd: 2-
to print 1st, 3rd, and 5th page: 1;3;5
to print first 10 pages: 1-10
to print 1st, 2nd and a range from 10 to 20: 1;2;10-20
to print 2nd, and the rest from 10th: 2;10
openpass
Password that allows the user to open the PDF file,
enclose the value in double-quotes if you want to use space(s)
examples: openpass=hj1uLWl
openpass="Best Converter 2 PDF and SWF"
optimize
Specifies the optimization level (0, 1, 2). Each optimization level
is a different algorithm and adds more compression. 0 means no
compression.
embedfonts
Embed fonts in swf for a better search in swf (Default No:0)
(Values= 0 or 1)
ignoreswferrors
SWF conversion might at times result in errors.
This flag forces swf conversions (Default No:0) (Values= 0 or 1)
totalpages
Returns the number of the pages in document
(Returns accurate total number of pages but requires more
processing time)
fastpgcnt
Returns the number of the pages in document based on
properties
(Faster, but might not be accurate, use totalpages for actual page
count)
pagesize
Used when converting tiff image, possible values:
a4 - resize the result pages to A4 (210 x 297 mm) (default)
letter - resize the result pages to Letter (8,5 x 11")
original - keep the original size of the pages
modulesdir
Directory to be used for modules and inter-process
communication
19
67
(by default this directory exists in the installation directory)
pagetype
used when converting multi-page tiff images, possible values:
a4 - resize the result pages to A4 (210 x 297 mm)
letter - resize the result pages to Letter (8,5 x 11")
original (default) - keep the original size of the pages
dpi
for specifying depth per index ratio of output swf and image files
pdfdensity
used when converting PDF to TIFF or other image formats, such
as PNG .When not specified, it defaults to 150. The value may
vary from 11 to 4799.
fidelity
the factor which will make docx, xlsx and pptx documents appear
exactly same as original; setting fidelity as 'high' means more
time spent for conversion (default: normal)
convtimeout
maximum time to wait for the conversion to be done (in seconds)
(used for large files). Use 0 to wait for infinite time, default: 660
seconds
flashver
sets the flash version of the converted swf (default: 9)
(Viewer
supports only 9+)
thumbnail
specifies thumbnail image width and height, e.g.: 150x200. Only
used for
creating thumbnails in png format of document pages
customerid
Customer id
regkey
Registration key
monochrome
Create grayscale TIFF images (monochrome=1)
getattachments
Get attachment List for msg & eml formats (getattachments=1)
extractattachments
Extract attachments from msg & eml formats
(extractattachments=1)
xlsfidelity
suppress the XLS pre-processing of one page per sheet. Default:
high
(Values: low/high)
allowTextSelect
Allows users to select text in a document when set to true.
Setting to No disallows text selection. (Default=true)
showFullscreenNotice
Allows the fullscreen keyboard events notice to not be displayed
if set to No. (Default=Yes)
suppressSaveAnnotationNotice Allows Annotation Saved notice to not be displayed when set to
Yes. (Default=No)
srcencoding
Specify the text import filter parameters for text files.
(Gets used only for .txt and .text files)
For the Korean files srcencoding would be:
srcencoding=EUC_KR,CRLF,Times New Roman,ko-KR
where:
EUC_KR is the encoding, complete list is here:
http://docs.python.org/release/2.4.2/lib/standard-encodings.html
CRLF is the line ending character (either: CR, LF, CRLF)
Times New Roman is the default font used
ko-KR is the language encoding
REST Based Examples
Example 1:
To convert sample.doc to sample.swf:
http://localhost:18680/convert2swf?source=c:\temp\sample.doc&target=c:\temp\sample.swf
20
Documents you may be interested
Documents you may be interested