Provides an interface for manipulating Fax files on a file system in .i3f or .TIF format.
Namespace: ININ.IceLib.UnifiedMessagingAssembly: ININ.IceLib.UnifiedMessaging (in ININ.IceLib.UnifiedMessaging.dll) Version: 0.0.0.0 (22.3.0.218)
Syntax
C# |
---|
public class FaxFile : IDisposable |
Visual Basic |
---|
Public Class FaxFile _ Implements IDisposable |
Remarks
Use the FaxFile class to create, read from or write to a .TIF or .i3f
formatted Fax file on a file system. You can add, remove and update
each Image representing a page in a Fax
and commit the changes to a .TIF or .i3f file on a file system. All
modifications are kept in memory until the SaveAs(String, StorageFormat) method is called.
The FaxFile class also provides methods for manipulating the envelopes necessary for submitting a Fax to an IC server. Before an .i3f file can be submitted for sending, one or more envelopes must be added and the Fax file saved to the file system. Use AddEnvelope(FaxEnvelope) to add a FaxEnvelope for each recipient who will receive a copy of the fax.
Note |
---|
Most fax terminals can't handle widths larger than 1728 pixels. If the width
of the Image will exceed 1728 pixels, it is recommended to
store the image in portrait orientation and set the FaxPageAttributes
instance to indicate that the image has been rotated. This can also be handled by specifying FitToPage when adding or updating pages. This will cause the image to be scaled to fit on the page. If FitToPage is not specified, no resizing will be done and the image will be cropped. |
The FaxFile class also provides methods for manipulating the envelopes necessary for submitting a Fax to an IC server. Before an .i3f file can be submitted for sending, one or more envelopes must be added and the Fax file saved to the file system. Use AddEnvelope(FaxEnvelope) to add a FaxEnvelope for each recipient who will receive a copy of the fax.
Note |
---|
Envelopes are not generally considered part of a Fax and are used
primarily for delivery purposes. It is recommended that you build the
fax containing envelopes in a temporary location in the file system.
That addressed Fax can then be deleted when the send
operation is complete. |
Examples
The following example demonstrates the creation and delivery of a new FaxFile.
CopyC#
_faxFile = new ININ.IceLib.UnifiedMessaging.FaxFile(); FaxPageAttributes pageAttributes = new FaxPageAttributes(); pageAttributes.Resolution = new PageResolution( Convert.ToInt32(faxPageImage.HorizontalResolution), Convert.ToInt32(faxPageImage.VerticalResolution)); _faxFile.AddPage(faxPageImage, pageAttributes); // Gather information about the intended recipients, delivery schedule, etc. from a user ... DateTime submitTime = DateTime.Now; foreach (FaxAddressee recipient in dlg.Recipients) { FaxEnvelope envelope = new FaxEnvelope(recipient, dlg.CoverPageTemplate, dlg.DeliverySchedule, dlg.DeliveryNotification, dlg.TransmitOptions); envelope.SenderId = icUser; // userId of IC user submitting the fax envelope.TimeSent = submitTime; _faxFile.AddEnvelope(envelope); } string tempFilename = System.IO.Path.GetTempFileName(); _faxFile.SaveAs(tempFilename, StorageFormat.I3F); UnifiedMessagingManager manager = UnifiedMessagingManager.GetInstance(IceLibSession); try { manager.SendFax(tempFilename); }
Inheritance Hierarchy
System..::..Object
ININ.IceLib.UnifiedMessaging..::..FaxFile
ININ.IceLib.UnifiedMessaging..::..FaxFile
Version Information
Supported for IC Server version 2015 R1 and beyond.
For 4.0, supported for IC Server version 4.0 GA and beyond.
For 3.0, supported for IC Server version 3.0 GA and beyond.
For 4.0, supported for IC Server version 4.0 GA and beyond.
For 3.0, supported for IC Server version 3.0 GA and beyond.