Stellent.IBPM.Interop.Print

This help file documents the IBPM SDK Print Dialog Tool. The following sections are provided.

Programmer's Guide | Provides an introduction to the ideas and concepts required to develop with the IBPM SDK Print Dialog Tool.
IBPM SDK™ Print Dialog Tool Reference | Provides a detailed description of the Properties, and Methods for each Collection, Object, and Enumeration Constant.


IBPM SDK Print Dialog Tool

IBPM SDK Print Dialog Tool Enumerations

To assist in debugging, the IBPM SDK™ Print Dialog Tool enumerations list a value for each constant. However, this value is purely advisory, and may change from one release of the IBPM SDK to another. Your code should only depend on the name, not the actual value, of each enumerated constant.

IBPM SDK Print Dialog Tool Enumerations

AttributeType

DeviceType

PrintSelection

UserSelection


AttributeType Enumeration

Members

Constant | Value
atUndefined | 0
atResolutions | 1
atPaperSources | 2
atPaperSizes | 3


DeviceType Enumeration

Members

Constant | Value
dtPrintDevice | 1
dtFaxDevice | 2


PrintSelection Enumeration

Members

Constant | Value
psSelectedPage | 1
psSelectedDocument | 2
psAllSelectedPages | 3
psAllSelectedDocs | 4


UserSelection Enumeration

Members

Constant | Value
usUserClickedOk | 1
usUserClickedCancel | 2


IBPM SDK Print Dialog Tool

IBPM SDK Print Dialog Tool Objects

IBPM SDK™ Print Dialog Tool Objects Summary

CoverPage

FaxRecipient

PrintDialog

PrintDevice


CoverPage

CoverPage object

CoverPage is an object that represents a specific cover page to be printed or faxed.

Remarks

This object can be obtained by iterating through the collection that is returned by calling the Item property on the CoverPageCollection object.


Name Property (CoverPage)

Name is a property that specifies the name of this cover sheet object.

Settings and Return Values

Gets or sets a string value that represents the name of the cover sheet.


FaxRecipient

FaxRecipient object

FaxRecipient is an object that represents a specific fax recipient (i.e., a person that is intended to receive the fax transmission).

Remarks

This object can be obtained by iterating through the collection that is returned by calling the Item property on the FaxRecipientCollection object.


Company Property (FaxRecipient)

Company is a property that specifies the company that this fax recipient belongs to.

Settings and Return Values

Gets or sets a string value that represents a name of a company.


Name Property (FaxRecipient)

Name is a property that specifies the name of this fax recipient.

Settings and Return Values

Gets or sets a string value that represents the name of the person to receive the fax transmission.


PhoneNumber Property (FaxRecipient)

PhoneNumber is a property that specifies the phone number of the fax recipient.

Settings and Return Values

Gets or sets a string value that represents a telephone number.


PrintDevice

PrintDevice object

PrintDevice is an object that represents a specific print device (printer or fax).

Remarks

This object can be obtained by iterating through the collection that is returned by calling the PrintDeviceCollection property on the PrintDialog object.


GetPrintAttributes Method (PrintDevice)

GetPrintAttributes is a method that is used to obtain a collection of attributes for a given print device.

Return Type

An object of type PrintAttributeCollection.

Syntax

object.GetPrintAttributes((AttributeType As otAttributeType))

Parameters

Part | Description
object | An expression evaluating to an object of type PrintDevice.
AttributeType | otAttributeType


DefaultPaperSize Property (PrintDevice)

DefaultPaperSize is a property that specifies the name of the default paper size for this print device.

Settings and Return Values

Gets or sets a string value that represents the name of the default paper size.


DefaultResolution Property (PrintDevice)

DefaultResolution is a property that specifies the name of the default resolution for this print device.

Settings and Return Values

Gets or sets a string value that represents the name of the default resolution.


DefaultSource Property (PrintDevice)

DefaultSource is a property that specifies the name of the default paper source for this print device.

Settings and Return Values

Gets or sets a string value that represents the name of the default paper source.


ServerID Property (PrintDevice)

ServerID is a property that represents the Server ID of this print device.

Settings and Return Values

Returns a value of type String.

Remarks

This property is read-only


Name Property (PrintDevice)

Name is a property that represents the name of this particular print device.

Settings and Return Values

Gets or sets a value of type String.

Remarks

This property is read-only.


IsAcordeServer Property (PrintDevice)

IsAcordeServer is a property that represents if this print device is an IBPM server.

