31
Document Data Type (doc)
The document data type holds a collection of image, text, and other formatted files. A document may
contain one or more files. Each file in a document has a label and a type. The label is the filename
minus the extension; the type is the file extension or file format. For example, for a file called
"mypicture.tif", the label is "mypicture" and the type is "tif". The label and type are combined to form the
filename for e-mail attachments or when a document is inserted into a database.
If you scan several pages from an MFP and the selected profile is specified as a JPEG format, the
resulting document contains one JPEG file for each scanned page. If you scan several pages, but use
a profile specifying PDF, PS, or TIFF format, the resulting document contains a single file that has
multiple pages in it.
Documents objects are often used as the input for many Actions available in LDD Scripts, such as
ConvertImageFormat, FTPput, and FaxByPrinter. Some Actions also produce a document as output,
such as ConvertImageFormat and ConvertToDocument. When an Action produces a document as
output, the document is not created until the Action's Go method is called. The output document exists
during the execution of the script, but is discarded when the script finishes executing. If you need to
save the document contents, you must call an Action such as SaveToFile or FTPPut in order to store a
permanent copy of the document.
Document data objects have the following methods:
Methods
Description
void Clear()
Removes all the files contained in the current
document
doc Copy()
Creates a new document containing a copy of
each file in the current document. This allows
you to modify the files without changing the
contents of the original document.
int GetSize()
Returns the size in bytes of all the files contained
in the current document.
int GetNumberFiles()
Returns the number of files contained in the
current document.
File 1
Label: mypicture
Type: jpg
File 2
Label: mypicture
Type: jpg
Document type: jpg
File 1
Label: mypapers
Type: TIFF
Document type: TIFF
Document
Document