Click or drag to resize

Word to PDF Element

WordToPdfElement draws a Word document - .docx, .doc, RTF and the other formats of the Word to PDF converter - at a position on a PDF page, like HTML to PDF Converter Element does for HTML. A document longer than the page continues on the following pages.

Adding a Word document to a page
using ExpertPdf.Anywhere.PdfDocument;

Document document = new Document();
PdfPage page = document.AddPage();
PdfFont font = document.AddFont(StdFontBaseFamily.HelveticaBold);
page.AddElement(new TextElement(0, 0, "Quarterly report", font));

// the Word document below the title, the full width of the page, as long as it
// needs to be (it continues on new pages)
WordToPdfElement word = new WordToPdfElement(0, 30, "report.docx");
page.AddElement(word);

document.Save("report.pdf");
document.Close();
Options

A Word document can also be the header or footer of a Word to PDF conversion: set WordToPdfArea on the converter's header or footer options.

See Also