Settings and Return Values

Returns a value of type Boolean.

Remarks

This property is read-only


DeviceType Property (PrintDevice)

DeviceType is a property that represents the type of device this object is.

Settings and Return Values

Returns a value of type DeviceType.

Remarks

This property is read-only


PrintDialog

PrintDialog object

PrintDialog is an object that manages print dialog interaction and is the source object for getting a list of print devices and options.

Remarks

This object is usually created initially and used directly.


AddAcordePage Method (PrintDialog)

AddAcordePage is a method to add a document from the IBPM system.

See the Example to learn how to construct the DocumentID and IndexID objects for the parameters.

Return Type

None.

Syntax

object.AddAcordePage((pDocumentID As Object, pIndexID As Object))

Parameters

Part | Description
object | An expression evaluating to an object of type PrintDialog.
pDocumentID | An IBPM DocumentID Object
pIndexID | An IBPM IndexID Object


AddLocalPage Method (PrintDialog)

AddLocalPage is a method to add a page from the local machine to be printed.

Return Type

None.

Syntax

object.AddLocalPage((FileName As String, Flags As Long, SecurityLevel As Long, UserName As String))

Parameters

Part | Description
object | An expression evaluating to an object of type PrintDialog.
FileName | A string representing the filename
Flags | A long representing the flags
SecurityLevel | A long representing the security level
UserName | A string representing the user name


DisplayDialog Method (PrintDialog)

DisplayDialog is a method that is used to display the print dialogs in its current state.

Return Type

Returns the user selection of type UserSelection.

Syntax

object.DisplayDialog((ParentWindow As Long, SubmitJobOnOK As Boolean, JobID As Long))

Parameters

Part | Description
object | An expression evaluating to an object of type PrintDialog.
ParentWindow | Long
SubmitJobOnOK | Boolean
JobID | Long

Remarks

The JobId is an output parameter and will return the ID of the print job that was started.


GetMAgent Method (PrintDialog)

GetMAgent is a method to get the IBPM Marshalling Agent.

Return Type

A value of type IDispatch that represents the IBPM Marshalling Agent.

Syntax

object.GetMAgent()

Parameters

Part | Description
object | An expression evaluating to an object of type PrintDialog.


GetPrintDevice Method (PrintDialog)

GetPrintDevice is a method that retrieves a print device by its name.

If the name is invalid, an exception will be thrown.

Return Type

An object of type PrintDevice

Syntax

object.GetPrintDevice((Name As String))

Parameters

Part | Description
object | An expression evaluating to an object of type PrintDialog.
Name | String


HandleRawMessage Method (PrintDialog)

HandleRawMessage is a method that handles a raw message.

Return Type

A result value of type Long.

Syntax

object.HandleRawMessage((Data As Object))

Parameters

Part | Description
object | An expression evaluating to an object of type PrintDialog.
Data | Object representing the raw buffer of a print request.

Remarks

This method is for internal use only.


Print Method (PrintDialog)

Print is a method to initiate the printing process from the print dialog.

Return Type

A value of type Long that represents the ID of the print job that was started.

Syntax

object.Print()

Parameters

Part | Description
object | An expression evaluating to an object of type PrintDialog.


Refresh Method (PrintDialog)

Refresh is a method that is used to refresh the print dialog.

If ServerModeOnly is True, then the local print engine will not start and the print dialog will only support submission of jobs to IBPM Print servers.

Return Type

None.

Syntax

object.Refresh((ServerModeOnly As Boolean))

Parameters

Part | Description
object | An expression evaluating to an object of type PrintDialog.
ServerModeOnly | A boolean value that determines if the print dialog should display IBPM Print servers only.


SetUserToken Method (PrintDialog)

SetUserToken is a method that is used to set the user token.

Return Type

None.

Syntax

object.SetUserToken((UserToken As Object))

Parameters

Part | Description
object | An expression evaluating to an object of type PrintDialog.
UserToken | Object


Copies Property (PrintDialog)

Copies is a property that represents the number of copies to print.

Settings and Return Values

Gets or sets a value of type Long.


CoverPage Property (PrintDialog)

CoverPage is a property that represents the cover page.

Settings and Return Values

Gets or sets a value of type String.


CoverPageCollection Property (PrintDialog)

CoverPageCollection is a property that will return a collection of cover pages that are available for use. Iterate through the collection to find the cover page you want to use, then set the active cover page by setting the CoverPage property.

Settings and Return Values

