Click or drag to resize
Pdf Library for .NET

WordToPdfConvertFile(String, WordFormat) Method

Converts the Word document at the given path to pdf, reading it as the given format.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public PdfDocument ConvertFile(
	string filePath,
	WordFormat format
)

Parameters

filePath  String
The path of the Word document. Cannot be null or empty.
format  WordFormat
The format the file is read as.

Return Value

PdfDocument
A PdfDocument containing the converted content. The caller is responsible for saving and closing the returned document.
Exceptions
ExceptionCondition
WordToPdfException Thrown when filePath is null or empty, the file does not exist, or the document cannot be read or rendered.
See Also