|
FaxResourceSend Method (String) |
Sends the specified document as a fax from the specified file and path.
Namespace:
VoiceElements.Client
Assembly:
VoiceElementsClient (in VoiceElementsClient.dll) Version: 8.6.1.1
Syntax public FaxResult Send(
string filename
)
Public Function Send (
filename As String
) As FaxResult
public:
FaxResult Send(
String^ filename
)
member Send :
filename : string -> FaxResult
Parameters
- filename
- Type: SystemString
This is the path and filename of the document file you would like to send as a Fax.
Return Value
Type:
FaxResultThis method returns a
Fax Result. See the
enumeration definition for an explanation of all possible results.
Remarks Getting Your Fax Resource
Before calling this method, you will want to use the
Get Fax Resource to acces a Fax Resource object on which to call the receive method.
Also note that at any time you may query the
Fax Resource Property of the Channel to get access to this object.
Make Sure You Have Fax Licenses
Note that
Fax Resources are limited to the number of Fax licenses you have purchased. To obtain licenses, contact Inventive Labs sales.
Email us with this link.
Use Tiff File Format - Best Practices
Voice Elements uses
Tiff graphic files for transport. It is always a good idea to clean up a Tiff file for transport (get the resolution right and more).
We have provided a simple way to do this using the
Tiff to Tiff method. You should call this before transport as shown in the sample code below.
Don't Have Tiff Files? Convert Them
Voice Elements uses
Tiff graphic files for transport. If you don't have Tiff files to send, we have created simple ways to convert files using
the
Jpeg to Tiff method and the
Pdf to Tiff method. This is shown in the sample code below.
Don't Forget the Fax Result
Although the example below doesn't show this, you may want to switch on the reult and take actions in your application accordingly.
Examples
The example below shows using the returned
Fax Resource to Send or
Receive faxes using your channel.
Please note that in your production code, you will generally need to handle an
New Inbound Call Event to receive a fax or place an oubopund call using
a
Dial Method call. What is shown below is simply to illustrate the use of the resource and send / receive.
public static void SendReceiveFax()
{
TelephonyServer m_TelephonyServer = new TelephonyServer();
ChannelResource m_ChannelResource = m_TelephonyServer.GetChannel();
FaxResource m_FaxResource = m_ChannelResource.GetFaxResource();
string FaxCommand = "Send";
m_TelephonyServer.JpgToTif("test.jpg", "test.tif");
m_TelephonyServer.TifToTif("test.tif", "testfinal.tif");
string FaxFile = @"C:\FaxFiles\testfinal.tif";
switch (FaxCommand)
{
case "Send":
m_FaxResource.Send(FaxFile);
break;
case "Receive":
m_FaxResource.Receive(FaxFile);
break;
}
}
Public Shared Sub SendReceiveFax()
Dim m_TelephonyServer As New TelephonyServer()
Dim m_ChannelResource As ChannelResource = m_TelephonyServer.GetChannel()
Dim m_FaxResource As FaxResource = m_ChannelResource.GetFaxResource()
Dim FaxCommand As String = "Send"
m_TelephonyServer.JpgToTif("test.jpg", "test.tif")
m_TelephonyServer.TifToTif("test.tif", "testfinal.tif")
Dim FaxFile As String = "C:\FaxFiles\testfinal.tif"
Select Case FaxCommand
Case "Send"
m_FaxResource.Send(FaxFile)
Exit Select
Case "Receive"
m_FaxResource.Receive(FaxFile)
Exit Select
End Select
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also