Returns a collection object of type CoverPageCollection.

Remarks

This property is read-only.


CoverPageComments Property (PrintDialog)

CoverPageComments is a property that represents the cover page comments.

These are extra comments put onto the cover page so a user can write a message to the recipient(s).

Settings and Return Values

Gets or sets a value of type String.


FaxDelayTransmission Property (PrintDialog)

FaxDelayTransmission is a property that represents if the item to be faxed should be queued by the fax server to be faxed at a later time, determined by the fax server.

Settings and Return Values

Gets or sets a value of type Boolean.

Remarks

This property is only valid if the print device is of type Fax.


FaxFineMode Property (PrintDialog)

FaxFineMode is a property that represents if the item to be faxed should be faxed in fine mode at a higher resolution (vs. coarse mode).

Settings and Return Values

Gets or sets a value of type Boolean.

Remarks

This property is only valid if the print device is of type Fax.

Fine mode provides better transmission quality, but means sending more data and taking more time, thus costing more money.


FaxNotifyOnce Property (PrintDialog)

FaxNotifyOnce is a property that represents if one notification should be received when all recipients have successfully received the item to be faxed, versus a separate notification for each recipient.

Settings and Return Values

Gets or sets a value of type Boolean.

Remarks

This property is only valid if the print device is of type Fax.

When NotifyOnce is set to True, the sender will be notified via the MessageAlert Tool when the fax has been sent to all recipients. MessageAlert Tool pops up on the client and tells the user the fax has been sent. This is applicable to the fat client, not the web client.


FaxRecipients Property (PrintDialog)

FaxRecipients is a property that is used to represent the collection of fax recipients, people that are intended to receive the next fax transmission.

Settings and Return Values

Gets or sets a collection of type FaxRecipientCollection.

Remarks

This property is only valid if the print device is of type Fax.


JobsInPrintQueue Property (PrintDialog)

JobsInPrintQueue is a property that represents the number of jobs currently in the print queue.

Settings and Return Values

Gets a value of type Long.

Remarks

This property is read-only


PageRange Property (PrintDialog)

PageRange is a property that represents the page range to be printed.

Settings and Return Values

Gets or sets a value of type String.

Remarks

This property is valid only when the PrintSelection property is otSelectedDocument.

Enter page numbers and/or page ranges separated by commas. For example, 1,3,5-12


PrintDeviceCollection Property (PrintDialog)

PrintDeviceCollection is a property that represents a collection of print devices.

Settings and Return Values

Gets an object of type PrintDeviceCollection.

Remarks

This property is read-only


PrintSelection Property (PrintDialog)

PrintSelection is a property that represents what should be printed or faxed.

Settings and Return Values

Gets or sets a value of type PrintSelection.


RenderAnnotations Property (PrintDialog)

RenderAnnotations is a property that represents if annotations should be rendered.

Settings and Return Values

Gets or sets a value of type Boolean.

Remarks

If RenderAnnotations is set to True, redactions are still rendered depending on the user's security.


RenderOverlay Property (PrintDialog)

RenderOverlay is a property that represents if overlays should be rendered.

Settings and Return Values

Gets or sets a value of type Boolean.


RotateToFit Property (PrintDialog)

RotateToFit is a property that represents if the item to be printed should be rotated to fit.

Settings and Return Values

Gets or sets a value of type Boolean.


SelectedPrinter Property (PrintDialog)

SelectedPrinter is a property that represents the print device that is currently selected.

Settings and Return Values

Gets or sets an object of type PrintDevice.


SizeToFit Property (PrintDialog)

SizeToFit is a property that represents if the item to be printed should be sized to fit.

Settings and Return Values

Gets or sets a value of type Boolean.


IBPM SDK Print Dialog Tool

IBPM SDK Print Dialog Tool Collections

For more information about objects, see IBPM SDK Print Dialog Tool Objects for a specific object topic.

IBPM SDK Print Dialog Tool Collection Summary

CoverPageCollection

FaxRecipientCollection

PrintDeviceCollection

PrintAttributeCollection


CoverPageCollection

CoverPageCollection object

CoverPageCollection is an object that represents a collection of cover pages.

Remarks

This object is a collection of objects of type CoverPage


_NewEnum Property (CoverPageCollection)

_NewEnum is a hidden property used to support the For Each ... Next syntax within Visual Basic.

Settings and Return Values

None.

Remarks

