Lexmark DOCUMENT DISTRIBUTOR, DOCUMENT DISTRIBUTOR 2.1 User Manual

Document Distributor
Script Reference
April 2002
www.lexmark.com
Edition: April 2002
The following paragraph does not apply to any country where such provisions are inconsistent with local law:
LEXMARK INTERNATIONAL, INC., PROVIDES THIS PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions; therefore, this statement may not apply to you.
This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in later editions. Improvements or changes in the products or the programs described may be made at any time.
Comments about this publication may be addressed to Lexmark International, Inc., Department F95/032-2, 740 West New Circle Road, Lexington, Kentucky 40550, U.S.A. In the United Kingdom and Eire, send to Lexmark International Ltd., Marketing and Services Department, Westhorpe House, Westhorpe, Marlow Bucks SL7 3RQ. Lexmark may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. You can purchase additional copies of publications related to this product by calling 1-800-553-9727. In the United Kingdom and Eire, call +44 (0)8704 440 044. In other countries, contact your point of purchase.
References in this publication to products, programs, or services do not imply that the manufacturer intends to make these available in all countries in which it operates. Any reference to a product, program, or service is not intended to state or imply that only that product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any existing intellectual property right may be used instead. Evaluation and verification of operation in conjunction with other products, programs, or services, except those expressly designated by the manufacturer, are the user’s responsibility.
Lexmark and Lexmark with diamond design are trademarks of Lexmark International, Inc. registered in the United States and/or other countries.
© Copyright 2002 Lexmark International, Inc. All rights reserved.
UNITED STATES GOVERNMENT RESTRICTED RIGHTS
This software and documentation are provided with RESTRICTED RIGHTS. Use, duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and in applicable FAR provisions: Lexmark International, Inc., Lexington, KY 40550.

Table of contents

Introduction ........................................................................ 1
Whats new in version 2.1 ....................................................... 2
Actions .......................................................................................2
Document Server Admin ...........................................................2
Documentation .......................................................................... 2
Chapter 1: The Basics .......................................................3
Objects ................................................................................... 3
Declaring Variables ................................................................ 4
Flow control ............................................................................ 4
If/Then/Else ...............................................................................4
Switch/Case ............................................................................... 5
Repetitive Statements ............................................................ 6
Loop ...........................................................................................6
Repeat .......................................................................................7
Operators ................................................................................ 9
Mathematical ............................................................................. 9
Comparison ............................................................................. 10
Boolean ................................................................................... 11
Other Features ..................................................................... 12
Object shorthand using "with" ..................................................12
Debugging a script ................................................................... 12
Prompting for values during compilation .................................12
Aborting a script during runtime ...............................................13
Reserved words .......................................................................13
i
Chapter 2: Data Type Objects ........................................14
Boolean ................................................................................ 15
Operators ................................................................................. 15
Document ............................................................................. 16
Methods ................................................................................... 16
Operators ................................................................................. 19
Integer .................................................................................. 20
Methods ................................................................................... 20
Operators ................................................................................. 21
Real ...................................................................................... 22
Methods ................................................................................... 22
Operators ................................................................................. 23
String .................................................................................... 24
Methods ................................................................................... 24
Operators ................................................................................. 27
Chapter 3: Helper Objects ..............................................29
Array ..................................................................................... 30
Methods ................................................................................... 30
Textfile .................................................................................. 31
Methods ................................................................................... 31
Chapter 4: System objects .............................................36
Original ................................................................................. 37
Userdata ............................................................................... 39
Confirm ................................................................................. 40
Chapter 5: Action objects ...............................................43
ConvertBarcodeToText ........................................................ 44
ConvertForm ......................................................................... 46
ii
ConvertImageFormat ............................................................ 47
ConvertToDocument ............................................................ 52
ConvertToText ...................................................................... 54
DatabaseNotes ..................................................................... 58
Domino.Doc Actions ............................................................. 61
DominoDocCheckIn .................................................................62
DominoDocRetrieve ................................................................67
Connecting to Domino.Doc ...................................................... 72
Navigating a Domino.Doc Library ............................................ 72
EmailExchange ..................................................................... 74
EmailNotes ........................................................................... 77
EmailSMTP ........................................................................... 80
E-mail Addresses ....................................................................81
Recipients and Senders .......................................................... 82
FaxByPrinter ......................................................................... 83
FTPget .................................................................................. 85
FTPput .................................................................................. 87
GroupWise Actions ............................................................... 89
GWMail .................................................................................... 90
GWDiscuss .............................................................................. 93
GWCheckIn ............................................................................. 96
ImageCombine ..................................................................... 99
ImageCrop .......................................................................... 101
ImageDeskew ..................................................................... 103
ImageInvert ......................................................................... 104
ImageMerge ....................................................................... 105
ImageRotate ....................................................................... 109
iii
ImageSeparate ................................................................... 111
ImageText ........................................................................... 112
LaunchExe .......................................................................... 115
Checking Return Values ........................................................118
ODBC actions ..................................................................... 119
Introduction ............................................................................ 119
ODBCWrite ............................................................................ 120
ODBCRead ............................................................................ 124
PrintASCII ........................................................................... 130
PrintByAssoc ...................................................................... 131
PrintByDriver ...................................................................... 133
PrintIP ................................................................................. 134
Print Confirmation ..................................................................137
PrintPDF ............................................................................. 138
PrintTIF ............................................................................... 139
PrintURL ............................................................................. 140
SaveToFile ......................................................................... 141
SharePoint .......................................................................... 144
SharePointWrite ....................................................................145
SharePointRead .................................................................... 148
Appendix A: Migrating from LDD 1.4 to LDD 2.1 ......... 154
Whats new since LDD version 1.4? ................................... 154
Whats changed? ................................................................ 155
Using the ImportWizard to convert scripts .......................... 156
Manually converting scripts ................................................ 157
Operator conversions ......................................................... 162
iv
Action name conversions ................................................... 164
Action property conversions ............................................... 165
Appendix B: LDD Constants Reference....................... 166
ConvertBarcodeToText ...................................................... 166
Type ....................................................................................... 166
ConvertImageFormat .......................................................... 167
Format ................................................................................... 167
Color depth ............................................................................ 167
ConvertToDocument .......................................................... 168
Format ................................................................................... 168
Paper size .............................................................................. 168
Orientation ............................................................................. 168
Resolution .............................................................................. 169
ConvertToText .................................................................... 170
Format ................................................................................... 170
Language ...............................................................................171
Filter ....................................................................................... 171
DatabaseNotes ................................................................... 172
Add field – Field type .............................................................172
Domino.Doc ........................................................................ 173
DominoDocCheckin ...............................................................173
DominoDocRetrieve ..............................................................173
EmailNotes ......................................................................... 175
Priority and Importance ......................................................... 175
Mood stamp ........................................................................... 175
Report delivery ......................................................................175
EmailSMTP ......................................................................... 176
Character set ......................................................................... 176
FTPget/FTPput ................................................................... 177
Transfer mode .......................................................................177
v
GWDiscuss ......................................................................... 178
Message format .....................................................................178
Priority .................................................................................. 178
GWMail ............................................................................... 179
Message format .....................................................................179
Priority .................................................................................. 179
Request reply ........................................................................ 179
Notify opened and Notify deleted .......................................... 179
ImageCombine ................................................................... 180
Format ................................................................................... 180
Color depth ............................................................................ 180
ImageRotate ....................................................................... 181
Rotate pages ......................................................................... 181
Rotation angle ....................................................................... 181
ImageText ........................................................................... 182
Font ....................................................................................... 182
Color ...................................................................................... 182
Orientation ............................................................................. 182
Direction ................................................................................ 182
Position .................................................................................. 183
PrintIP ................................................................................. 184
Paper type ............................................................................. 184
N-up ....................................................................................... 184
Duplex ................................................................................... 185
Output bin ..............................................................................185
SharePoint .......................................................................... 186
SharePointWrite ....................................................................186
Appendix C: ODBC Reference ...................................... 187
Software requirements and setup ....................................... 187
Database document support ................................................. 188
Inserting values into Date Columns ....................................... 188
vi
Appendix D: Barcode Re f e renc e . ... ................. .. .. ... ....... 189
LDD_BARCODE_CODE25 ................................................ 189
LDD_BARCODE_CODE39 ................................................ 190
LDD_BARCODE_CODE93 ................................................ 190
LDD_BARCODE_CODE128 .............................................. 190
LDD_BARCODE_CODABAR ............................................. 191
LDD_BARCODE_EAN13 ................................................... 191
LDD_BARCODE_ITF ......................................................... 191
LDD_BARCODE_PDF417 ................................................. 192
LDD_BARCODE_POSTNET .............................................. 192
LDD_BARCODE_UCC128 ................................................. 192
LDD_BARCODE_UPCA ..................................................... 193
LDD_BARCODE_UPCE ..................................................... 193
vii

Introduction

This book provides a technical reference for LDDScript, the scripting language for the Lexmark Document Distributor. It is assumed you are already familiar with the language; if not, please review the "Basic Script Writing" book installed with this product.
If you are migrating from LDD version 1.4, start with Appendix A, "Migrating from LDD 1.4 to 2.1".
The Script Reference is organized as follows:
Chapter 1, "The Basics"—Quick overview of the basic constructs of LDDScript. For detailed examples, please see the "Basic Script Writing" book.
Chapter 2, "Data Type Objects" Information on the supported data types.
Chapter 3, "Helper Objects"Information on the objects that are used to perform common
operations
Chapter 4, "System Objects"—Information on the objects that provide the data provided with a submitted job and provide feedback to the end-user.
Chapter 5, "Action Objects"—Information on the objects that perform the actual processing of documents to route, store in a database, print, and so on.
Appendix A, "Migrating from LDD 1.4 to 2.1"—Information for users migrating from previous versions of LDD.
Appendix B, "LDD Constants Reference"Quick lookup of all the constants used in LDDScript.
Appendix C, "ODBC Reference"Information about interfacing with databases from within a script.
Appendix D, "Barcode Reference"Information about the barcodes supported by LDDScript.
1

What’s new in version 2.1

Lexmark Document Distributor 2.1 has enhanced many of its standard features as well as added some brand new function. Additions and enhancements include:

Actions

PrintIPNow supports Staple and Print Confirmation (WaitForCompletion and WaitTimeout
properties)
New actions
ImageText ActionPlace text anywhere on an image
Electronic Document Manipulation (EDMS) actions that include third party database software;
SharePoint and Domino.Docs

Document Server Admin

Script Editor improvements that include:
find/replaceUse the find/replace tool to take you to the code you want
printPrint a hard copy of your script from the Script Editor
insert logicAutomatically insert logic syntax into your script
auto-completeAutomatically finishes your actions
auto-indentAutomatically indents your script when inserting a sub-routine

Documentation

Expanded documentation including:
Basic Script WritingDocumentation to help you get started writing your first script
Script ExamplesDetailed script examples (included with LDD) with line–by–line explanations
of the code
Server Admin Tour—Take a detailed tour of the tools available in your Document Server
Admin
2
1

The Basics

Objects

An object is the basic building block of LDDScript. An object contains properties and methods. A property is one of the basic data type objects such as a string or integer. A property is set to various values to affect how the object operates. A method is a function called to operate on the data. A method may be passed parameters and may return a value. The parameters and return values are data type or helper objects.
Dot notation is used to access the properties and methods of an object.
To set the value of a property:
ObjectName.propertyName = value
To call a method:
ObjectName.MethodName() ObjectName.MethodName(param1, param2) returnValue = ObjectName.MethodName(param1)
LDDScript supports four types of objects:
Data TypeThe most basic objects; all properties and most variables are of this type.
HelperProvide an easy way to perform some common operations.
SystemDo not process documents; used to gather input and provide user feedback.
ActionProcess documents; perform the archiving, routing, distribution, etc.
The remaining chapters in this book provide a reference for objects of each type.
3

Declaring Variables

All variables must be declared before they can be used. Variables cannot be declared inside of a "with" block or inside of any logic blocks like if/then or loops. To declare a variable, specify its object type and name. For example:
string text int num
There are some rules to follow when naming your variables:
Name must consist of letters, numbers, and underscores.
The first character of the name must be a letter.
Must be unique within the script, the names are not case sensitive so "Name", "NAME", and
"name" are all considered the same variable name.
Cannot be a reserved word (one that has a special meaning to the script compiler).

Flow control

In order to control the execution of script statements, some type of flow control logic is necessary. Script statements can be executed three ways: sequentially, selectively, or repetitively.
When no flow control logic is used, the statements are executed in the order they are in the script. For selective execution of certain script statements, you can use if/then/else or switch/case statements. For repetitive execution of script statements, the loop and repeat statements can be used.
These flow control statements are discussed next.

If/Then/Else

The most common type of flow control is the ability to execute a statement if a certain condition is true. This ability is implemented in Document Server by the if/then/else construct. The basic format is:
if (bool expression) then statement1 statementn endif
statement1 to statementn are only executed if the Boolean expression in parentheses is TRUE. Sometimes it is also necessary to evaluate one set of statements if a condition is TRUE and another if it is FALSE. That can be accomplished using the else construct:
if (bool expression) then statementa
statementc
else statementx
statementz
endif
statementa to statementc are executed if the Boolean expression in parentheses is TRUE; otherwise, statementx to statementz are executed.
4

Switch/Case

