There are over 200 commands in the Image Command Set listed in the Technical
Reference Manual. ICS commands can be used in many different ways which
require different formats. Rather than provide a general
introduction, this page is intended to give some useful examples of
how they might be used.
Examples of reconfiguring the SwiftView user interface for specific applications
ICS commands for SwiftPublish or SwiftStamp user interface
Browser-Based SwiftView ICS examples
Standalone SwiftView ICS examples
ICS commands for SwiftConvert
SwiftConvert is based on the same technology as SwiftView Viewer. See the
Conversion Quick Start Guide for examples of conversion ICS commands.
ICS commands for SwiftPublish or SwiftStamp user interface
The user interface for SwiftPublish and SwiftStamp contains a edit box into
which a user can type ICS commands to insert into the output file. Commands issued
this way require no special format. Simply use the commands as given in the
manual, seperating multiple commands with the pipe character. For example:
Create a Fast Print button in any viewer that opens the file
gui button label "F-print" icon print info "Fast Print menu" command "gui dialog fastprint" | gui controls update
Set pagesize of ambiguous-size file to A4 and cause Unix text to display as Windows text
pcl pagesize 26 | set hpfiletype unixtext
Display a pop-up message box whenever the file is opened
message "This file provided courtesy of SwiftView, Inc."
Put a markup/watermark/annotation/redline on a file (the following is one long line)
set ldocinit "onpage all markup attributes display yes |
onpage all markup text rxloc 0 ryloc 0 string \"UNCONTROLLED COPY PRINTED $strftime(%X %x )\""
Set the color and width of HPGL pen #1 in your HPGL file
hpgl pen 1 red 255 green 0 blue 0 width normal
Most of the other example commands below can be used, however any "ldoc" commands are
superfluous; since the ICS commands are being put into a file, there is no need to
load a file (which is what ldoc does).
Browser-based SwiftView ICS examples
ICS Files
A plain text file which begins with the letters "ICS" on the top line can
contain a series of ICS commands. This file can be given any filename
suffix, however because Outlook 2000 claims the suffix ".ics", we advise against using the filename
suffix .ics if any client systems have Outlook 2000 installed.
We recommend the suffix .zhp for use with ICS files.
The commands are executed when the file is opened in the browser.
Here is an example of such a file which will produce a 2-page "virtual document" using
single-page files:
ICS
onpage 1 use sourcename http://www.swiftview.com/tech/5x7plate.tif
onpage 2 use sourcename http://www.swiftview.com/tech/1page.hpg
draw all
Browser-based Configuration File
Npsview.ics is an ICS file which is used to
configure browser-based SwiftView.
This file is placed in the root of the web server to configure all users
who visit the website, or on the local drive to configure a single client.
We provide an example npsview.ics which
demonstrates the most popular features, such as fast printing, direct printing,
HPGL pen colors and markup. Simply comment out any undesired features
using the # character. The file had to be renamed to npsview_ics.txt so
that it could be viewed, otherwise, with its original name of npsview.ics
it would simply be processed by browser-based SwiftView and would not show
on screen.
Standalone ICS examples
Windows Standalone Configuration file
A plain text file called sview.ini allows automatic configuration of SwiftView
at startup. Sview.ini is placed in the same folder as the SwiftView
executable (sview.exe) and allows configuration via ICS commands.
Sview.ini must begin with [SwiftView] on the top line, and each ICS command
line must begin with ICS#=, in the format ICS0=firstcommand, ICS1=secondcommand,
ICS2=thirdcommand, etc. Only sview.ini for standalone Windows SwiftView
uses this ICS# format. We provide an example
sview.ini which demonstrates the most popular features, such as fast
printing, direct printing, HPGL pen colors and markup. Remember-
you can comment out lines using the # character, but you must renumber
the remaining ICS commands so that there are no missing numbers.
Unix Standalone Configuration file
The file svstart.ics has the format of a normal ICS
file and is used to configure printers and other functionality.
An example svstart.ics comes with the product at installation.
Command line
The sview executable (sview on Unix, sview.exe on Windows) can be sent
ICS commands at the command line. To utilize batch mode (no user
interface) use the parameter -c, to bring up the user interface use the
-ics parameter. Follow the parameter with the ICS command in quotes,
with multiple ICS commands separated by the pipe character in the following
format:
sview -c"first ICS command here|next ICS command here"
Note that in some examples below, to place quotes within quotes it is necessary
to remap the quote character to the carat:
Darken the contrast, load a file and display it
sview -ics"set bitonalgamma absval 4 | ldoc c:\file.pcl | draw"
Open a file and highlight a certain text string
sview -ics"ldoc svm.zhp|set quotechar 0x5e | select string ^if the end^"
Print a single HPGL file without displaying it (example customized for Windows)
sview -c"set quotechar 0x5e| ldoc ^c:\my documents\plotfile.hpg^ | plot 99 all"
Print all .pcl files in the current directory (example customized for Windows)
FOR %i IN (*.pcl) DO c:\progra~1\swiftview\sview -c"ldoc %i|plot 99 all"
ICS files
A plain text file which begins with the letters "ICS" on the top line can
contain a series of ICS commands. This file must be given the filename
suffix ".ics". To execute the commands, open the file using SwiftView.
For example, this illustrates the message command:
ICS
ldoc "L:\Quarterly Reports\report4.pcl"
# Comment: quotes needed when the file path contains spaces.
draw widetop
message "This pops an OK dialog for the user to click on."
We also provide an example npsview.ics
which demonstrates the most popular features, such as fast printing, direct
printing, HPGL pen colors and markup.
|