This property is rarely called directly. Instead, it allows a collection to be accessed using the For Each ... Next syntax in Visual Basic. For more information, see help for the For Each ... Next syntax in the Visual Basic documentation.


Count Property (CoverPageCollection)

Indicates the number of objects in a collection.

Settings and Return Values

Gets a value of type Long.

Remarks

Use the Count property to determine how many objects are in a given collection.

Because numbering for members of a collection begins with one, you should always code loops starting with the one member and ending with the value of the Count. If you are using Microsoft Visual Basic and want to loop through the members of a collection without checking the Count property, use the For Each...Next command.

If the Count property is zero, there are no objects in the collection.


Item Property (CoverPageCollection)

Indicates a specific member of a collection by ordinal number.

Settings and Return Values

Gets a value of type CoverPage.

Parameters

Index - A Long expression that evaluates to the ordinal number of an object in a collection.

Remarks

Use the Item property to return a specific object in a collection. The index for a collection always starts at one and goes up to the value of the collections Count Property. If Item cannot find an object in the collection corresponding to the Index argument, an error occurs. The Item property is the default property for all collections; therefore, the following syntax forms are interchangeable:

collection.Item ( Index )

collection ( Index )


FaxRecipientCollection

FaxRecipientCollection object

FaxRecipientCollection is an object that represents a collection of print devices.

Remarks

This object is a collection of objects of type FaxRecipient


_NewEnum Property (FaxRecipientCollection)

_NewEnum is a hidden property used to support the For Each ... Next syntax within Visual Basic.

Settings and Return Values

None.

Remarks

This property is rarely called directly. Instead, it allows a collection to be accessed using the For Each ... Next syntax in Visual Basic. For more information, see help for the For Each ... Next syntax in the Visual Basic documentation.


Count Property (FaxRecipientCollection)

Indicates the number of objects in a collection.

Settings and Return Values

Gets a value of type Long.

Remarks

Use the Count property to determine how many objects are in a given collection.

Because numbering for members of a collection begins with one, you should always code loops starting with the one member and ending with the value of the Count. If you are using Microsoft Visual Basic and want to loop through the members of a collection without checking the Count property, use the For Each...Next command.

If the Count property is zero, there are no objects in the collection.


Item Property (FaxRecipientCollection)

Indicates a specific member of a collection by ordinal number.

Settings and Return Values

Gets a value of type FaxRecipient.

Parameters

Index - A Long expression that evaluates to the ordinal number of an object in a collection.

Remarks

Use the Item property to return a specific object in a collection. The index for a collection always starts at one and goes up to the value of the collections Count Property. If Item cannot find an object in the collection corresponding to the Index argument, an error occurs. The Item property is the default property for all collections; therefore, the following syntax forms are interchangeable:

collection.Item ( Index )

collection ( Index )


Add Method (FaxRecipientCollection)

Add is a method to add a FaxRecipient to the current collection.

Return Type

None.

Syntax

object.Add((FaxRecipient As Object))

Parameters

Part | Description
object | An expression evaluating to an object of type FaxRecipientCollection.
FaxRecipient | An expression evaluating to an object of type FaxRecipient


PrintAttributeCollection

PrintAttributeCollection object

PrintAttributeCollection is an object that represents a collection of print attributes.

Remarks

This object is returned by calling the GetPrintAttributes method on the PrintDevice object.


_NewEnum Property (PrintAttributeCollection)

_NewEnum is a hidden property used to support the For Each ... Next syntax within Visual Basic.

Settings and Return Values

None.

Remarks

This property is rarely called directly. Instead, it allows a collection to be accessed using the For Each ... Next syntax in Visual Basic. For more information, see help for the For Each ... Next syntax in the Visual Basic documentation.


AttributeType Property (PrintAttributeCollection)

AttributeType is a property that specifies what this collection contains.

Settings and Return Values

Gets or sets a value of type AttributeType.

Remarks

This property is read-only.


Count Property (PrintAttributeCollection)

Indicates the number of objects in a collection.

Settings and Return Values

Gets a value of type Long.

Remarks

Use the Count property to determine how many objects are in a given collection.

Because numbering for members of a collection begins with one, you should always code loops starting with the one member and ending with the value of the Count. If you are using Microsoft Visual Basic and want to loop through the members of a collection without checking the Count property, use the For Each...Next command.

If the Count property is zero, there are no objects in the collection.


Item Property (PrintAttributeCollection)

Indicates a specific member of a collection by ordinal number.

Settings and Return Values

Gets a value that represents a print attribute.

