Skip to main content

Convert Word to PDF

Easily convert Word documents to PDFs using The DynamicPDF API's pdf endpoint.

Convert Word documents to PDFs using the pdf endpoint. Call the pdf endpoint directly or using one of our client libraries.


Check out Getting Started and Task Roadmap if you are new to The DynamicPDF API.

Calling Endpoint Directly

Convert from a Word document to a PDF using the word element in a JSON instructions document.

The following example illustrates the steps in converting a simple word document to a PDF.

  • Create an instructions.json document that specifies word as the input and the word document as the resourceName.
  • Add the authorization key as a header.
  • Add the Instructions document as a file and the Word document as a file.
curl --location ''
--header 'Authorization: Bearer --api-key--
--form 'Instructions=@C:/temp/solutions/word-pdf/instructions.json'
--form 'Resource=@C:/temp/solutions/word-pdf/Doc1.docx'

Run In Postman


See the Merge PDFs and Other Resources for more information on how you can merge multiple Word documents and other resources into a combined PDF.

Calling Endpoint Using Client Library

Easily convert a Word to a PDF using the WordInput class or its equivalent using the C#, Java, Node.js, PHP, Go, or Python. More details and examples are provided in the pdf Inputs documentation.

The following example illustrates creating a PDF from a Word document.

Pdf pdf = new Pdf();
pdf.ApiKey = apiKey;
pdf.AddWord(new WordResource(basePath + "/Doc1.docx"));
PdfResponse pdfResponse = pdf.Process();
Source: WordConversion.cs

You can also add a resource using an input, as this Word example illustrates.

Pdf pdf = new Pdf();
WordResource wordResource = new WordResource(basePath + "Doc1.docx");
WordInput word = new WordInput(wordResource);
return pdf;

The pdf endpoint takes a JSON instructions document that provides instructions for creating, transforming, merging, and formatting inputs into a combined PDF. Refer to documentation on the instructions schema for information on how to use the pdf endpoint.

   Follow us on social media for latest news!