This method converts a document file to a PDF file using HotDocs PDF Advantage. The conversion is done automatically, so no user intervention is necessary, although some user interface may be displayed.
This method was introduced with the release of HotDocs 6.1 SP1.
If HotDocs PDF Advantage is not installed, this method will return an error.
void SaveDocAsPDF ( string docFileName, string destinationFileName )
Parameters | Description |
docFileName | The file system path for the document file to convert. This file must be one of the supported HotDocs document types (RTF, DOCX, WPD, HPD, HFD, PDF, EVY). |
destinationFileName | The file system path for the PDF file that will be created. |
The following Visual C# example converts an RTF document to a PDF file:
public class ExampleCode { static void Main() { HotDocs.Application app = new HotDocs.Application(); app.SaveDocAsPDF(@"C:\Documents\HotDocs\Templates\Testdoc.rtf", @"C:\Documents\HotDocs\Templates\Testdoc.pdf"); } }