Parameters

Index - A Long expression that evaluates to the ordinal number of an object in a collection.

Remarks

Use the Item property to return a specific object in a collection. The index for a collection always starts at one and goes up to the value of the collections Count Property. If Item cannot find an object in the collection corresponding to the Index argument, an error occurs. The Item property is the default property for all collections; therefore, the following syntax forms are interchangeable:

collection.Item ( Index )

collection ( Index )


Name Property (PrintAttributeCollection)

Name is a property that specifies the name of this collection.

Settings and Return Values

Gets or sets a value of type String.

Remarks

This property is read-only.


PrintDeviceCollection

PrintDeviceCollection object

PrintDeviceCollection is an object that represents a collection of print devices.

Remarks

This object is returned by getting the PrintDeviceCollection property on the PrintDialog object.


_NewEnum Property (PrintDeviceCollection)

_NewEnum is a hidden property used to support the For Each ... Next syntax within Visual Basic.

Settings and Return Values

None.

Remarks

This property is rarely called directly. Instead, it allows a collection to be accessed using the For Each ... Next syntax in Visual Basic. For more information, see help for the For Each ... Next syntax in the Visual Basic documentation.


Count Property (PrintDeviceCollection)

Indicates the number of objects in a collection.

Settings and Return Values

Gets a value of type Long.

Remarks

Use the Count property to determine how many objects are in a given collection.

Because numbering for members of a collection begins with one, you should always code loops starting with the one member and ending with the value of the Count. If you are using Microsoft Visual Basic and want to loop through the members of a collection without checking the Count property, use the For Each...Next command.

If the Count property is zero, there are no objects in the collection.


Item Property (PrintDeviceCollection)

Indicates a specific member of a collection by ordinal number.

Settings and Return Values

Gets a value of type PrintDevice.

Parameters

Index - A Long expression that evaluates to the ordinal number of an object in a collection.

Remarks

Use the Item property to return a specific object in a collection. The index for a collection always starts at one and goes up to the value of the collections Count Property. If Item cannot find an object in the collection corresponding to the Index argument, an error occurs. The Item property is the default property for all collections; therefore, the following syntax forms are interchangeable:

collection.Item ( Index )

collection ( Index )


IBPM SDK™ Print Dialog Tool Reference

This section of the IBPM SDK™ Print Dialog Tool documentation contains topics for each object, collection, property, method, and enumeration. All of the components in the component are available in the IBPM SDK Print Dialog Tool Object Model Type Library (OTPrintTool.DLL). For more information, search for a specific topic in the index or refer to the following topics:

Collections

Objects

Enumerations


Example

 This Visual Basic example contains 2 forms:

MainForm.FRM | Code Screenshot
FaxRecips.FRM | Code Screenshot

MainForm.FRM

Dim user As OTACORDELib.User
Dim userToken As OTACORDELib.UserToken
Dim prtDevice As PrintDevice
Public prtDialog As PrintDialog     ' accessed from FaxRecips form

Private Sub buttonFaxRecipients_Click()
    FaxRecips.Show 1
End Sub

Private Sub Form_Load()
    ' Initialize gui components
    radioAllDocs.value = True
    EnableDisablePageRange
    EnableDisableOKButton

    ' Create an instance of a User
    Set user = New OTACORDELib.User

    ' Login and get User Token
    Set userToken = user.Login("", "", True)

    ' Create an instance of the Print Dialog
    Set prtDialog = New PrintDialog
    prtDialog.SetUserToken userToken
    prtDialog.Refresh True

    ' Get the print devices
    For Each prtDevice In prtDialog.PrintDeviceCollection
        comboPrinterName.AddItem prtDevice.Name
    Next

    editCopies.Text = prtDialog.Copies
    editPageRange.Text = prtDialog.PageRange

    If prtDialog.PrintSelection = otAllSelectedDocs Then
        radioAllDocs.value = True
    ElseIf prtDialog.PrintSelection = otAllSelectedPages Then
        radioViewedPages.value = True
    ElseIf prtDialog.PrintSelection = otSelectedDocument Then
        radioCurrentDoc.value = True
    ElseIf prtDialog.PrintSelection = otSelectedPage Then
        radioCurrentPage.value = True
    End If

    If prtDialog.RenderAnnotations Then
        checkAnnotations.value = 1
    End If

    If prtDialog.RenderOverlay Then
        checkOverlays.value = 1
    End If

    If prtDialog.SizeToFit Then
        checkSizeToFit.value = 1
    End If

    If prtDialog.RotateToFit Then
        checkRotateToFit.value = 1
    End If

    If prtDialog.FaxDelayTransmission Then
        checkDelayTrans.value = 1
    End If

    If prtDialog.FaxFineMode Then
        checkFineMode.value = 1
    End If

    If prtDialog.FaxNotifyOnce Then
        checkNotifyOnce.value = 1
    End If

    comboPrinterName.ListIndex = 0

    PopulateCoverPageItems

