Send Fax

DynamicPDF PrintManager supports faxing through the FaxPrintJob class. The FaxPrintJob class has ten overloaded constructors, eleven properties, six methods, and four events. Use the FaxOptions property to set properties specific to faxing.

Simple Fax Example

The following example demonstrates faxing a PDF document. Sending a fax is similar to sending a PDF to a printer, except you should use the FaxPrintJob rather than the PrintJob, and you will want to use the name of the fax service instead of the printer name.

FaxPrintJob faxPrintJob = new FaxPrintJob("FaxPrinterName", "9,1-555-389-4567", pdfFilePath);
faxPrintJob.Print();        
Dim MyFaxPrintJob As FaxPrintJob = New FaxPrintJob("FaxPrinterName", "9,1-555-389-4567", pdfFilePath)
MyFaxPrintJob.Print()      

Fax with Cover Page Example

DynamicPDF PrintManager uses the Microsoft Fax Cover Page Template standard for creating cover pages. You can add a server cover page (ServerCoverPage) or a local cover page (LocalCoverPage).

// Add a server cover page
faxPrintJob.FaxOptions.CoverPage = new ServerCoverPage("FileName");

// Add a local cover page
faxPrintJob.FaxOptions.CoverPage = new LocalCoverPage(@"Custom.cov");

Note: DynamicPDF PrintManager's local cover pages are a Microsoft cover page template file (.cov) where user-defined information is rendered onto the template at transmission time.

This example demonstrates adding a cover page on a server to a PDF document and sending it as a fax.

FaxPrintJob faxPrintJob = new FaxPrintJob("FaxPrinterName", "9,1-555-389-4567", pdfFilePath);
faxPrintJob.FaxOptions.CoverPage = new ServerCoverPage("confdent2");            
faxPrintJob.FaxOptions.CoverPage.Note = "Note";
faxPrintJob.FaxOptions.CoverPage.RecipientCity = "RecipientCity";
faxPrintJob.FaxOptions.CoverPage.RecipientCompany = "RecipientCompany";
faxPrintJob.FaxOptions.CoverPage.RecipientCountry = "RecipientCountry";
faxPrintJob.FaxOptions.CoverPage.RecipientDepartment = "RecipientDepartment";
faxPrintJob.FaxOptions.CoverPage.RecipientFaxNumber = "RecipientFaxNumber";
faxPrintJob.FaxOptions.CoverPage.RecipientHomePhone = "RecipientHomePhone";
faxPrintJob.FaxOptions.CoverPage.RecipientName = "RecipientName";
faxPrintJob.FaxOptions.CoverPage.RecipientOfficeLocation = "RecipientOfficeLocation";
faxPrintJob.FaxOptions.CoverPage.RecipientOfficePhone = "RecipientOfficePhone";
faxPrintJob.FaxOptions.CoverPage.RecipientState = "RecipientState";
faxPrintJob.FaxOptions.CoverPage.RecipientStreetAddress = "RecipientStreetAddress";
faxPrintJob.FaxOptions.CoverPage.RecipientTitle = "RecipientTitle";
faxPrintJob.FaxOptions.CoverPage.RecipientZip = "RecipientZip";
faxPrintJob.FaxOptions.CoverPage.SenderAddress = "SenderAddress";
faxPrintJob.FaxOptions.CoverPage.SenderCompany = "SenderCompany";
faxPrintJob.FaxOptions.CoverPage.SenderDepartment = "SenderDepartment";
faxPrintJob.FaxOptions.CoverPage.SenderFaxNumber = "SenderFaxNumber";
faxPrintJob.FaxOptions.CoverPage.SenderHomePhone = "SenderHomePhone";
faxPrintJob.FaxOptions.CoverPage.SenderName = "SenderName";
faxPrintJob.FaxOptions.CoverPage.SenderOfficeLocation = "SenderOfficeLocation";
faxPrintJob.FaxOptions.CoverPage.SenderOfficePhone = "SenderOfficePhone";
faxPrintJob.FaxOptions.CoverPage.SenderTitle = "SenderTitle";
faxPrintJob.FaxOptions.CoverPage.Subject = "Subject";
faxPrintJob.Print();        
Dim MyFaxPrintJob As FaxPrintJob = New FaxPrintJob("FaxPrinterName", "9,1-555-389-4567", pdfFilePath)
MyFaxPrintJob.FaxOptions.CoverPage = New ServerCoverPage("confdent2")  ' If FaxOptions.CoverPage is null, no cover page is added
'MyFaxPrintJob.FaxOptions.CoverPage = new LocalCoverPage("C:\\Temp\\Custom.cov"); ' uses a local .cov file

MyFaxPrintJob.FaxOptions.CoverPage.Note = "Note"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientCity = "RecipientCity"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientCompany = "RecipientCompany"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientCountry = "RecipientCountry"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientDepartment = "RecipientDepartment"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientFaxNumber = "RecipientFaxNumber"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientHomePhone = "RecipientHomePhone"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientName = "RecipientName"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientOfficeLocation = "RecipientOfficeLocation"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientOfficePhone = "RecipientOfficePhone"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientState = "RecipientState"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientStreetAddress = "RecipientStreetAddress"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientTitle = "RecipientTitle"
MyFaxPrintJob.FaxOptions.CoverPage.RecipientZip = "RecipientZip"
MyFaxPrintJob.FaxOptions.CoverPage.SenderAddress = "SenderAddress"
MyFaxPrintJob.FaxOptions.CoverPage.SenderCompany = "SenderCompany"
MyFaxPrintJob.FaxOptions.CoverPage.SenderDepartment = "SenderDepartment"
MyFaxPrintJob.FaxOptions.CoverPage.SenderFaxNumber = "SenderFaxNumber"
MyFaxPrintJob.FaxOptions.CoverPage.SenderHomePhone = "SenderHomePhone"
MyFaxPrintJob.FaxOptions.CoverPage.SenderName = "SenderName"
MyFaxPrintJob.FaxOptions.CoverPage.SenderOfficeLocation = "SenderOfficeLocation"
MyFaxPrintJob.FaxOptions.CoverPage.SenderOfficePhone = "SenderOfficePhone"
MyFaxPrintJob.FaxOptions.CoverPage.SenderTitle = "SenderTitle"
MyFaxPrintJob.FaxOptions.CoverPage.Subject = "Subject"
MyFaxPrintJob.Print()

FaxOptions

The FaxOptions class is how you set properties specific to faxing. Refer to the API documentation for specifics on each fax option.

FaxCoverPage

The FaxOptions class also has a CoverPage property. This property allows setting a FaxCoverPage to add a cover page to a fax. Refer to the API documentation for a complete list of properties (there are over twenty). Options include adding recipient and sender information, title, subject, and a note.

Fax Events

The FaxPrintJob class supports the following events.

In this topic