Sometimes you have more than one condition you want to check for. You can do this with several If/Then statements. The Switch/Case statement provides an easier way to make multiple comparisons:
Integer switch String switch
switch (intvar) switch (stringvar)
case intval1 case "stringval1"
statementa statementa statementb statementb
case intval2 case "stringval2"
statementc statementc statementd statementd
default default
statemente statemente statementf statementf
endswitch endswitch
You can use integer or string values with the Switch/Case statement. Based on the value of the variable, the case block corresponding to that value is executed. Each case block can contain multiple statements but only one case block is executed.
If the value of the switch variable does not match any of the cases, the default block is executed. The default block is not required. However, if a default block is used, it must be the last block.
Example of Switch
Lexmark MFPs have a job accounting capability. When this feature is enabled, users must enter an account number before accessing a profile. For this example, users enter a department number when using profiles. This example script uses a Switch/Case statement to check the department number.
string CustomSubject // Use the account number as an integer int DeptNumber = original.useracct.AsInt() switch (DeptNumber) case 35 CustomSubject = "Document from Human Resources" case 41 CustomSubject = "Document from Legal Department" case 15 CustomSubject = "Document from Shipping Department" default CustomSubject = "Document from FooBar Company" endswitch
with EmailSMTP .Server="mailserver.com" .To="barbarab@foobar.com" .From="LDDTrain@lexmark.com" .Subject=CustomSubject .Message="Please read." .CharacterSet=LDD_SMTPCHARSET_US .Attachments=original.document .Go() endwith
5

Repetitive Statements

Each statement in a script is executed only once. The repeat and loop statements let you execute the same block of statements multiple times. You can insert an empty repeat or loop statement by clicking the Insert Logic button on the Script Editor toolbar.

Loop

When you want to repeat a set of statements a known number of times, use the loop statement.
Syntax:
loop (intcounter from istart to ifinish) statement1 statementn endloop
where:
intcounter is a previously declared integer variable
istart is an integer value to assign to intvar when the loop starts
ifinish is an integer value that is the maximum for intvar
Using an integer variable as a counter, the loop is repeated as many times as specified in the istart/ifinish information. You can include as many statements as you want in the loop block.
The loop block ends with the endloop statement. The loop begins with the counter variable being assigned the value indicated by istart. With each
execution of the loop, the value of the counter is incremented by 1. This continues until the counter is greater than the value of ifinish.
So a loop from 1 to 10 repeats until the counter has a value of 11. The value of istart must be less than the value of ifinish.
The integer variable used for the counter must be declared prior to using it in the loop statement.
Example:
E-mail the originally scanned document to ten customer service representatives. In this script, the common EmailSMTP properties are specified before the e-mails are sent inside the Loop statement.
string EmailAdd int LoopCount // Set up the common properties for the emails. with EmailSMTP .Subject="Customer Complaint" .Server="mail.server.com" .From="customer_service@foobar.com" .Message="Please review this complaint" .Attachments=original.document .CharacterSet=LDD_SMTPCHARSET_US endwith loop (LoopCount from 1 to 10) EmailSMTP.To="CustRep" + LoopCount.AsString() + "@foobar.com" EmailSMTP.Go() endloop
6

Repeat

The repeat statement lets you execute a block of statements over and over until an expression becomes true.
repeat (until bool expression)
statement1 statementn
endrepeat
The repeat statement executes the block of statements until the Boolean expression is TRUE. You can have as many statements as you want in the loop block. The endrepeat statement ends the loop block. If the initial value of the Boolean expression is true, the loop is not executed.
Example:
This script uses Optical Character Recognition (OCR), to check documents scanned by end users for confidential documents. If the document is confidential it is not e-mailed. The scanned image is saved to a file and a warning message sent to the user who scanned the confidential document.
with ConvertToText .input=original.document .Format=LDD_TEXTFORMAT_STANDARD_WIN .AllPages=TRUE .Language=LDD_LANG_ENGLISH .CharacterTypes=LDD_FILTER_ALLCHARS .SpellCheck=TRUE .KeepFormat=FALSE .WholePage=TRUE .Go() endwith textfile tf string OneLine, Submitter
// Open the results of the OCR Action tf.Open(ConvertToText.output) bool bConfDoc = FALSE int iCount, iEnd iCount =1 iEnd = tf.GetNumberLines()
Submitter = original.username+ "@lexmark.com"
// Check each line for the term Confidential repeat (until (bConfDoc OR (iCount>=iEnd))) OneLine = tf.ReadLine() if (OneLine.Contains("Confidential"))
then
bConfDoc = TRUE
endif iCount.Add(1) endrepeat
7
// If it's a Confidential Document, save it and send warning message if (bConfDoc) then
with SaveToFile .input=original.document .Path="c:\ebc.txt" .AppendTimestamp=TRUE .Overwrite=FALSE .SaveUserData=FALSE .Go() endwith
with EmailSMTP .Server="mail.server.com" .To= Submitter .From="mailcheck@abcxyz.com" .Subject="Invalid Email Rejected" .Message="Cannot email a confidential document" .CharacterSet=LDD_SMTPCHARSET_US .Go()
endwith else
with EmailSMTP .Server="mail.server.com" .To="Receiver@abcxyz.com" .From=Submitter .Subject="Scanned Document" .Message="Here is the document you requested" .CharacterSet=LDD_SMTPCHARSET_US .Attachments=original.document .Go()
endwith endif
8

Operators

Mathematical

These operators are used to set or change the value of a variable or property.
Operator Symbol Description
Addition + For integer and real objects, this
Subtraction - For integer and real objects, this
Multiplication * For integer and real objects, this
Division \ For integer and real objects, this
adds the numbers on both sides of the "+" and returns the new value. For string objects, this has a similar affect as the concatenate method. It appends the string on the right to the string on the left and return the new string. For document objects, it appends the document on the right to the document on the left and return the new document. In all cases, the variables on either side remain unchanged.
subtracts the number on the right from the number on the left and return the new value. The variables on either side remain unchanged. It is not valid for any other object types.
multiplies the numbers on both sides of the " * " and return the new value. The variables on either side remain unchanged. It is not valid for any other object types.
divides the number on the left by the number on the right and return the new value. The variables on either side remain unchanged. It is not valid for any other object types.
Modulo % For integer objects, this divides the
number on the left by the number on the right and return the remainder. The variables on either side remain unchanged. It is not valid for any other object types. For example, 5/2 returns 1 since 5 / 2 is 2 with remainder 1.
9

Comparison

These operators are used to compare the values of variables or properties of the same type. The result of the comparison is a boolean value (TRUE or FALSE). Any of the symbols listed for an operator can be used.
Operator Symbols Description
Less Than <, LT For integers and reals, returns TRUE if the value
Greater Than >, GT For integers and reals, returns TRUE if the value
Less Than or Equal To <=, LE For integers and reals, returns TRUE if the value
Greater Than or Equal To >=, GE For integers and reals, returns TRUE if the value
Equal To == , EQ
(double equal sign)
Not Equal To !=, <>, NE For integers and reals, returns TRUE if the value
on the left is less than the value on the right. For strings, returns TRUE if the value on the left comes alphabetically before the value on the right (including case). Returns FALSE otherwise.
on the left is greater than the value on the right. For strings, returns TRUE if the value on the left comes alphabetically after the value on the right (including case). Returns FALSE otherwise.
on the left is less than or equal to the value on the right. For strings, returns TRUE if the value on the left comes alphabetically before or is the same as the value on the right (including case). Returns FALSE otherwise.
on the left is greater than or equal to the value on the right. For strings, returns TRUE if the value on the left comes alphabetically after or is the same as the value on the right (including case). Returns FALSE otherwise.
For integers and reals, returns TRUE if the value on the left is equal to the on the right. For strings, returns TRUE if the value on the left is exactly the same (including case) as the value on the right. Returns FALSE otherwise.
on the left is not equal to the on the right. For strings, returns TRUE if the value on the left is not exactly the same (including case) as the value on the right. Returns FALSE otherwise.
10

Boolean

These operators are used to build complex boolean expressions. Each value on either side of the operator must be a boolean value. The result of the boolean operator is a boolean value (TRUE or FALSE). Any of the symbols listed for an operator can be used.
Operator Symbols Description
And &, &&, AND ANDs two boolean values to get the final boolean
Or |, ||, OR ORs two boolean values to get the final boolean
Not !, NOT NOTs a boolean value to get the final boolean
result.
result.
result.
The following table shows the results of the AND and OR methods using:
bool1 AND bool2
bool1 OR bool2
bool 1 bool2 AND OR
FALSE FALSE FALSE FALSE
FALSE TRUE FALSE TRUE
TRUE FALSE FALSE TRUE
TRUE TRUE TRUE TRUE
11

Other Features

Object shorthand using "with"

If you have a section code that is working with the same object, it can be cumbersome to continually type the object name. To avoid this, you can use the with statement. The general format is:
with objectname
.property = value .property = value .method()
endwith
You state the object name being used in the with statement and then you can refer to any property or method of the object by simply using the "dot" followed by the property or method name. This is most commonly used with the action objects.

Debugging a script

When a script executes, the action objects can write error and warning messages to the log. You can also write your own messages to the log to help debug your script.
For example, you may want to know the value of a variable or the return value of a method. To write your message to the log use the "debug" statement.
debug msg
msg can be a string variable, a string in quotes, or a numeric expression. Below are some examples:
int index= 3 string ErrorMsg = "Failed to print" debug index debug ErrorMsg debug "Job received from " + original.username
Each of these writes a message to the server log.

Prompting for values during compilation

There may be circumstances when you do not want the sensitive data (such as userids or passwords) to appear in the script for everyone to see. In that case, you can prompt for the data during script compilation. This data is not visible in the script itself and it does not exist in an uncompiled form. To use this feature, you use the preprocessor prompt directive:
#prompt{prompt msg}
The prompt message you want displayed is placed between the braces ( {} ). You cannot use a string variable here and the text should not be in quotes. This is because the prompt is processed before the compiler is in use and thus you cannot use other objects. The value returned by the prompt is a string and contains whatever text was entered by the user.
The prompt can be placed anywhere a string is expected, such as:
FTPget.username = #prompt{Enter your FTP username}
12
If the prompt is used where a number is expected, assign a string to the value returned by the prompt and then use the AsInt method. For example:
string copies = #prompt{Enter number of copies} PrintIP.copies = copies.AsInt()

Aborting a script during runtime

If you detect an error condition during script execution, it is useful to have a means of halting the script processing. To accomplish this, you use the exit function:
void exit(string msg)
The exit function halts processing of the script. It lets you pass a string which appears in the server’s log as well as on the confirmation page/dialog.

Reserved words

A variable may not be any reserved word that already has a special meaning in the script language. The following is the list of reserved words:
If
Then
Else
Endif
Switch
Case
Default
Endswitch
Loop
Exit
From
To
Endloop
Repeat
Until
Endrepeat
String
Textfile
Int
Confirm
Doc
Bool
Binary
BinaryFile
Original
Real
Endwith
Userdata
Log
Prompt
13
2

Data Type Objects

All data used by the Document Distributor can be grouped into five distinct data types:
Boolean
Document
Integer
Real
String
Every object property is one of the Data Type Objects. In addition, most variables are one of these types. Following is a discussion of each of these objects.
14

Boolean

The Boolean object is used for values that are logically true or false. The only valid values for this variable are the reserved words: TRUE and FALSE.
The object has no properties. The following operators are supported:

Operators

Symbol Description
==, EQ Equals
<> Not Equal
&, AND And
|, OR Or
!, NOT Not
= Assignment
15

Document

The document object is used to hold a collection of image, text, and other formatted files. All files in a document object do not have to be of the same type; it can be used to hold different files of different types.
A property or variable is of this type when declared as doc. The document object has no properties.

Methods

Syntax Description
bool AddDocument(doc doc1) Adds an existing document to the end of this document.
Parameters:
doc1 – document to be added
Returns:
A bool indicating success or failure.
bool AddFile(string path [, string type]) Adds an existing file to the end of this document. This method
will fail if the file does not exist or could not be read. Parameters:
path – fully qualified path of the file on the server to be added
type – if not supplied, the file type will be set to the extension of the file being added; otherwise, the value supplied will be used.
Returns:
A bool indicating success or failure.
void Clear() Removes all files from the document.
Parameters:
None
Returns:
None
doc CopyRange(int start, int end) Copies the specified files in this document to a new document;
this actually makes a copy of the files so two copies of the files now exist. Doing this allows changes to be made to one set of the files without affecting the other set.
Parameters:
start – index of the first file in document to copy; file indexes start at 1
end – index of the last file in document to copy
Returns:
A doc that contains a copy of the files in the specified range.
16
Syntax Description
doc Copy() Copies all the files in this document to a new document; this
int GetDocumentSize() Returns the total size in bytes of all the files in this document.
string GetDocumentType() Returns the type (file format or extension) of the document. If
doc GetFile(int filenum) Returns a reference to the specified file; the returned
string GetFileLabel(int filenum) Returns the label for the specified file. The label is used as the
int GetFileSize(int filenum) Returns the size in bytes of the specified file. A value of zero
actually makes a copy of the files so two copies of the files now exist. Doing this allows changes to be made to one set of the files without affecting the other set.
Parameters:
None
Returns:
A doc that contains of the copy all the files.
A size of zero (0) is returned if no files are in the document.
Parameters:
None
Returns:
An int with the total number of bytes in this document.
all the files in the document are the same type, the value is the document type; otherwise, the value is an empty string.
Parameters:
None
Returns:
A string containing the document type (file format or extension) of the document.
document is not a copy, so any change made to this file affects the original. An empty document is returned if filenum is invalid.
Parameters:
filenum – index of file to get; file indexes start at 1
Returns:
A doc containing a reference to the specified file.
filename (minus the extension) for attachments in e-mails or databases. An empty string is returned if filenum is invalid.
Parameters:
filenum – index of file label to get; file indexes start at 1
Returns:
A string containing the label of the specified file.
(0) is returned if filenum is invalid. Parameters:
filenum – index of file size to get; file indexes start at 1
Returns:
An int containing the size in bytes of the specified file.
17
Syntax Description
string GetFileType(int filenum) Returns the type (file format or extension) of the specified file.
doc GetFileRange(int start, int end) Returns a reference to the specified files; the returned
int GetNumberFiles() Returns the number of separate files in this document. This
bool SetFileLabel(int filenum, string label) Sets the label for the specified file; this label is used as the
An empty string is returned if filenum is invalid.
Parameters:
filenum – index of file type to get; file indexes start at 1
Returns:
A string containing the value of file type of the specified file.
document is not a copy, so any change made to these files affects the original.
Parameters:
start – index of first file to get; file indexes start at 1 end – index of last file to get
Returns:
A doc containing a reference to the specified files.
does not return the number of pages. Parameters:
None
Returns:
An int with the number of files in this document.
filename (minus the extension) for naming attachments in e-mail or databases. This method fails if filenum is invalid.
Parameters:
filenum – index of file; file indexes start at 1
label – label to give specified file; since it is used as a filename, the label must follow the rules of file naming.
Returns:
A bool indicating success or failure.
void SetFileLabelAll(string label) Sets the labels of all the files in this document; this label is
used as the filename (minus the extension) for naming attachments in e-mail or databases.
Parameters:
label – label to give all the files; since it is used as a filename, the label must follow the rules of file naming.
Returns:
None
Note: For variables of type doc, assigning the variable is simply a reference. In other words, both
variables point to the same physical set of files that make up the document. So when you make a change to one of the files, that file is changed in both documents. To make different working copies of the files, use the Copy or CopyRange methods of the doc object.
18