End Sub

Private Sub PopulateCoverPageItems()

    Dim cpc As CoverPageCollection
    Dim cp As CoverPage

    Set cpc = prtDialog.CoverPageCollection

    comboCoverPage.AddItem "(None)"

    For X = 1 To cpc.Count
        Set cp = cpc.Item(X)
        comboCoverPage.AddItem cp.Name
        Set cp = Nothing
    Next X
    Set cpc = Nothing

    comboCoverPage.ListIndex = 0

    editCoverPageComments.Text = prtDialog.CoverPageComments

End Sub

Private Sub buttonOK_Click()
    ' Set options from the dialog
    SetValues

    ' Create a Document ID
    Dim docid As New OTACORDELib.DocumentID
    docid.UniqueID = editUniqueId.Text
    docid.MimeType = editMimeType.Text
    docid.ProviderID = editProviderID.Text

    ' Create an Index ID
    Dim idxid As New OTACORDELib.IndexID
    idxid.IndexName = editIndexName.Text
    idxid.IndexID = editIndexID.Text
    idxid.IndexProvider = editIndexProvider.Text

    ' Print the IBPM Page
    prtDialog.AddAcordePage docid, idxid
    prtDialog.Print
End Sub

Private Sub SetValues()
    ' Get the selected print device
    Set prtDevice = prtDialog.GetPrintDevice(comboPrinterName.List(comboPrinterName.ListIndex))

    ' Validate and set the currently selected values for the print device
    prtDevice.DefaultPaperSize = comboPaperSize.List(comboPaperSize.ListIndex)
    prtDevice.DefaultResolution = comboResolution.List(comboResolution.ListIndex)
    prtDevice.DefaultSource = comboPaperSource.List(comboPaperSource.ListIndex)

    ' Set the printDialog print settings
    If (editCopies.Text <> "") Then
        prtDialog.Copies = Val(editCopies.Text)
    Else
        prtDialog.Copies = 1
    End If

    If checkDelayTrans.value = 1 Then
        prtDialog.FaxDelayTransmission = True
    Else
        prtDialog.FaxDelayTransmission = False
    End If

    If checkFineMode.value = 1 Then
        prtDialog.FaxFineMode = True
    Else
        prtDialog.FaxFineMode = False
    End If

    If checkNotifyOnce.value = 1 Then
        prtDialog.FaxNotifyOnce = True
    Else
        prtDialog.FaxNotifyOnce = False
    End If

    If checkAnnotations.value = 1 Then
        prtDialog.RenderAnnotations = True
    Else
        prtDialog.RenderAnnotations = False
    End If

    If checkOverlays.value = 1 Then
        prtDialog.RenderOverlay = True
    Else
        prtDialog.RenderOverlay = False
    End If

    If checkSizeToFit.value = 1 Then
        prtDialog.SizeToFit = True
    Else
        prtDialog.SizeToFit = False
    End If

    If checkRotateToFit.value = 1 Then
        prtDialog.RotateToFit = True
    Else
        prtDialog.RotateToFit = False
    End If

    If radioCurrentDoc.value = True Then
        prtDialog.PrintSelection = otSelectedDocument
        prtDialog.PageRange = txtPageRange.Text
    End If

    If radioCurrentPage.value = True Then
        prtDialog.PrintSelection = otSelectedPage
    End If

    If radioViewedPages.value = True Then
        prtDialog.PrintSelection = otAllSelectedPages
    End If

    If radioAllDocs.value = True Then
        prtDialog.PrintSelection = otAllSelectedDocs
    End If

    If comboCoverPage.ListIndex > 0 Then
        prtDialog.CoverPage = comboCoverPage.Text
    End If

    prtDialog.CoverPageComments = editCoverPageComments.Text

End Sub

Private Sub buttonCancel_Click()
    End
End Sub

