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()
DocxToPdfRenderer(DocxPdfRenderOptions)
Create a new Docx to PDF renderer using the specified options
Declaration
public DocxToPdfRenderer(DocxPdfRenderOptions Options)
Parameters
Type | Name | Description |
---|---|---|
DocxPdfRenderOptions | Options | Rendering options |
Properties
RenderingOptions
Rendering options
Declaration
public DocxPdfRenderOptions RenderingOptions { get; set; }
Property Value
Type | Description |
---|---|
DocxPdfRenderOptions |
Methods
RenderDocxAsPdf(Byte[], 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.
Declaration
public PdfDocument RenderDocxAsPdf(byte[] WordDocumentBytes, DocxPdfRenderOptions Options = null)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | WordDocumentBytes | The word document byte array 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 |
---|---|
PdfDocument | A PdfDocument with the Docx rendered as its contents. |
RenderDocxAsPdf(Stream, 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.
Declaration
public PdfDocument RenderDocxAsPdf(Stream WordDocumentStream, DocxPdfRenderOptions Options = null)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | WordDocumentStream | The word document stream 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 |
---|---|
PdfDocument | A PdfDocument with the Docx rendered as its contents. |
RenderDocxAsPdf(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.
Declaration
public PdfDocument RenderDocxAsPdf(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 |
---|---|
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. |
RenderDocxMailMergeAsPdf<TRecipientsDataModel>(List<TRecipientsDataModel>, String, DocxPdfRenderOptions)
Declaration
public IEnumerable<PdfDocument> RenderDocxMailMergeAsPdf<TRecipientsDataModel>(List<TRecipientsDataModel> recipientsDataList, string WordDocumentPath, DocxPdfRenderOptions Options = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<TRecipientsDataModel> | recipientsDataList | |
System.String | WordDocumentPath | |
DocxPdfRenderOptions | Options |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PdfDocument> |
Type Parameters
Name | Description |
---|---|
TRecipientsDataModel |
RenderDocxMailMergeAsPdfAsync<TRecipientsDataModel>(List<TRecipientsDataModel>, 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<IEnumerable<PdfDocument>> RenderDocxMailMergeAsPdfAsync<TRecipientsDataModel>(List<TRecipientsDataModel> RecipientsDataList, string WordDocumentPath, DocxPdfRenderOptions Options = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<TRecipientsDataModel> | RecipientsDataList | List of recepient data |
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<System.Collections.Generic.IEnumerable<PdfDocument>> | A PdfDocument with the Docx rendered as its contents. |
Type Parameters
Name | Description |
---|---|
TRecipientsDataModel |