Class DocxToPdfRenderer
IronPdf.DocxToPdfRenderer allows any Docx to be turned into a PDF document using an up-to-date embedded Chrome browser.
Inheritance
Namespace: IronPdf
Assembly: IronPdf.dll
Syntax
public class DocxToPdfRenderer : Object
Constructors
DocxToPdfRenderer()
Create a new Docx To PDF renderer.
Declaration
public DocxToPdfRenderer()
Methods
RenderDocxAsPdf(String, DocxPdfRenderOptions, String)
Creates a PDF file from an Word document and returns it as an PdfDocument object which can be edited and saved to disk or served on a website.
Declaration
public PdfDocument RenderDocxAsPdf(string WordDocumentPath, DocxPdfRenderOptions Options = null, string Proxy = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | WordDocumentPath | The word document full path to be rendered as a PDF. |
DocxPdfRenderOptions | Options | An instance of DocxPdfRenderOptions that allows configuration of DocxRenderer "Docx to PDF" rendering parameters. |
System.String | Proxy | Specifies an Http proxy server. Use the pattern: http(s)://user-name:password@host:port |
Returns
Type | Description |
---|---|
PdfDocument | A PdfDocument with the Docx rendered as its contents. |
RenderDocxAsPdfAsync(String, DocxPdfRenderOptions)
Creates a PDF file from an Word document and returns it as an PdfDocument object which can be edited and saved to disk or served on a website.
Async version of the RenderDocxAsPdf method.
Declaration
public Task<PdfDocument> RenderDocxAsPdfAsync(string WordDocumentPath, DocxPdfRenderOptions Options = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | WordDocumentPath | The word document full path to be rendered as a PDF. |
DocxPdfRenderOptions | Options | An instance of DocxPdfRenderOptions that allows configuration of DocxRenderer "Docx to PDF" rendering parameters. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<PdfDocument> | A PdfDocument with the Docx rendered as its contents. |