Private Sub comboPrinterName_Click()
    Dim printerName As String
    Dim selectedItem As String
    Dim value As Variant
    Dim printAttribute As PrintAttributeCollection

    ' Clear out printer information first
    comboPaperSource.Clear
    comboPaperSize.Clear
    comboResolution.Clear
    labelDeviceType.Caption = ""
    labelAcordeServer.Caption = ""
    labelServerID.Caption = ""

    ' Make sure we have a selection
    If (comboPrinterName.ListIndex < 0) Then
        Exit Sub
    End If

    ' Get the printer name
    printerName = comboPrinterName.Text

    ' Get the selected printer
    Set prtDevice = prtDialog.GetPrintDevice(printerName)
    prtDialog.SelectedPrinter = prtDevice

    ' Set the printer information
    If prtDevice.DeviceType = otPrintDevice Then
        labelDeviceType.Caption = "Printer"
        EnableDisableFaxButtons False
    ElseIf prtDevice.DeviceType = otFaxDevice Then
        labelDeviceType.Caption = "Fax"
        EnableDisableFaxButtons True
    End If
    If prtDevice.IsAcordeServer Then
        labelAcordeServer.Caption = "Yes"
    Else
        labelAcordeServer.Caption = "No"
    End If
    labelServerID.Caption = prtDevice.ServerID

    ' Get the Paper Sources for this printer
    Set printAttribute = prtDevice.GetPrintAttributes(otPaperSources)
    For Each value In printAttribute
        comboPaperSource.AddItem value
    Next
    On Error Resume Next
    For i = 0 To comboPaperSource.ListCount - 1
        If comboPaperSource.List(i) = prtDevice.DefaultSource Then
            If Err.Number = 0 Then
                comboPaperSource.ListIndex = i
            End If
        End If
    Next i
    On Error GoTo 0
    If (comboPaperSource.ListIndex < 0) Then
        If (comboPaperSource.ListCount > 0) Then
            comboPaperSource.ListIndex = 0
        End If
    End If

    ' Get the Paper Sizes for this printer
    Set printAttribute = prtDevice.GetPrintAttributes(otPaperSizes)
    For Each value In printAttribute
        comboPaperSize.AddItem value
    Next
    On Error Resume Next
    For i = 0 To comboPaperSize.ListCount - 1
        If comboPaperSize.List(i) = prtDevice.DefaultPaperSize Then
            If Err.Number = 0 Then
                comboPaperSize.ListIndex = i
            End If
        End If
    Next i
    On Error GoTo 0
    If (comboPaperSize.ListIndex < 0) Then
        If (comboPaperSize.ListCount > 0) Then
            comboPaperSize.ListIndex = 0
        End If
    End If

    ' Get the Resolutions for this printer
    Set printAttribute = prtDevice.GetPrintAttributes(otResolutions)
    For Each value In printAttribute
        comboResolution.AddItem value
    Next
    On Error Resume Next
    For i = 0 To comboResolution.ListCount - 1
        If comboResolution.List(i) = prtDevice.DefaultResolution Then
            If Err.Number = 0 Then
                comboResolution.ListIndex = i
            End If
        End If
    Next i
    On Error GoTo 0
    If (comboResolution.ListIndex < 0) Then
        If (comboResolution.ListCount > 0) Then
            comboResolution.ListIndex = 0
        End If
    End If
End Sub

Private Sub EnableDisablePageRange()
    If radioCurrentDoc.value = True Then
        editPageRange.Enabled = True
        editPageRange.BackColor = &H80000005
    Else
        editPageRange.Enabled = False
        editPageRange.BackColor = &H8000000B
    End If
End Sub

Private Sub EnableDisableFaxButtons(bEnable As Boolean)
    checkDelayTrans.Enabled = bEnable
    checkFineMode.Enabled = bEnable
    checkNotifyOnce.Enabled = bEnable
    buttonFaxRecipients.Enabled = bEnable
End Sub

Private Sub EnableDisableOKButton()
    If editUniqueId.Text <> "" And _
            editMimeType.Text <> "" And _
            editProviderID.Text <> "" And _
            editIndexName.Text <> "" And _
            editIndexID.Text <> "" And _
            editIndexProvider.Text <> "" Then
        buttonOK.Enabled = True
    Else
        buttonOK.Enabled = False
    End If
End Sub

Private Sub radioCurrentPage_Click()
    EnableDisablePageRange
End Sub

Private Sub radioViewedPages_Click()
    EnableDisablePageRange
End Sub

Private Sub radioAllDocs_Click()
    EnableDisablePageRange
End Sub