Operators

Symbol Description
+ Add (same as calling AddDocument)
[] Index (same as calling GetFile using that one file)
= Assignment (same as calling GetFileRange using all files)
19

Integer

The integer object is used for values that are numbers without decimal points.
A property or variable is of this type when declared as int. The object has no properties.

Methods

Syntax Description
void Add(int num) Adds num to the current value. The value of this object
real AsReal() Converts and returns the current value of this object as
string AsString() Returns the current value of this object as a string.
void Divide(int num) Divides the current value by num. The value of this
is changed.
Parameters:
num – integer to be added to current value
Returns:
None
a real object. The value of this object is not changed. Parameters:
None
Returns:
A real with the value of this object.
This is typically used so that the value of the integer can be used as part of a string.
Parameters:
None
Returns:
A string with the value of this object.
object is changed.
Parameters:
num – integer to divide by
Returns:
None
void Mod(int num) Divides the current value by num and sets the value of
void Multiply(int num) Multiplies the current value by num. The value of this
this object to the remainder.
Parameters:
num – integer to divide by
Returns:
None
object is changed. Parameters:
num – integer to multiply by
Returns:
None
20

Operators

Symbol Description
<, LT Less Than
>, GT Greater Than
<=, LE Less Than or Equal To
>=, GE Greater Than or Equal To
==, EQ Equals
<>, NE, != Not Equal
+Add
- Subtract
*Multiply
/ Divide
% Modulo (Remainder)
= Assignment
Examples
Statement Value of X Comment
int x 0 Declares variable x = 5 5 Assigns value of 5 to x x.Mod(2) 1 5/2 is 2 with remainder
1 x.Add(9) 10 x.Subtract(2) 8 x.Multiply(2) 16 x.Divide(8) 2 x.AsReal() 2 Returns 2.0 x.AsString() 2 Returns "2"
Note: The standard mathematical operators (+, -, *, /) can also be used.
21

Real

The real object is used for values that are numbers with decimal points. A property or variable is of this type when declared as: real. The object has no properties.

Methods

Syntax Description
void Add(real num) Adds num to the current value. The value of this object
int AsInt () Converts and returns the current value of this object as
string AsString() Returns the current value of this object as a string.
void Divide(real num) Divides the current value by num. The value of this
is changed.
Parameters:
num – real to be added to current value
Returns:
None
an int object. The value is not rounded; any numbers after the decimal point are truncated. The value of this object is not changed.
Parameters:
None
Returns:
An int with the value of this object.
This is typically used so that the value of the real can be used as part of a string.
Parameters:
None
Returns:
A string with the value of this object.
object is changed.
Parameters:
num – real to divide by
Returns:
None
void Multiply(real num) Multiplies the current value by num. The value of this
object is changed.
Parameters:
num – real to multiply by
Returns:
None
22

Operators

Symbol Description
<, LT Less Than
>, GT Greater Than
<=, LE Less Than or Equal To
>=, GE Greater Than or Equal To
==, EQ Equals
<>, NE, != Not Equal
+Add
-Subtract
*Multiply
/ Divide
= Assignment
23

String

The string object is used for values that are text. A property or variable is of this type when declared as: string. The object has no properties.

Methods

Syntax Description
string AsAlphaNumeric() Converts and returns the current value of the string as
doc AsDoc() Returns the current value of this as a document. The
int AsInt() Returns the current value of the string as an integer.
a string that contains only the alphabetic and numeric characters of the current value; all other characters are removed. The value of this string is not changed.
Parameters:
None
Returns:
A string that contains only the alphabetic and numeric characters in the current string.
document has one file that contains the current value of this string as its text.
Parameters:
None
Returns:
A doc with the current value of this string as its text.
The current value is read up to the first non-numeric character. The returned value is zero (0) if the string is empty or the first character is not numeric. The value of this string is not changed.
Parameters:
None
Returns:
An int with the current value of the string as in integer.
string AsLower() Converts and returns the current value of this string in
all lowercase letters. Any non-alphabetic characters are not changed. The value of this string is not changed.
Parameters:
None
Returns:
A string with the current value converted to all lowercase letters.
24
Syntax Description
string AsUpper () Converts and returns the current value of this string in
bool Compare(string string1) Compares the current value of this string to the one
bool CompareNoCase(string string1) Compares the current value of this string to the one
all uppercase letters. Any non-alphabetic characters are not changed. The value of this string is not changed.
Parameters:
None
Returns:
A string with the current value converted to all uppercase letters.
provided. This comparison is case sensitive. Parameters:
string1 – string to which the current value of this string is compared
Returns:
A bool with a value of TRUE if the strings are the same including the case of alphabetic characters; otherwise, FALSE.
provided. This comparison is not case sensitive.
Parameters:
string1 – string to which the current value of this string is compared
Returns:
A bool with a value of TRUE if the strings are the same excluding the case of alphabetic characters; otherwise, FALSE.
void Concatenate(string string1) Appends string1 to the current value of this string.
Parameters:
string1 – string to append
Returns:
None
int Find(string substring, int start) Searches the current value of this string for the first
int Length() Returns the number of characters in this string.
occurrence of the specified substring.
Parameters:
substring – the substring to search for start – the index of the character in this string to
start the search at; a value of 1 starts the search at the beginning
Returns:
An int indicating the start position of the substring in this string; 0 if the substring is not found.
Parameters:
None
Returns:
An int containing the number of characters in string.
25
Syntax Description
string Left(int count) Returns the first count characters of this string. If
string Mid(int start, int count) Returns a substring of the current string of length
string Right(int count) Returns the last count characters of the string. If count
array Separate(string separator) The current value of the string is searched for the
count is more than the length of the string, the entire string is returned.
Parameters:
count – the number of characters to get
Returns:
A string containing the first count characters of the current value.
count beginning at the start character. String indexes start at 1.
Parameters:
start – the index of the first character to include in the substring
count – the number of characters to include in the substring; a value of zero (0) indicates the rest of the characters in the string
Returns:
A string that is a substring of the current value and contains the characters in the specified range.
is more than the length of the string, the entire string is returned.
Parameters:
count – the number of characters to get
Returns:
A string containing the last count characters of the current value.
separator string; every time it is found, a new string is formed minus the separator value. When the end of the string is reached, the remaining portion of the string is added as the last item in the array. If the separator is not found, the entire string is returned as the first item in the array.
Parameters:
separator – the string used as the separator value
Returns:
An array of strings with each item being a string minus the separator.
26
Syntax Description
void TrimLeft() Removes any whitespace from the beginning of the
void TrimRight () Removes any whitespace from the end of the string.
string. Whitespace is any newline, space, or tab characters. The value of the current string is changed.
Parameters:
None
Returns:
None
Whitespace is any newline, space, or tab characters. The value of the current string is changed.
Parameters:
None
Returns:
None

Operators

Symbol Description
<, LT Less Than (compares using case)
>, GT Greater Than (compares using case)
==, EQ Equals (compares using case)
<>, NE Not Equal (compares using case)
+ Concatenate
Examples: For string, str, with a value of "ABC123abc:789":
str.AsAlphaNumeric() str.AsInt() str.AsLower() str.AsUpper() str.Contains("123") str.Find("123", 1) str.Length() str.Left(5) str.Mid(6, 4) str.Right(4)
returns
returns
returns
returns
returns
returns
returns
returns
returns
returns
"ABC123abc789" 0 "abc123abc:789" "ABC123ABC:789" TRUE 4 13 "ABC12" "3abc" ":789"
27
Escape Characters
There are some characters that are needed in strings that cannot be represented using normal characters. To accommodate these characters, string objects support the following escape characters.
Symbol Description
^n Windows new line
^l Unix line feed
^r Unix carriage return
^t Tab
^^ Caret
^xdd Hex
^" Put quote in string
To use these, simply include the escape character within the quotes. For example:
string str = "Line 1^nLine2^tTab to next column" string msg = "This is the ^"first^" quoted string.
28
3

Helper Objects

Helper objects are provided to help perform some common operations. Currently, there are two objects of this type:
Array
Tex tF il e
To use a helper object, declare a variable of the specific object type.
29

Array

The array object is used to contain a collection of strings. The array index begins at 1. This is object is read-only; no items can be added, edited, or deleted from the array. The values get added by calling a method that returns an array such as the Separate method of the string object.
A variable is of this type when declared as: array. The array object has no properties.

Methods

Syntax Description
string GetAt(int index) Returns the string at the specified index. If an invalid
int GetSize() Returns the number of items in the array.
index is specified, an empty string is returned.
Parameters:
index – the string in the array to get; indexes start at 1
Returns:
The string at the specified index.
Parameters:
None
Returns:
An int with the number of items in the array.
Example: For a string, str, that has a value of "Bill,Jane,John,Jill". If you call the separate method of
the string object, it returns an array with each entry being one of the names.
array a string str = "Bill,Jane,John,Jill"
a = str.Separate(",")
a.GetSize() returns 4 a[1] or a.GetAt(1) returns "Bill" a[2] or a.GetAt(2) returns "Jane" a[3] or a.GetAt(3) returns "John" a[4] or a.GetAt(4) returns "Jill"
30

Textfile

The textfile object is used to operate on a single text file; it cannot work with images or multiple files. It can be used to read text from an existing file or to write out text to a new or existing file for use by some other process,.
A variable is of this type when declared as: textfile. The object has no properties.

Methods