Private Sub radioCurrentDoc_Click()
    EnableDisablePageRange
End Sub

Private Sub editIndexID_Change()
    EnableDisableOKButton
End Sub

Private Sub editIndexName_Change()
    EnableDisableOKButton
End Sub

Private Sub editIndexProvider_Change()
    EnableDisableOKButton
End Sub

Private Sub editMimeType_Change()
    EnableDisableOKButton
End Sub

Private Sub editProviderID_Change()
    EnableDisableOKButton
End Sub

Private Sub editUniqueId_Change()
    EnableDisableOKButton
End Sub

FaxRecips.FRM

Private Sub editCompany_Change()
    EnableDisableAddButton
End Sub

Private Sub editName_Change()
    EnableDisableAddButton
End Sub

Private Sub editPhoneNumber_Change()
    EnableDisableAddButton
End Sub

Private Sub EnableDisableAddButton()
    Dim bEnable As Boolean
    bEnable = False
    If editName.Text <> "" And editCompany.Text <> "" And editPhoneNumber.Text <> "" Then
        bEnable = True
    End If
    buttonAdd.Enabled = bEnable
End Sub

Private Sub Form_Load()
    Dim fr As FaxRecipient
    For X = 1 To MainForm.prtDialog.FaxRecipients.Count
        Set fr = MainForm.prtDialog.FaxRecipients.Item(X)
        listRecips.AddItem fr.Name + "|" + fr.Company + "|" + fr.PhoneNumber
        Set fr = Nothing
    Next X
End Sub

Private Sub buttonAdd_Click()
    Dim fr As New FaxRecipient
    fr.Name = editName.Text
    fr.Company = editCompany.Text
    fr.PhoneNumber = editPhoneNumber.Text
    MainForm.prtDialog.FaxRecipients.Add fr
    listRecips.AddItem editName.Text + "|" + editCompany.Text + "|" + editPhoneNumber.Text
    Set fr = Nothing
End Sub

Private Sub listRecips_Click()
    If listRecips.ListIndex >= 0 Then
        txt = listRecips.Text
        arr = Split(txt, "|")
        editName.Text = arr(0)
        editCompany.Text = arr(1)
        editPhoneNumber.Text = arr(2)
    Else
        editName.Text = ""
        editCompany.Text = ""
        editPhoneNumber.Text = ""
    End If
End Sub


IBPM SDK Print Dialog Tool Home Page

IBPM SDK Print Dialog Tool
www.Stellent.com
mail to: support@Stellent.com


OTPrintTool

OTPrintTool object

OTPrintTool supports the ITool interface.

Remarks

This interface is for internal use only.


Object Model Collection/Object Architecture

The Object Model Collection/Object Architecture

The general form of the IBPM SDK™ Print Dialog Tool object model conforms to a standard Collection/Object architecture. In this structure, a particular collection object contains its particular object type. The convention used throughout the model is such that the collection name is the plural form of the name of the object which it contains.

Typically, collections are populated by calling a method on an object.

Regardless of the how the collection is initialized and filled, all collections support the same basic methods and properties.

  • They all have a Count property which returns the number of items currently in the collection.
  • They have an Item property which will retrieve a contained item by ordinal value. All collections are 1 based, so the range of valid ordinals for the Item property will be from 1 to Count.


Type Libraries and Files

The following table lists the DLL file names and Type Library Names where the components in the IBPM SDK™ Print Dialog Tool are located. This information will be useful when adding Project References to include the IBPM SDK™ Print Dialog Tool components.

File | Type Library Name | Description
OTPrintTool.DLL | IBPM SDK Print Tools 1.0 Type Library | Contains all of the IBPM SDK Print Dialog Tool objects and collections


Programmer's Guide Overview

The IBPM SDK™ Print Dialog Tool Programmer's Guide will attempt to provide an overview of the components, concepts and methodologies that Stellent® has incorporated into the IBPM SDK™ Toolkit. It will provide a primer on many of the common techniques for using the toolkit. While studying the Toolkit can provide substantial insight into the way IBPM SDK functions, this guide is not intended to be a general introduction to the IBPM SDK product as a whole. As such, this IBPM SDK™ Print Dialog Tool Programmer's Guide and the associated reference guide assumes that the reader already has the prerequisite knowledge of IBPM SDK™ terminology and functionality.

To begin accessing the power of the IBPM SDK™ Print Dialog Tool, see the following sections.

Type Libraries and Files

The Object Model Collection/Object Architecture