Syntax Description
bool Append(string text) Appends text to the end of the file. The file pointer is
bool AppendLine(string text) Appends text to the end of the file and inserts a new
bool Clear() Deletes the contents of the file. The method fails if a
moved to the end of the appended text. The method fails if a file has not been opened or is out of disk space.
Parameters:
text – data to append to file
Returns:
A bool indicating success or failure.
line at the end of the specified text. The file pointer is moved to the end of the appended text after the new line. The method fails if a file has not been opened or is out of disk space.
Parameters:
text – data to append to file
Returns:
A bool indicating success or failure.
file has not been opened.
Parameters:
None
Returns:
A bool indicating success or failure.
void Close() Closes the file associated with this object.
Parameters:
None
Returns:
None
bool Eof() Checks if the file pointer is at the end of the file.
Returns TRUE if the end of file has been reached; otherwise, FALSE.
Parameters:
None
Returns:
A bool indicating if the file pointer is at the end of the file.
31
Syntax Description
string GetLine(int line) Returns the line of text specified by line with any new
int GetNumberLines() Returns the number of lines in the file. A line ends
bool Open(string file, bool create) Opens the specified file and sets the file pointer to the
line removed from the returned string. A line ends when a new line is encountered. This method does not move the file pointer. If line does not exist or a file is not opened, an empty string is returned.
Parameters:
line – the line of text to get
Returns:
A string containing the specified line of text minus the new line.
when a new line is encountered. This method does not move the file pointer. A zero (0) is returned if a file has not been opened.
Parameters:
None
Returns:
An int with the number of lines of text in this file.
beginning of the file. If the file does not exist and create is set to TRUE, the file will be created; otherwise, the file will not be created and the method will fail. The method can also fail if the any directories in the path do not exist or if the path is on a network drive to which the Document Server does not have access rights.
Parameters:
file – fully qualified path of the file to open create – specifies whether to create the file if it
does not exist
Returns:
A bool indicating whether the file was successfully opened.
bool Open(doc doc1) Opens the first file in the specified document and sets
the file pointer to the beginning of the file. Typically called to use a file created by another action. The method fails if the specified document has no fails.
Parameters:
doc1 – document to open
Returns:
A bool indicating whether the file was opened successfully.
32
Syntax Description
string Read(int count) Returns count characters from the file starting at the
string ReadLine() Returns the next line from the file. The file pointer
bool Rewind() Moves the file pointer to the beginning of the file. This
current file pointer position. The file pointer is moved to after the last character read. If count is greater than the remaining characters in the file, the characters up to the end of the file are returned. If a file is not opened or the file pointer is at the end of the file, an empty string is returned.
Parameter:
count – number of characters to read
Returns:
A string with the specified characters read from the file.
advances until a new line character is encountered. The returned string does not include the new line character. If a file is not opened or the file pointer is at the end of the file, an empty string is returned.
Parameters:
None
Returns:
A string containing the next line of text from the file.
method fails if a file is not opened. Parameters:
None
Returns:
A bool indicating success or failure.
int Size() Returns the size in bytes of the text file. A zero (0) is
returned if a file is not open.
Parameters:
None
Returns:
An int with the size of the file in bytes.
33
Syntax Description
bool Write(string data) Writes data to the text file at the current file pointer
bool WriteLine(string data) Writes data to the text file at the current file pointer
position. The file pointer moves to after the last character written. This method fails if a file is not open or if there is a lack of disk space.
Parameters:
data – string to write to the text file
Returns:
A bool indicating success or failure.
position. A new line character is written after data. The file pointer moves to after the new line character. This method fails if a file is not open or if there is a lack of disk space.
Parameters:
data – string to write to the text file
Returns:
A bool indicating success or failure.
Example:
You have a file called "data.txt" in the root c:\ directory. You want to read in the whole file.
textfile tf string data int size
tf.Open("c:\data.txt", FALSE) size = tf.GetSize() data = tf.Read(size) tf.Close()
34
Example:
You want to save the userdata that was submitted with the job to an xml file for later processing. The file should be save to a data directory with each file named the usertime to insure a unique name.
textfile tf string data
tf.Open("c:\data\" + original.usertime + ".txt", TRUE) tf.WriteLine("<? xml version=’1.0’>") tf.WriteLine("<metadata>") data = "<account number=’" + userdata.acct + "’>" tf.WriteLine(data) data = "<copies number=’" + userdata.copies.AsString() + "’ />" tf.WriteLine("</account>") tf.WriteLine("</metadata>") tf.WriteLine(data) tf.Close()
The data file produced by this would like:
<? xml version="1.0"> <metadata>
<account number="12345">
<copies number="1" />
</account>
</metadata>
35
4

System objects

The system objects enable you to get information about the originally submitted document or about the user that submitted the job. They also allow you to customize the feedback provided to end-users that submit jobs. The following system objects are supported:
originalprovides information about the submitted document and the user that submitted it
userdatacontains values entered by the user when the job was submitted
confirmprovides an interface for adding information to the confirmation page or dialog the
user sees when the job has completed
System objects cannot be declared as variables and no object properties of this type exist. These objects automatically exist for every script. To use one, simply use the object type followed by a dot and then the property or method name.
36

Original

The Original object contains the document that was submitted for the job along with any other known information about the document. The properties of the object are read-only; therefore, they cannot be changed in the script. The object contains no methods. To access the properties, type:
original.propertyname
The following are properties of the Original object.
Property Type Description
document doc The document that was submitted with the job; if the
userip string The ip address of the device (MFP or user’s
username string The username of the user that submitted the request.
useracct string If job accounting is enabled on an MFP, this is the
usertime string The time the job was submitted by the gateway to the
scriptname string The name of the script currently being executed.
script options were set such that no document was required, this property is not available.
workstation) that submitted the job.
If submitted from an MFP that does not provide authentication or on which authentication is not enabled, this value is "MFP User".
account number entered. For those MFPs without job accounting or if the job is submitted from a workstation, this value is (" ").
Document Server. This is the same time used for all actions with the AppendTimestamp property.
37
The following properties are only available if the document was submitted through an MFP.
Property Typ e Value s Description
scansize string LETTER
LEGAL
A3
A4 A5
B4
B5 BOOK
EXECUTIVE
11X17 3x5 PHOTO
4x6 PHOTO
BUSINESS CARD
scanorient string Landscape, Portrait The orientation of the scanned document
scanres* real The resolution of the scanned document.
scandepth int Black & White = 1
Grayscale = 8
Color = 24
scanpages int The number of pages in the scanned
scanrotateodd int 0, 90, 180, 270 The number of degrees odd pages must
The paper size of the scanned document.
as set by the profile.
See note below table.
The color depth of the scanned document.
document.
be rotated in order to achieve the orientation requested by the profile.
scanrotateeven int 0, 90, 180, 270 The number of degrees even pages
must be rotated in order to achieve the orientation requested by the profile.
Note: *The scanres property returns the value specified for the resolution in the scan profile.
Please note that in some cases the actual resolution of the image may be different. This can happen when the requested resolution results in an image that would be too large for the scanner to hold in memory. In this case, the resolution is automatically lowered.
38

Userdata

The userdata object contains any values entered by the user at the time the job was submitted. When you write a script, one of your options is to prompt users for information when they submit a job. This object provides access to that information.
The userdata object contains no methods; its properties are defined by you when declaring the information to be requested from the user. For each question you add, you assign a variable name and data type to that question. That variable name becomes one of the userdata objects properties; the users response to the question is stored in that property.
To access the userdata properties, use:
userdata.propertyname
For example, suppose you want to prompt the user for an account number (a string) and for the number of copies being made (an integer). When defining the questions, you assign the variable name of acccountnum for the account number and the variable name of copies to the number of copies being made. To access these values, you would use:
string acct int copies acct = userdata.accountnum copies = userdata.copies
While the above example uses variables to hold the values, you dont have to do this to use the values. Since you defined a data type for each property when defining the questions, the userdata property can be used wherever a value of that data type can be used.
39

Confirm

The confirm object allows you to control the information that appears on the confirmation page (for jobs submitted by way of an MFP) or the confirmation dialog (for jobs submitted by way of Print‘N’Send or Select‘N’Send). These confirmation pages/dialogs appear after the job has been processed. You can set the default behavior for all scripts by modifying the Server Settings in the Document Server Admin.
Sometimes it might be necessary to override the default settings from within a script; you can use the confirm object to do that. To access the properties and methods, use:
confirm.propertyname confirm.methodname()
The following are properties of the Confirm object.
Property Typ e Valu e Description
input doc original.document This controls the source that is used to
level int LDD_CONFIRM_OFFNo
confirmation page/dialog is used for this script.
LDD_CONFIRM_SCRIPTThe script provides all the content for the confirmation page/dialog.
LDD_CONFIRM_ERRORAll warnings/errors are automatically added to the confirmation page/dialog; the script provides all other content.
LDD_CONFIRM_VERBOSE All action objects automatically add information after being executed in addition to any other warnings/errors.
printmfp int LDD_CONFIRM_NEVERA
confirmation page never prints.
LDD_CONFIRM_ALWAYSA confirmation page always prints.
LDD_CONFIRM_ONERRORA confirmation page only prints if a warning/error occurs.
displayws int LDD_CONFIRM_NEVER A
confirmation dialog never displays.
LDD_CONFIRM_ALWAYSA confirmation dialog always displays.
LDD_CONFIRM_ONERRORA confirmation dialog only displays if a warning/error occurs.
thumbs int 0 to 3 Controls the number of thumbnail images
generate the thumbnails on the confirmation page.
This controls the type of confirmation page/dialog that should be used for the script. By default, the value set in the server settings is used.
Controls whether a confirmation page should be printed for jobs submitted by way of MFP. The default value is always to print.
Controls whether a confirmation dialog box is displayed on the computer of the user that submitted the job after it completes. By default, the dialog is always displayed.
that appear at the bottom of confirmation pages. By default, the value set in the server settings is used.
40
The following are methods for the Confirm object.
Syntax Description
void Reset() Causes all the properties in this object to be set back to the value specified
void AddItem(string title, bool success, string msg [, string err])
void Clear() Removes all items added to the confirmation page by the Daytime method
in the server settings.
Adds a line to the end of the confirmation page / dialog. If called multiple times, each line is added in the order this method is called.
Parameters:
title – the short title that appears in the first column of the page / dialog
success – indicates success or failure of this line. If set to TRUE, Completed appears in the second column; otherwise, “Fail ed appears.
msg – a longer description that appears in the third column err – an optional parameter; when specified, this text appears after
the success word in the second column. This is usually used for an error or warning message.
Returns:
None
or by any other object.
Parameters:
None
Returns:
None
For the following examples, assume the default behavior for Confirmation Pages/Dialogs is confirm level set to verbose and to always print and display.
For script A, you want all pages/dialogs turned off. At the beginning of the script, you would add the following line:
confirm.level = LDD_CONFIRM_OFF
For script B, you want confirmation pages turned off, but the confirmation dialogs to still be displayed. At the beginning of the script, you would add:
confirm.printmfp = LDD_CONFIRM_NEVER
41
For script C, you want to use the default comments except when you are inside a loop. You need to change the level to script before the loop, add your own comments, and then reset the level back to verbose following the script. To do this, you would add:
(other script processing)
confirm.level = LDD_CONFIRM_SCRIPT
loop (x from 1 to 5) (print copies) endloop
confirm.AddItem("Print", TRUE, "Copies sent to marketing") confirm.level = LDD_CONFIRM_VERBOSE
(continue script processing)
These examples show various ways the confirm object can be used to augment the behavior specified in the Confirmation Page Settings on a script-by-script basis.
42
5

Action objects

Many action objects create a new document as a result of their operation. If an action has a property named output, it produces a new document during its execution. This document, however, does not exist until after the Go method has been called. Before calling Go the first time, it is simply an empty document. This new output document is only available while the script executes; if you need to use it after the script is done, an action that saves or archives the document needs to be included in the script.
The rest of this chapter discusses available action objects.
43

ConvertBarcodeToText

Purpose: Read one or more barcodes of a specified type on a single page. To read barcodes of different formats from one page, this action must be used multiple times. The action fails if no barcodes of the specified type are located on the page.
Install group: Barcode CD
Prerequisites: None
Properties
Name Description Data type Additional information
Input The source document for
the action.
Output The document to which
this action’s output is written.
Type Type of barcode to be
read.
PageNumber Page to read for barcodes. int A value of 0 can be used to
WholePage Reads all barcodes on the
whole page. (The barcodes must be of the same type).
Left Specifies (in pixels) the left
side of the area to read.
doc Only one page of the
doc The output is ASCII text
int (LDD Constant)
bool Set this to FALSE if only one
int Value is only used when
document can be read.
terminated by a new line character.
See Barcode Reference on page 189.
Default:
LDD_BARCODE_CODE39
indicate the last page.
Default: 1
area of the page should be read.
Default:
TRUE
WholePage is set to FALSE.
Default: 0
Top Specifies (in pixels) the top
of the area to read.
Right Specifies (in pixels) the
right side of the area to read.
Bottom Specifies (in pixels) the
bottom of the area to read.
Bold names are required properties.
44
int Value is only used when
WholePage is set to FALSE.
Default:
0
int Value is only used when
WholePage is set to FALSE. Default:
0
int Value is only used when
WholePage is set to FALSE.
Default: 0
Methods
Syntax Description
bool Go() Executes the action. Returns TRUE or FALSE to
void Reset() Clears the current properties and returns them to their
indicate if the action completed successfully.
default values.
Notes:
ConvertBarcodeToText reads only one page from a document at a time. Use the PageNumber parameter to specify which page to read a barcode from. To read barcodes from more than one page, use the ConverBarcodeToText action multiple times.
The values for Right, Left, Top, and Bottom depend on the scan resolution used to acquire the
document. Determine the scan resolution needed, determine the pixel positions needed to bound the area, and then use the same scan resolution for all profiles that use the script.
The ConvertBarcodeToText action is sensitive to scan quality. A scan resolution of 300 dots
per inch (dpi) typically provides good results. A resolution greater than 600 dpi is not recommended.
Images that are too dark decrease the accuracy of the barcode read. Profiles with a darkness
setting of 3 or less are recommended.
For best results, use a monochrome image with this action. This allows the best detection of
the spaces within a barcode, resulting in greater accuracy.
If you want to read only a specific area of a page, set WholePage to FALSE. For example, you
can scan invoices, read the invoice number from a barcode in the right-hand corner and use that invoice number as the filename to store the invoice.
The output from this action is text followed by a new line character. Depending on what the
output is used for, this new line character may need to be removed from the text prior to using it.
If you want to read multiple barcodes at once, use the ConvertForm action.
45

ConvertForm

Purpose: Using a data map created by FastMap, read a one page form for information such as barcodes, check boxes, and typed text. For information about using FastMap, see the documentation available from the FastMap application Help menu.
Install group: OCR and Barcode CDs
Prerequisites: None
Properties
Name Description Data type Additional information
Input The source data for the
action.
Output The document to which
this action’s output is written.
DataMap Name of the data map to
use when reading the form.
Bold names are required properties.
doc Only the first page of the
document will be read.
doc The output is the ASCII
text read from the specified zones. Each zone is written on a single line.
string This is the name given to
the data map when it was created with the FastMap Utility.
Methods
Syntax Description
bool Go() Executes the action. Returns TRUE or FALSE to
indicate if the action completed successfully.
void Reset() Clears the current properties and returns them to their
default values.
46

ConvertImageFormat

Purpose: Converts one or more image files to the specified file format. To convert an image to PostScript or PDF format, use the ConvertToDocument action.
Install group: Image Module
Prerequisites: None
Properties
Name Description Data type Additional information
Input The source document for
the action.
Output The document to which
this action’s output is written.
Format The output format of the
conversion.
ColorDepth The number of bits to
use for color or grayscale.
doc Must be in an image format.
doc Output is in the specified
int (LDD Constant)
int (LDD Constant)
format.
Valid values:
LDD_IMGFORMAT_TIF
LDD_IMGFORMAT_TIFG3 LDD_IMGFORMAT_TIFG4
LDD_IMGFORMAT_TIFPB
LDD_IMGFORMAT_BMP LDD_IMGFORMAT_JPG
LDD_IMGFORMAT_PJPG
LDD_IMGFORMAT_PCX LDD_IMGFORMAT_DCX
LDD_IMGFORMAT_PNG
LDD_IMGFORMAT_EPS Default:
LDD_IMGFORMAT_TIF
Valid value: LDD_IMGDEPTH_BW
LDD_IMGDEPTH_4C
LDD_IMGDEPTH_8C LDD_IMGDEPTH_8G
LDD_IMGDEPTH_24C
LDD_IMGDEPTH_24G Default:
LDD_IMGDEPTH_BW
JPEGQuality Specifies the amount of
JPEG compression used. The higher the number the better the quality but the larger the file.
AllPages Converts all pages in the
input.
Bold names are required properties.
47
int Valid value:
5–95
Default:
95
bool Default:
TRUE
Name Description Data type Additional information
StartPage First page to convert. int Value is only used when
EndPage Last page to convert. int Value is only used when
Bold names are required properties.
AllPages is set to FALSE.
Valid value: 0–32767
Default:
0
AllPages is set to FALSE. Value of 0 indicates the last page in the file.
Valid value:
0–32767 Default:
0
Methods
Syntax Description
bool Go() Executes the action. Returns TRUE or FALSE to
indicate if the action completed successfully.
void Reset() Clears the current properties and returns them to their
default values.
Inputs/Outputs
This action can convert images to Encapsulated PostScript. However, it cannot convert an Encapsulated PostScript file to another format. If the output of this action will be used by the PrintIP or FaxByPrinter actions, it is recommended that the ConvertToDocument action be used to create the PostScript file.
Some output formats, such as TIFF Group3 or TIFF Group4 do not support color images. See “Valid conversion formats on page 50 for the list of color depths supported by each format.
48
Default color depths
If the color depth of the output file specified in the script is not valid, the action chooses a proper default value for that format and completes the conversion. The following table lists the default color depth for different image formats.
Image format Default color depth
PostScript (*.ps) 8-bit Grayscale
TIFF Group 4 (*.tif) Black and White
TIFF Group 3 (*.tif) Black and White
TIFF Packed Bits (*.tif) 8-bit Color
TIFF Uncompressed (*.tif) 8-bit Color
Bitmap (*.bmp) 8-bit Color
Windows PCX (*.pcx) 8-bit Color
Windows DCX (*.dcx) 8-bit Color
JPEG (*.jpg) 24-bit Color
Progressive JPEG (*.jpg) 24-bit Color
PNG (*.png) 8-bit Color
Multipage image formats
The image formats of TIFF and DCX can contain multiple pages in a single file. All other image formats can contain only one page per file. If you convert a TIFF or DCX image with multiple pages to a format that can contain only one page per file, the result will be one new file for each page in the original multipage file.
49
Valid conversion formats
File type Valid conversion
Bitmap Black and White
4-bit Color 8-bit Grayscale
8-bit Color
24-bit Grayscale 24-bit Color
JPG 24-bit Grayscale
24-bit Color
TIFF (Uncompressed) Black and White
4-bit Color
8-bit Grayscale 8-bit Color
24-bit Grayscale
24-bit Color
TIFF (Packed Bits) Black and White
4-bit Color
8-bit Grayscale 8-bit Color
24-bit Grayscale
24-bit Color
TIFF (Group 3) Black and White
TIFF (Group 4) Black and White
EPS Black and White
8-bit Grayscale
24-bit Grayscale
24-bit Color
PCX Black and White
4-bit Color
8-bit Grayscale 8-bit Color
24-bit Grayscale
24-bit Color
DCX Black and White
4-bit Color
8-bit Grayscale 8-bit Color
24-bit Grayscale
24-bit Color
50
File type Valid conversion
PJPEG 24-bit Grayscale
24-bit Color
PNG 8-bit Grayscale
8-bit Color 24-bit Grayscale
24-bit Color
51

ConvertToDocument

Purpose: Converts one or more image files to PDF or PostScript document format.
Install group: Image Module
Prerequisites: None
Properties
Name Description Data type Additional information
Input The source document for the
action.
Output The document to which the
actions output is written.
Format Output format of the conversion.
Color images are converted in color.
PaperSize The paper size to use for the
output. If the value is LDD_PAPERSIZE_AUTO, the paper size specified in the profile used to initiate this job is used.
doc Must be in an image format.
doc
int (LDD Constant)
int (LDD Constant)
Valid values:
LDD_DOCFORMAT_PDF LDD_DOCFORMAT_PS
Default:
LDD_DOCFORMAT_PDF
Valid values:
LDD_PAPERSIZE_AUTO
LDD_PAPERSIZE_A3 LDD_PAPERSIZE_A4
LDD_PAPERSIZE_A5
LDD_PAPERSIZE_B4 LDD_PAPERSIZE_B5
LDD_PAPERSIZE_BOOK
LDD_PAPERSIZE_BUSCARD LDD_PAPERSIZE_EXECUTIVE
LDD_PAPERSIZE_LEGAL
LDD_PAPERSIZE_LETTER LDD_PAPERSIZE_PHOTO35
LDD_PAPERSIZE_PHOTO46
LDD_PAPERSIZE_TABLOID Default:
LDD_PAPERSIZE_AUTO
Orientation The orientation to use for the
output. If the value is LDD_ORIENTATION_AUTO, the orientation specified in the profile used to initiate this job is used. If the job is initiated from an LDD Client, the default value is LDD_ORIENTATION_PORTRAIT.
Bold names are required properties.
int (LDD Constant)
52
Valid values: LDD_ORIENTATION_AUTO
LDD_ORIENTATION_PORTRAIT
LDD_ORIENTATION_LANDSCAPE Default:
LDD_ORIENTATION_AUTO
Name Description Data type Additional information
PSResolution Resolution of the input. Only used
when converting to PostScript format and no resolution is provided in the profile. Jobs received from an MFP contain the resolution at which the original image was scanned. Value of LDD_RESOLUTION_AUTO indicates that the scan setting specified in the profile will be used.
AllPages Converts all pages in the input. bool Default:
StartPage Page to start the conversion. int Value is only used when AllPages is
EndPage Page to end the conversion. int Value is only used when AllPages is
Bold names are required properties.
int (LDD Constant)
Valid values: LDD_RESOLUTION_AUTO
LDD_RESOLUTION_75
LDD_RESOLUTION_150 LDD_RESOLUTION_200
LDD_RESOLUTION_300
LDD_RESOLUTION_400 LDD_RESOLUTION_500
LDD_RESOLUTION_600
Default: LDD_RESOLUTION_AUTO
TRUE
set to FALSE. Default:
0
set to FALSE. Value of 0 indicates the last page in the file.
Default:
0
Methods
Syntax Description
bool Go() Executes the action. Returns TRUE or FALSE to
indicate if the action completed successfully.
void Reset() Clears the current properties and returns them to their
default values.
53

ConvertToText

Purpose: Converts an image into the specified text format.
Install group: OCR Module
Prerequisites: None
Properties
Name Description Data type Additional information
Input The source document for
the action.
Output The document to which the
actions output is written.
Format The output format of the
conversion.
AllPages Converts all pages in the
input.
StartPage The first page to convert. int Value is only used when AllPages is set to
EndPage The last page to convert. int Value is only used when AllPages is set to
Language The language of the
document that is being converted.
doc The input document must be in TIFF,
doc
int (LDD Constant)
bool Default:
int (LDD Constant)
JPEG, PCX, DCX, PNG, or BMP format.
See Supported output formats on page 57.
Default:
LDD_TEXTFORMAT_STANDARD_WIN
TRUE
FALSE.
Default: 0
FALSE. A value of 0 indicates the last page of the file.
Default:
0
Valid values: LDD_LANG_DANISH
LDD_LANG_DUTCH
LDD_LANG_ENGLISH LDD_LANG_FINNISH
LDD_LANG_FRENCH
LDD_LANG_GERMAN LDD_LANG_ITALIAN
LDD_LANG_NORWEGIAN
LDD_LANG_PORTUGUESE LDD_LANG_SPANISH
LDD_LANG_SWEDISH
Default: LDD_LANG_ENGLISH
Bold names are required properties.
54
Name Description Data type Additional information
CharacterTypes The character types in the
document to convert.
SpellCheck Use a dictionary during
conversion to increase accuracy.
KeepFormat Keeps all the formatting of
the document, such as bold, underline, font size, spacing, and so on.
WholePage Converts the entire page
of the image. Set this to FALSE if only one area of the image should be converted.
Left Specifies (in pixels) the left
side of the area to convert.
Top Specifies (in pixels) the top
of the area to convert.
Right Specifies (in pixels) the
right side of the area to convert.
int (LDD Constant)
bool Default:
bool Default:
bool Default:
int Value is only used when WholePage is
int Value is only used when WholePage is
int Value is only used when WholePage is
Valid values: LDD_FILTER_ALLCHARS
LDD_FILTER_LETTERS
LDD_FILTER_NUMBERS Default:
LDD_FILTER_ALLCHARS
TRUE
FALS E
TRUE
set to FALSE.
Default: 0
set to FALSE.
Default:
0
set to FALSE. Default:
0
Bottom Specifies (in pixels) the
bottom of the area to convert.
Bold names are required properties.
int Value is only used when WholePage is
set to FALSE.
Default: 0
Methods
Syntax Description
bool Go() Executes the action. Returns TRUE or FALSE to
void Reset() Clears the current properties and returns them to their
indicate if the action completed successfully.
default values.
55
Notes:
The values for Right, Left, Top, and Bottom depend on the scan resolution used to acquire the
document. Determine the scan resolution needed, determine the pixel positions needed to bound the area, and then use the same scan resolution for all profiles that use the script.
The upper left corner of the page is 0,0 in pixel coordinates. Left, Top, Right, and Bottom
should be specified relative to these coordinates.
The ConvertToText action is sensitive to scan quality. A scan resolution of 400 dpi typically
provides good results. There are many different types of fonts, paper, formats and forms. Experimentation may be needed with a sample document to tune both the scan quality and subsequent OCR conversion. A resolution greater than 600 dpi is not recommended.
Extremely light text should be darkened during the scan process to increase accuracy. Images
that are too dark decrease the accuracy of the OCR conversion.
If you want to convert only a specific area of a page, set WholePage to FALSE. For example,
you can scan invoices, convert only the invoice number in the right-hand corner and use that invoice number as the filename to store the invoice.
The ConvertForm action should be used for barcodes, check boxes, and typed text.
56
Supported output formats
Format Value
ASCII Plain for DOS LDD_TEXTFORMAT_PLAIN_DOS
ASCII Plain for Windows LDD_TEXTFORMAT_PLAIN_WIN
ASCII Smart for DOS LDD_TEXTFORMAT_SMART_DOS
ASCII Smart for Windows LDD_TEXTFORMAT_SMART_WIN
ASCII Standard for DOS LDD_TEXTFORMAT_STANDARD_DOS
ASCII Standard for Windows LDD_TEXTFORMAT_STANDARD_WIN
ASCII Stripped for DOS LDD_TEXTFORMAT_STRIPPED_DOS
ASCII Stripped for Windows LDD_TEXTFORMAT_STRIPPED_WIN
HTML Level 3 LDD_TEXTFORMAT_HTML3
Excel 97, 2000 LDD_TEXTFORMAT_EXCEL2000
Microsoft Word for Windows 97, 2000 LDD_TEXTFORMAT_WORD2000
Rich Text Format for DOS LDD_TEXTFORMAT_RTF_DOS
Rich Text Format for Windows LDD_TEXTFORMAT_RTF_WIN
Rich Text Format for WinWord 6 LDD_TEXTFORMAT_RTF_WORD6
Rich Text Format for WinWord 7 LDD_TEXTFORMAT_RTF_WORD7
The different ASCII formats provide various levels of output formatting. Each one is described below:
ASCII PlainText only; no formatting.
ASCII SmartPage formatting such as paragraphs, indents, spacing, and centering is
preserved.
ASCII Standard—Minimal page formatting is preserved. White spaces remain spaces;
carriage returns are included.
ASCII Stripped—Paragraphs are long single lines, which will automatically format when
margins change. Carriage returns for "hard" new lines are included.
57

DatabaseNotes

Purpose: Adds an entry to the specified Lotus Notes database on the specified Notes server. It uses a predefined form. Documents that have multiple attachments are supported.
Install group: Lotus Notes Module
Prerequisites:
The Lotus Notes desktop must be installed on the Document Server workstation for this action
to utilize the Notes capabilities. The Notes desktop provides the underlying Notes security and settings for the Document Server to interact with the Notes servers.
A valid Notes user account/ID file for use by the Notes actions on the Document Server must
be provided. Notes administrators typically call the Notes IDs associated with a server application (rather than a person) an application ID. This ID should not be password protected.
Note: If the ID file used by the Notes client has a password, this password must be shared
with 3rd party applications. To change this setting, inside the Notes client choose File
Tools User ID. On the dialog that appears, select "Share password with Notes
add-ins".
The user account/ID file for use by the Notes actions must be granted access to the Notes
database you wish the action to insert into.
Properties
Name Description Data types Additional information
Server Name of server hosting
the database.
Database Name of the Notes
database to use.
Form Name of the Notes
database form to use.
ComputeWithForm Performs calculations,
validates fields, and populates default values as specified in the Notes form when a new record is inserted.
Bold names are required properties.
string If left blank, defaults to the local
machine.
string The database name is the actual
filename of the database to use and is relative to the Notes data directory on the specified server.
string If left blank, defaults to the default form
for the database.
bool Default:
FALS E
58
Methods
Syntax Description
bool Go() Executes the action. Returns TRUE or FALSE to indicate if
void Reset() Clears the current properties and returns them to their
bool AddField(string fieldname, int datatype, string value)
bool AddField(string fieldname, int datatype,
int value)
bool AddField(string fieldname, int datatype,
doc value)
the action completed successfully.
default values.
Sets a Notes Database field of type text, rich text, or date/ time to the specified string value. This method fails if the datatype specified does not match the type of value provided.
Parameters:
fieldname – name of the Notes Database field to set datatype – type of Notes Database field; this must be one of the following LDD constants:
LDD_NOTESDBFIELD_TEXT
LDD_NOTESDBFIELD_RICHTEXT
LDD_NOTESDBFIELD_DATETIME value – value to set the field to
Returns:
A bool indicating success or failure.
Sets a Notes Database field of type number to the specified integer value. This method fails if the datatype specified does not match the type of value provided.
Parameters:
fieldname – name of the Notes Database field to set datatype – type of Notes Database field; this must be the following LDD constant:
LDD_NOTESDBFIELD_NUMBER value – value to set the field to
Returns:
A bool indicating success or failure.
Adds an attachment to a Notes Database field of type text or rich text. This method fails if the datatype specified does not match the type of value provided.
Parameters:
fieldname – name of the Notes Database field to set datatype – this must be the following LDD constant:
LDD_NOTESDBFIELD_ATTACHMENT
value – attachment to be added
Returns:
A bool indicating success or failure.
Notes:
Each time the Go() method is called a new record is written to the Notes database. The record contains the fields specified by preceding AddField() calls.
59
If multiple records are written to the database, call the Reset() method to clear all the fields. Then call AddField() as many times as necessary, followed by one call to the Go() method to insert the record in the database.
Example:
This example script inserts the originally scanned document into a Notes database along with a string describing the document's content.
with DatabaseNotes .Server="Mydata05/new/contracts" .ComputeWithForm = TRUE .Database="Library\VendCntr.nsf" .Form="Contracts Scanned" .ComputeWithForm=FALSE .AddField("image",LDD_NOTESDBFIELD_ATTACHMENT,original.document) .AddField("DocType",LDD_NOTESDBFIELD_TEXT,"Master Agreement") .Go() endwith
60

Domino.Doc Actions

Prerequisites
These actions have only been tested with Lotus Domino R5.0.4a; other R5 servers should
work but have not been specifically tested. The Domino server must include a Domino.Doc server installation of version 3.0 or higher.
A Lotus Notes client certified by Lotus as compatible with Domino.Doc must be installed on the
same machine as the Document Server.
If the Document Server will be connecting to Domino using Notes authentication, a Notes ID is
required. If the ID has a password, Notes can be configured to share the password with third party add-ins; this is not required, but is an option.
If the Document Server will be connecting to Domino using an HTTP or HTTPS connection, an
internet browser certified by Lotus to work with Domino must be present.
No matter which method is being used to connect to Domino, the Domino.Doc Desktop
Enabler must be installed. The Enabler can be installed by visiting a web-enabled Domino.Doc database with a browser and selecting "Getting Started" on the librarys home page.
61

DominoDocCheckIn

Purpose: Inserts one or more documents with any associated metadata into Lotus Domino.Docs.
Properties:
Name Description Data Types Additional information
Input The document
to be checked in.
Username Specifies user to
login as.
Password Specifies the
password of the user.
Library Specifies the
Domino.Doc library to use.
Room String Please see Navigating a Domino.Doc Library
Cabinet String
Category String
Binder String
Description The description
to be associated with all versions of this document
Doc Each file in the doc is checked in separately.
The label of each file in the document is used to generate the document titles. If files have the same label, a qualifier "(x of y)" is appended to each title, where x and y denote the 1-based indexes of the files with the same file label.
String If connecting via Notes, this should be left
blank. Required if connecting via HTTP or HTTPS.
String If connecting via Notes and the password is
shared or there is no password, this can be left blank. In all other cases, this is the password of the user.
String Please see Connecting to Domino.Doc on
page 72 for more details.
on page 72 for more information on these four settings.
String This is used for the newly-created version and
any operations thereafter.
Checkinlevel Specifies
whether the document being checked in is a major version (1.0) or a draft (0.1).
Comment A comment that
applies only to this initial version.
Bold names are required properties.
int (LDD Constant) Values:
LDD_DOMDOC_INLEVEL_VERSION LDD_DOMDOC_INLEVEL_DRAFT
Default:
LDD_DOMDOC_INLEVEL_DRAFT
String This field is typically automatically updated as
the document passes through Domino.Doc workflow processes such as review, approval, and auditing.
62
Name Description Data Types Additional information
DocumentType Specifies the
type of the document to be checked in.
DocumentList Array After calling the Go method, this contains an
Bold names are required properties.
String The default is empty (no type). The document
type is termed a "profile" in Domino.Doc and specifies which fields of metadata are available for this document. The document type must be one of the valid types supported when the file cabinet was created. The document type is case-sensitive. If workflow features in Domino.Doc are being used, such as document life-cycle automation, the DocumentType also specifies which workflow will automatically apply to the checked-in document.
array of strings corresponding to the unique Domino identifier assigned to each file that was checked in.
63
Methods:
Syntax Description
bool Go() Each file in the input document is checked in separately with the same
void Reset() Clears all information previously set for this action and returns all properties
void SetMetadata(string key, string value)
security, profile, and metadata settings.
Parameters:
None
Returns:
TRUE – all file(s) checked in successfully; the DocumentList property is filled with the list of unique Domino identifiers assigned to each file.
FALSE – unable to initialize the API, invalid library specified, invalid username or password, empty input document, invalid property setting. Consult the logfile for more information on the exact error.
to their default value.
Parameters:
None
Returns:
None
Sets a metadata key/value pair to be used during the next use of the Go method. Valid metadata keys are determined by the document type in the document profile design. This function can be called as many times as needed to set all metadata items for an input document.
Parameters:
key – name of the key to set
value – value to be used for the key
Returns:
None
void ClearMetadata() Removes all metadata key/value pairs currently stored in this object. This is
most useful if the DominoDocCheckIn object is to be used multiple times in the same script.
Parameters:
None
Returns:
None
64
Syntax Description
void SetSecurityLevel(string name, int level)
void ClearSecurityLevel() Removes all access levels currently stored in this object. This is most useful
Specifies the access level of a particular user to this document. If this method is not called, the document will use the same security settings as its parent binder. This method can be called as many times as necessary to setup each individuals access level. Any user for whom this method is not called will receive the default access level.
Parameters:
name – fully-qualified name of a user that has access rights to participate in this cabinet
level – the access rights to be granted to the specified user for the document being checked in; must be one of the following values:
LDD_DOMDOC_SECURITY_NOACCESS
LDD_DOMDOC_SECURITY_READER
LDD_DOMDOC_SECURITY_EDITOR LDD_DOMDOC_SECURITY_MANAGER
Returns:
None
if the DominoDocCheckIn object is to be used multiple times in the same script.
Parameters:
None
Returns:
None
To check the scanned document into Domino.Doc
This example assumes the scanned document is a single file. This is the smallest complete example of using the CheckIn action and does not include any options. Typically the document ID returned by the method will be stored elsewhere for use later (for instance, including it in an e-mail).
doc d1=original.document// the document that is to be checked in string id// where to store the document ID with DominoDocCheckin .input=d1 .library="notes://MyServer/DocumentLibrary.nsf" .cabinet="Scanned Files" .binder="LDD" .description="Submitted from "+original.userip .comment="Inserted by LDD" .Go() id=.documentlist[1] endwith
65
Additional check-in metadata and security options
In this example, the checked-in document is to be used as a status report for John Does current project. Unfortunately John Doe is only able to read documents in the Status Reports binder, so security is overridden to allow him to edit this one. The document is labeled and additional metadata added.
doc d1=original.document// the document that is to be checked in d1.SetFileLabelAll("Widget: Current Status") with DominoDocCheckin .input=d1 .library="notes://MyServer/DocumentLibrary.nsf" .cabinet="Project Files" .binder="Status Reports" .description="Submitted from "+original.userip .comment="Inserted by LDD" .SetSecurityLevel("John Doe/MyNotesDomain",LDD_DOMDOC_SECURITY_EDITOR) .documenttype="Generic Document" .SetMetadata("Description","Project: Widget TeamLeader: Doe") .SetMetadata("Date",original.usertime.AsAlphanumeric()) .Go() endwith
66

DominoDocRetrieve

Purpose: Retrieves one or more documents and their associated descriptions and metadata from a Lotus Domino.Docs library based on search criteria.
Details: Documents are retrieved from Domino.Doc by using the unique document IDs assigned by Domino when documents are checked in. To use this action, the connection, navigation, and search criteria are first set. The Query() method is then called; if successful, an array of document IDs of all the matching documents is returned in the DocumentList property. The DocumentID property is then set to one of these IDs and the Go method is called to retrieve the document and its associated description and metadata.
67
Properties:
Name Description Data Type Additional information
Username Specifies user to
login as.
Password Specifies the
password of the user.
Library The Domino.Doc
library to use.
Room string Please see Navigating a Domino.Doc Library for
Cabinet string
Category string
Binder string
Searchmethod Specifies the type of
query to be performed.
string If connecting via Notes, this should be left blank. If
string If connecting via Notes and the password is
string Please see Connecting to Domino.Doc below for
int (LDD constant)
connecting via HTTP or HTTPS, the username to login as.
shared or there is no password, this can be left blank.
more details.
more information on these four settings.
Values:
LDD_DOMDOC_SMETHOD_NONE – Navigate to a binder and select by title
LDD_DOMDOC_SMETHOD_FORMULA – Optionally navigate to a cabinet, use a LotusScript formula
LDD_DOMDOC_SMETHOD_FAVS – No navigation, select by title from the Favorites web bookmarks
LDD_DOMDOC_SMETHOD_RECENT – No navigation, select by title from the Recently Edited web bookmarks
LDD_DOMDOC_SMETHOD_OUT – No navigation, select by title from the Checked Out web bookmarks
Default:
LDD_DOMDOC_SMETHOD_NONE
Criteria If the formula search
method was specified, this is used to specify the LotusScript search criteria or full-text search qualification.
Bold names are required properties.
string Full-text searching can only be used if it has been
enabled for this library.
This setting is not used by any other search method.
68
Name Description Data Type Additional information
Fulltextoptions If the formula search
method was specified, this specifies how the full-text searching should operate.
Sortoptions If the formula search
method was specified, this specifies the order in which match documents are returned in the document list.
Whichdocument After the Query
method is called, a list of all matching documents is created. If this property is specified, the list of matching documents is searched for one with a document title that matches this value.
DocumentID The unique
document id of the document that should be retrieved with next call to the Go method.
int (LDD Constant)
int (LDD Constant)
string There must be only one match; if there are no
string
Values: LDD_DOMDOC_FULLTEXT_NONE – exact
match required or no full-text searching in use LDD_DOMDOC_FULLTEXT_STEMWORDS –
use the base words for matching (matches include suffixes such as ‘ed’, ‘ing’, or ‘s’)
LDD_DOMDOC_FULLTEXT_THESAURUS – words of similar meaning are treated as matching
LDD_DOMDOC_FULLTEXT_BOTH – apply both the stem words and thesaurus.
Default: LDD_DOMDOC_FULLTEXT_NONE
Values:
LDD_DOMDOC_SORT_NONE – documents are returned in their ‘natural’ order
LDD_DOMDOC_SORT_RELEVANCE – if weighting is included in the LotusScript search string, closer matches are listed first
LDD_DOMDOC_SORT_DATEDESCEND – documents are listed with the most recent first
LDD_DOMDOC_SORT_DATEASCEND – documents are listed with the oldest first
Default:
LDD_DOMDOC_SORT_NONE
matches or multiple matches, the Query method will return FALSE. If there is only one match, that document id will be the only one returned in the DocumentList property.
Output The document mostly
recently retrieved using the Go method.
DocumentType The document type
(or document profile) of the document most recently retrieved using the Go method.
Bold names are required properties.
doc This is empty if no document has been
successfully retrieved.
string This is an empty string if no document has been
successfully retrieved.
69
Name Description Data Type Additional information
Description The description of
the document most recently retrieved using the Go method.
DocumentList This array contains
the list of matching documents as returned by the Query() method.
Bold names are required properties.
string This is an empty string if no document has been
successfully retrieved.
Array This array is empty until the Query method is
called.
70
Methods:
Syntax Description
bool Go() Retrieves the single, unique document specified by the
void Reset() Clears all information previously set for this action and
bool Query() Executes the search query specified by the
string GetMetadata(string key) Gets the value of the specified key for the document
DocumentID property.
Parameters:
None
Returns:
TRUE – the document was found and is now available in the output property; the document type, description, and metadata are now also available.
FALSE – unable to find the document
returns all properties to their default value.
Parameters:
None
Returns:
None
searchmethod, criteria, sortoptions, fulltextoptions, and whichdocument properties. The queries will navigate to the required cabinet or binder if specified or if the search method requires them.
Parameters:
None
Returns:
TRUE – the query was successful; the list of matching document ids is now available in the DocumentList property.
FALSE – the query was not successful; possible causes include unable to connect to the specified library, invalid username or password, unable to navigate to specified library location, or invalid search property setting
If the query was able to execute and there are no documents matching the search criteria, this method will still return TRUE.
most recently retrieved with Go. Parameters:
key – the key to return the metadata value of
Returns:
The value of the specified key for the most recently retrieved document. This value is formatted according to the format specifications defined for that document type. If the specified key does not exist, an empty string is returned.
71

Connecting to Domino.Doc

When using either action, the action must first connect to a particular Domino.Doc library before it can proceed with the requested function. Each action uses the username, password, and library properties to configure the connection. Domino.Doc supports three connection methods; each method is described below along with the necessary settings for these properties.
Notes Client:
This method connects to Domino.Doc with the user id stored in the local Notes id file. In this case, the username property should be left blank. The password property can be left blank if the Notes client was configured to share its password with add-in applications; otherwise, the password property should be used to explicitly specify it. The library property must begin with "notes://" and can be used to access hierarchical Notes servers if necessary. Typical values are:
notes://MyServer/domdoc.nsf notes://MyNotesServer/organization units/organization!!subdirectory/domdoc.nsf
HTTP or HTTPS:
These methods connect to Domino.Doc as a particular user and are not restricted to the user id in the local Notes id file. The username and password properties must be supplied using the fully-qualified name as it appears in the Notes Name and Address Book, e.g. "John Doe/ NotesDomain". Typical library property values are:
http://MyWebServer/domdoc.nsf https://MySecureWebServer/domdoc.nsf

Navigating a Domino.Doc Library

Each action uses the room, cabinet, category, and binder properties to navigate to a particular location in the Domino.Doc library. Rooms and categories are grouping techniques used to make the graphical display of a library easier to use. Every cabinet must have a unique name while every binder in a cabinet must have a unique name. For example, a cabinet may appear in more than one room or a binder may appear in more than one category. Binders in different cabinets may have the same name; binders in the same cabinet cannot.
Only cabinets and binders need to be specified to find the correct location in the library. Room and category properties may be used to facilitate the location of particular cabinets or binders (especially when relating to what is seen on a client display). When checking-in documents, a unique cabinet and binder must be specified. When retrieving documents, a cabinet and binder only need to be specified if the specified search method requires it.
Note: Categories can be nested. Nested categories are denoted by using "/" as the path
separator. For example, "Forms/Medical".
72
Retrieving a known document ID
The document ID returned by the check-in method uniquely identifies the document and could have been sent in an e-mail or added to a confirmation page. The following script defines a userdata field so when running this script a document ID can be entered and retrieved. The script will typically continue to print or send this document.
doc d1// the retrieved document with DominoDocRetrieve .library="notes://MyServer/DocumentLibrary.nsf" .documentID=userdata.docid .Go() d1=.output endwith
Searching for files matching a specific criteria
The organization above has chosen to label and categorize project files in a consistent manner, and has chosen to make sure that all titles of documents checked into Domino.Doc include the project name. The following example finds all files relating to the Widget project, orders them most recent first, and collates them into a single LDD document which may for instance be delivered in an e-mail.
doc dCollate// where all matching files are collated int iIndex// index of matching documents with DominoDocRetrieve .library="notes://MyServer/DocumentLibrary.nsf" .cabinet="Project Files" .searchmethod=LDD_DOMDOC_SMETHOD_FORMULA .criteria='([Title]CONTAINS"Widget")' .sortoptions=LDD_DOMDOC_SORT_DATEDESCEND .Query() loop iIndex from 1 to .documentList.GetSize() .documentID=.documentList[iIndex] .Go() dCollate.AddDocument(.output) endloop endwith
73

EmailExchange

Purpose: Sends e-mail to one or more recipients by way of a given Exchange server. Recipients may be people or public Exchange folders.
Install group: Microsoft Exchange Module
Prerequisites: There are several prerequisites for using the EmailExchange action:
Microsoft Outlook must be installed on the same computer as the Document Server. Microsoft
Outlook Express that comes with Internet Explorer will NOT work.
The MAPI Library must be installed.
To verify this, check the following registry key:
HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Messaging Subsystem
The values of "CMC" and "MAPI" keys should both be set to 1.
You need a valid user account on the Exchange server to log in. If you have Outlook installed,
try to log in to your Exchange server to verify this is working.
Document Distributor must log in as a user. The Document Server is a service. For the
EmailExchange action, you need to configure the service to log in with a user account. The user account chosen must have a valid Exchange e-mail account. The user account should have full access to the Document Server host computer.
To configure the Document Server service to log in as a user (You must be logged in as an administrator to do this):
Windows NT:
a Go to Start Settings Control Panel Services.
b Select the Lexmark Document Server service and click Startup.
c Click "This Account" and select the users name who has the access rights desired. Type
the users password and confirm.
d Click OK.
Note: For the service to log on as the user specified, you must stop and start the Document
Server service or reboot the computer.
Windows 2000/XP:
a Go to Start Settings Control Panel Administrative Tools Services.
b Double-click the Lexmark Document Server service.
c Choose the Log On tab.
d Click "This Account" and select the users name who has the access rights desired. Type
the users password and confirm.
e Click OK.
Note: For the service to log on as the user specified, you must stop and start the Document
Server service or reboot the computer.
74
About Exchange profiles
A user "profile" is required for Document Distributor to log in to Exchange. The profile specifies the address of the Exchange server and the name of the valid Exchange mailbox. Document Distributor creates an Exchange profile for you if your script supplies:
The name of the profile you want to create.
The address of the machine on which Exchange is installed.
The name of a valid Exchange mailbox
If you supply the name of a profile that already exists on the Document Distributor machine then Document Distributor attempts to log onto Exchange with that profile. If no profile name is supplied at all, then Document Distributor looks into the system registry for the name of a default profile. The name of this default profile (if one exists) is found in the following registry key:
HKEY_CURRENT _USER\\Software\\Microsoft\\WindowsNT\\CurrentVersion\\Windows Messaging Subsystem\\Profiles
If no profile name is specified in the script and no default profile exists on the system, Document Distributor produces an error.
Properties
Name Description Data type Additional information
To List of e-mail addresses to
which this message is sent.
From The e-mail address of the
sender.
cc List of e-mail addresses to
which copies are sent.
bcc List of e-mail addresses to
which blind copies are sent.
Subject Subject of e-mail. string
string Comma delimit to specify
more than one recipient.
string
string Comma delimit to specify
more than one recipient.
string Comma delimit to specify
more than one recipient.
Message Text string to use as the
message body.
Attachments This can be an:
Original scanned document
Output from a previous
action
Server IP address or DNS hostname of
server.
Mailbox Mailbox name string Include this value if you
Bold names are required properties.
string
doc To attach multiple files,
create a variable of type doc and call the doc object’s AddFile() method to add the files to the doc object before using it here.
string Include this value if you
want Document Distributor to create a profile for you.
want Document Distributor to create a profile for you.
75
Name Description Data type Additional information
ProfileName Profile to use string This value specifies the
Password Password to access the
Exchange server.
Bold names are required properties.
string
name of the new profile you want Document Distributor to create, name of an existing profile that you want Document Distributor to use. If no name is specified, Document Distributor looks for a default profile in the registry. See “About Exchange profiles on page 75.
or it can be the
Methods
Syntax Description
bool Go() Executes the action. Returns TRUE or FALSE to
indicate if the action completed successfully.
void Reset() Clears the current properties and returns them to their
default values.
76

EmailNotes

Purpose: Sends e-mail to one or more recipients through a Lotus Notes mail server.
Install group: Lotus Notes Module
Prerequisites:
The Lotus Notes client must be installed on the Document Server for this action to utilize the
Notes capabilities. The Notes client provides the underlying Notes security and settings for the Document Server to interact with the Notes servers.
A valid Notes user account/ID file for use by the Notes actions on the Document Server must
be provided. Notes administrators typically call the Notes IDs associated with a server application (rather than a person) an application ID. This ID should not be password-protected.
Note: If the ID file used by the Notes client has a password, this password must be shared
with 3rd party applications. To change this setting, inside the Notes client choose File
Tools User ID. On the dialog that appears, select "Share password with Notes
add-ins".
Properties:
Name Description Data type Additional information
To List of e-mail addresses to
which this message is sent.
From The e-mail address of the
sender.
cc List of e-mail addresses to
which copies are sent.
bcc List of e-mail addresses to
which blind copies are sent.
Subject Subject of e-mail. string
Message Text string to use as the
message body.
Attachments Attachments can be:
Original scanned document
Output from a previous
action
DeliveryPriority Priority of e-mail delivery. int
string Comma delimit to specify more than one
string
string Comma delimit to specify more than one
string Comma delimit to specify more than one
string
doc To attach multiple files, create a variable
(LDD Constant)
recipient.
recipient.
recipient.
of type doc and call the doc object’s AddFile() method to add the files to the doc object before using it here.
Property values:
LDD_PRIORITY_LOW LDD_PRIORITY_NORMAL
LDD_PRIORITY_HIGH
Default: LDD_PRIORITY_NORMAL
Bold names are required properties.
77
Name Description Data type Additional information
MailImportance Importance of e-mail. int
(LDD Constant)
MoodStamp Moodstamp is optional. int
(LDD Constant)
DeliveryReport Delivery status of note. int
(LDD Constant)
Property values: LDD_PRIORITY_LOW
LDD_PRIORITY_NORMAL
LDD_PRIORITY_HIGH Default:
LDD_PRIORITY_NORMAL
Property values: LDD_MOODSTAMP_NORMAL
LDD_MOODSTAMP_PERSONAL
LDD_MOODSTAMP_CONFIDENTIAL LDD_MOODSTAMP_PRIVATE
LDD_MOODSTAMP_THANKYOU
LDD_MOODSTAMP_URGENT LDD_MOODSTAMP_GOODJOB
LDD_MOODSTAMP_JOKE
LDD_MOODSTAMP_FYI LDD_MOODSTAMP_QUESTION
LDD_MOODSTAMP_REMINDER
Default: LDD_MOODSTAMP_NORMAL
Property values:
LDD_DELIVERYREPORT_CONFIRM LDD_DELIVERYREPORT_FAILURE
LDD_DELIVERYREPORT_TRACEPATH
LDD_DELIVERYREPORT_NONE Default:
LDD_DELIVERYREPORT_FAILURE
ReturnReceipt If you want a return receipt
mailed back to sender.
PreventCopying Prevent the note from being
copied.
SaveMessage Indicates whether a copy of
the message should be saved in the "Sent" folder.
Bold names are required properties.
bool TRUE if you want a return receipt; FALSE
otherwise.
Default: FALS E
bool TRUE to prevent copying; FALSE
otherwise.
Default:
FALS E
bool TRUE to save message; FALSE
otherwise. Default:
FALS E
78
Methods
Syntax Description
bool Go() Executes the action. Returns TRUE or FALSE to
void Reset() Clears the current properties and returns them to their
indicate if the action completed successfully.
default values.
Notes:
The e-mail addresses can be either Lotus Notes addresses or Internet e-mail addresses.
Lotus Notes does not require values for To, From, cc, or bcc. However, a message must supply
a value for at least one of these properties.
79

EmailSMTP

Purpose: Send e-mail to one or more recipients by way of the specified Simple Mail Transfer Protocol (SMTP) server.
Install Group: SMTP Module
Prerequisites: This action acts as an SMTP client and can only work with an SMTP server that does
not require a password. In other words, if the specified SMTP server only works in enhanced mode, this action will not work.
Properties:
Name Description Data Type Additional information
Server The IP Address or DNS
hostname of the SMTP server.
To List of e-mail addresses to
which this message is sent.
From The e-mail address of the
sender.
cc List of e-mail addresses to
which copies are sent.
bcc List of e-mail addresses to
which blind copies are sent.
ReplyTo Address to reply to if other
than the "From" field.
Sender The e-mail address to send
any errors.
Subject Subject for message. string
Message Text string to use as the
message body.
Bold names are required properties.
string
string Comma delimit to specify more than
string Some SMTP servers require the
string Comma delimit to specify more than
string Comma delimit to specify more than
string A secretary, for example, sending
string
string
one recipient.
From field to be a valid address known by the SMTP server before it will route mail.
one recipient.
one recipient.
e-mails for a manager.
80
Name Description Data Type Additional information
CharacterSet The character set to use for
sending the message and subject text.
Attachments Attachments can be an:
Original scanned document
Output from a previous action
Bold names are required properties.
int (LDD Constant)
doc To attach multiple files, create a
Val id Val u es: LDD_SMTPCHARSET_US
LDD_SMTPCHARSET_WEUROPE
LDD_SMTPCHARSET_EEUROPE LDD_SMTPCHARSET_SEUROPE
LDD_SMTPCHARSET_NEUROPE
LDD_SMTPCHARSET_CYRILLIC LDD_SMTPCHARSET_ARABIC
LDD_SMTPCHARSET_GREEK
LDD_SMTPCHARSET_HEBREW LDD_SMTPCHARSET_TURKISH
LDD_SMTPCHARSET_NORDIC
Default: LDD_SMTPCHARSET_US
variable of type doc and call the doc object’s AddFile() method to add the files to the doc object before using it here.
Methods
Syntax Description
bool Go() Executes the action. Returns TRUE or FALSE to
void Reset() Clears the current properties and returns them to their
indicate if the action completed successfully.
default values.

E-mail Addresses

This action supports both undecorated and decorated e-mail addresses. The following three examples would send e-mail to the same address:
1 jdoe@company.com
2 John Doe <jdoe@company.com>
3 "Doe, John" <jdoe@company.com>
The first example is undecorated and simply provides the e-mail address.
The second example is decorated; it is simply a phrase followed by the e-mail address in <>.
The third example is decorated but with special characters; therefore, the phrase must be in quotes followed by the e-mail address in <>.
The decorated name is what appears in the e-mail client and provides a user-friendly look.
81
When using decorated e-mail addresses, it is important to note that only 7-bit ASCII characters are allowed as part of the phrase. This means that accented characters and any other non-standard characters that are valid in the subject and message fields (based on the specified character set) cannot be used here.

Recipients and Senders

The following properties allow you to setup who will receive the e-mail:
To to whom the e-mail is being directly sent
ccto whom a copy of the e-mail is being sent
bccto whom a copy of the e-mail is being secretly sent
While none of these properties are themselves required to have a value, at least one recipient must be specified in one of them. Multiple addresses can be specified for any of them with each address separated by a comma.
The following properties allow you to setup how the e-mail recipients view who sent the mail:
Fromspecifies from whom the e-mail appears to be
ReplyToif a recipient replies, specifies to whom the reply is sent
Senderspecifies who is actually sending the e-mail; this is the address that any errors
encountered by the SMTP server will be sent
The From property is required and can contain one or more e-mail addresses.
The ReplyTo property is optional and can be set to one or more addresses; if omitted, the addresses in the from list are used.
The Sender property is optional if only one address is specified in the from list; otherwise, if multiple addresses are specified for the From property, it is required. When set, the Sender property can contain only one address. If omitted, the Sender is set to the first (or only) address in the From list.
Example
A loan manager for a bank wants to send an e-mail to various locations to announce the new loan rates. The following fragment shows on of the e-mails sent when this script is executed.
with EmailSMTP
.To = "^"Doe, John^" <jdoe@company.com>" .From = "Jane Clark<jane@company.com>" .ReplyTo = "Loan Rates <george@company.com>" .Sender = "admin@company.com" .Subject = "Rates Announcement" .Message = "See the attached flyer for the new loan rates." .Attachment = original.document .Go()
endwith
In this fragment, the e-mail is being sent to John Doe. Notice how a decorated e-mail address is being used; since it includes a special character (the comma), quotes are needed around the phrase. Since quotes are necessary around LDDScript strings, the "^" is an escape sequence so that a quote can be used in the string itself. The e-mail will be from Jane Clark the loan manager. If John Doe has a question and replies to the e-mail, the reply will be sent to George; he is Jane's assistant and will take care of any questions. If any errors occur and the e-mail can't be sent, a message will be sent to the admin.
82

FaxByPrinter

Purpose: Faxes a document through a Lexmark printer with a fax-capable MarkNet print server.
Install group: Print Module
Prerequisites: A fax-enabled MarkNet print server.
Inputs: Encapsulated PostScript file (EPS) or PostScript file (PS), Black and White or 8-bit grayscale.
Properties
Name Description Data type Additional information
Input The document to be faxed. doc The document must be in .EPS
or .PS format.
IPAddress The IP address or DNS
hostname of the fax-equipped printer.
string
FaxNumber The phone number to which the
fax is sent.
StationID The station ID to be used for the
fax.
WaitForCompletion Wait for the fax to complete
before continuing.
WaitTimeout The maximum number of
minutes to wait for the fax to complete or error out.
Bold names are required properties.
string
string
bool If set to TRUE, the Go method
will not return until the fax has been successfully sent, the fax returns an error, or the timeout specified by WaitTimeout has been reached. If set to FALSE, the Go method returns immediately after the fax request is sent.
int This setting is ignored if
WaitForCompletion is set to FALSE. This value should allow time for the initial request and any retries.
Val id Valu es:
0 to 60 Default:
0
83
Name Description Data type Additional information
RedialMinutes If the fax fails, the time in minutes
to wait before retrying.
RedialTimes The number of times to retry the
fax.
Bold names are required properties.
Methods
int To perform no retries, this value
should be set to 0. To use the value set on the printer's web page, use the LDD constant, LDD_PRINTER_DEFAULT.
Val id Valu es: 0 to 9 or
LDD_PRINTER_DEFAULT Default:
LDD_PRINTER_DEFAULT
int To use the value set on the
printer's web page, use the LDD constant, LDD_PRINTER_DEFAULT.
Val id Valu es:
1 to 200 or LDD_PRINTER_DEFAULT
Default:
LDD_PRINTER_DEFAULT
Name Syntax Description
Go bool Go() Executes the action. Returns TRUE
or FALSE to indicate if the action completed successfully.
Reset void Reset() Clears the current properties and
returns them to their default values.
84

FTPget

Purpose: Retrieves a file from a specified FTP server.
Install group: Document Server
Prerequisites: None
Properties:
Name Description Data type Additional information
Output The document to which this action’s output
is written.
ServerAddress IP Address or DNS hostname of the FTP
server from which to retrieve the file.
UserName The user name used to log into the FTP
server.
Password The password used to log into the FTP
server.
Account The account name to use if one is
required.
TransferMode The mode used to transfer the requested
file.
doc
string
string If none is required, enter an
string If none is required, enter an
string Most FTP servers do not
int (LDD Constant)
empty string.
Default:
anonymous
empty string. Default:
anonymous
require an account to be specified.
If the document is an image or images, select LDD_FTPMODE_BINARY mode.
If the document is text, select LDD_FTPMODE_ASCII mode.
Default: LDD_FTPMODE_BINARY
SourcePath The file to retrieve. string If no path is specified with the
Bold names are required properties.
filename, the file will be retrieved from the user’s default FTP directory. See “Sample source path on page 86.
Methods
Name Syntax Description
Go bool Go() Executes the action. Returns TRUE
Reset void Reset() Clears the current properties and
or FALSE to indicate if the action completed successfully.
returns them to their default values.
85
Note: Due to differences between file systems, when transferring a file in ASCII mode, the size of
the new file may not be identical to the original file on the FTP server.
Sample source path Explanation
/sample1.tif Retrieves the file "sample1.tif" from the root directory of the source computer
sample1.tif Retrieves the file "sample1.tif" from the user's default FTP directory
/zdir/sample1.tif Retrieves the file "sample1.tif" from the directory "zdir" that resides under the
myfile/sample1.tif Retrieves the file "sample1.tif" from the "myfile" subdirectory that resides
root directory of the source computer (not the user's default FTP directory).
under the user’s default FTP directory
86

FTPput

Purpose: Transfers a document to a specified FTP server.
Install group: Document Server
Prerequisites: None
Properties
Name Description Data type Additional information
Input Document to transfer. doc
ServerAddress IP Address or DNS hostname of
the FTP server to which the document is to be transferred.
UserName The user name used to log into
the FTP server.
Password The password used to log into the
FTP server.
DestinationPath The fully-qualified path name for
the file transferred to the FTP server.
Account The account name to use if one is
required.
AppendTimeStamp Appends a time stamp containing
the year, month, day, and time of day to the filename so that files with the same name will not be overwritten.
string
string If none is required, enter an
empty string.
Default:
anonymous
string If none is required, enter an
empty string. Default:
anonymous
string If the value only contains a
filename, the file will be stored in the users default FTP directory. See “Sample destination path” on page 88.
string Most FTP servers do not
require an account to be specified.
bool The reserved variable
original.usertime is used for the timestamp.
Default:
TRUE
CreateDirectory Creates the path specified in the
"DestinationPath" parameter if it does not already exist.
Bold names are required properties.
87
bool If value is FALSE and the
specified directory does not exist, the action will fail.
Default:
FALS E
Name Description Data type Additional information
TransferMode The mode used to transfer the
document.
Overwrite Overwrites the previous FTP file bool Default:
Bold names are required properties.
int (LDD Constant)
If the document is an image, select LDD_FTPMODE_BINARY mode.
If the document is text, select LDD_FTPMODE_ASCII mode.
Default:
LDD_FTPMODE_BINARY
TRUE
Methods
Name Syntax Description
Go bool Go() Executes the action. Returns TRUE
Reset void Reset() Clears the current properties and
or FALSE to indicate if the action completed successfully.
returns them to their default values.
Note: If a document contains multiple files, the files created on the FTP server will have a number
appended after the file extension and before the time stamp (if a time stamp was requested) in order to create a unique filename. Due to differences between file systems, when transferring a file in ASCII mode, the size of the new file on the FTP server may not be identical to the size of the original file.
Sample destination path Explanation
/sample1.tif Places the file "sample1.tif" into the root directory of the destination
computer.
sample1.tif Places the file "sample1.tif" into the user's default FTP directory under
the name "sample1.tif".
/zdir/sample1.tif Places the file "sample1.tif" into the directory "zdir" that resides under the
root directory of the destination computer (not the user's default FTP directory).
88

GroupWise Actions

Prerequisites:
The necessary NetWare connectivity must be available to the host machine. This includes any
necessary drivers for the LDD server to connect to a NetWare server. Check the Properties in your Network Neighborhood to ensure the required gateways and protocols were installed when you installed GroupWise. The module uses any available protocol, and is not limited to TCP/IP.
NetWare client software must also be installed. In particular, the server must have the Novell
Client for Windows NT, Windows 2000, or Windows XP installed. The client must be compatible with the version of NetWare running on the GroupWise host. At the bare minimum, the client must be configured to point to a NetWare server with a specific tree and context. See the Advanced settings in the Novell Client dialog box.
The Novell GroupWise client for Windows must also be installed on the server machine. If the
GroupWise application may be started from the icon on the server machine without requiring any other user input other than a user name and password, the setup is correct.
The GroupWise version must be at least version 6.
Depending on your preferred GroupWise configuration, you may require the Document Server
to log on as a particular user on startup. This may be set in the Services control panel applet (located under Administrative Tools on Windows 2000). This enables the GroupWise module to retrieve any necessary NetWare setup from the Windows user-level settings in the Registry. Desktop interaction should not be necessary. The GroupWise client does not need to be running. It is strongly advised that any interactive components of GroupWise, such as the Notify application, be disabled on the server machine.
Configuration options
The GroupWise module may be used in three possible ways:
1 Each call to GroupWise requires a user name and password to log on. Different calls may log
on as different users.
2 Each call to GroupWise requires a logon using the same user name and password, but the
logon may proxy as another user. Proxying does not require a password, but requires the proxy target to grant suitable access rights.
3 Each call to GroupWise logs on using system-level defaults specified in the Novell Client or in
the GroupWise startup. There is no need for each script to specifically specify a logon name or password. Proxy log on is available.
Tip: The third way is recommended. In particular, it is suggested that a dedicated GroupWise account is created for the Document Distributor. To allow LDD to act on behalf of other users, the GroupWise administrator or the users themselves should set up LDD to act as a proxy. Such proxy logons do not require the user passwords to be exposed to LDD, and the LDD account logon may be setup as a system-level default. This method allows the GroupWise administrator, rather than the Document Server administrator to control security.
For more details on any of these prerequisites, consult the GroupWise Administrator, NetWare Administrator, Novell Client, or GroupWise online Help.
89

GWMail

Purpose: Send mail using GroupWise.
Results: Mail may be sent to one or more recipients with or without file attachments in several formats.
There is control over message dispensation, priority, notification, and security.
Properties:
Name Description Data Type Additional information
RootAccount The user ID for the
module to log on by way of the Novell Client for Windows.
string This is not necessarily the same as the
GroupWise user name. If not specified, the system is searched for a suitable default.
RootPassword The password for Novell
Client logon.
ProxyAccount The proxy account, under
which the module performs all its GroupWise manipulations.
To List of e-mail addresses
to which this message is sent.
From The e-mail address of the
sender.
string If not specified, the system is searched
for a suitable default.
string The account name specified here must
be a GroupWise account name and must appear in the GroupWise System Address Book. Name completion is performed by GroupWise if necessary. The user who is to be proxied, or the GroupWise administrator, must have provided suitable proxy access rights to the logon specified by the root account. If not specified, all GroupWise manipulations take place under the root account.
string The list may be comma-delimited, as
with other LDD mail modules, or it may be semicolon-delimited as in the GroupWise client. Addresses are resolved against the sender’s address books, including name completion. External addresses such as SMTP and MAPI will also function, if the GroupWise server has such support.
Note: At least one recipient must be specified in the To, From, cc, or bcc fields.
string The proxied or root users name is
always appended to this field – it is not possible to fraudulently set a From address using this method. The default is not to decorate the From address. A suitable entry in this field could be "Sent by LDD on behalf of" or similar decoration.
cc List of e-mail addresses
to which copies are sent.
Bold names are required properties.
string As with the To field, the list may be
comma- or semicolon-delimited and may include any addresses resolvable through address books or external GroupWise server connections.
90
Name Description Data Type Additional information
bcc List of e-mail addresses
to which blind copies are sent.
Subject The subject line of this
mail.
Message The message content of
this mail.
MessageFormat The format in which the
ASCII message is encoded.
Attachments The file attachments to
append to this message.
ConvertAttachments Specifies whether or not
the GroupWise post office should change attachments to forms that are viewable within GroupWise itself.
string No other recipients can see this
string
string The message body is subject to a
int (LDD Constant)
doc To attach multiple files, create a
bool The default is FALSE, which transmits
recipient in their received mail. The same conditions apply as with the To and cc fields.
GroupWise limitation of approximately 32,000 characters.
Valid values: LDD_GWMSGTYPE_PLAINTEXT
LDD_GWMSGTYPE_RICHTEXT
Default: LDD_GWMSGTYPE_PLAINTEXT
variable of type doc and call the doc object’s AddFile () method to add the files to the doc object before using it here.
any attachments in their original format as sent by LDD, and may require recipients to use an external application to view them. Setting this to TRUE gives the post office the right to change the attachment formats to forms that are viewable within GroupWise itself. Such modification may change file format or compression, and is not guaranteed to preserve formatting codes or graphical detail. Consult your post office administrator for details of these conversions.
Priority The priority assigned to
this message.
Private Specifies whether or not
this message is hidden from proxy users and is only viewable by the intended recipient.
Bold names are required properties.
int (LDD Constant)
bool Relevant only for GroupWise
This applies wherever possible depending on the transport mechanism used to send the mail. For GroupWise destinations, the priority is denoted by icon color in the recipients Inbox.
Valid values:
LDD_PRIORITY_LOW LDD_PRIORITY_NORMAL
LDD_PRIORITY_HIGH
Default: LDD_PRIORITY_NORMAL
destinations.
Default:
FALSE
91
Loading...