capabilities.work

Generate Document and Convert to PDF

A 4-step recipe with Microsoft Word. We can help you get access.

Recipe · 4 steps

Generate Document and Convert to PDF

Create a document, add a paragraph and table, and convert to PDF.

  1. Create a new Open XML Word document with the supplied filename, title, and author. The service returns 201 with the new document.
  2. Add a paragraph to the document body. The service returns 201 with the created paragraph.
  3. Add a table with the requested rows and columns to the document. The service returns 201 with the created table.
  4. Convert the finished document to the requested target format. The service returns 200 with the converted binary content.
What you'll need to have ready
  • filename: The desired filename for the new document.
  • title: The document title property.
  • author: The document author property.
  • paragraphText: The text content of the paragraph to add.
  • tableRows: The number of rows for the table to add.
  • tableColumns: The number of columns for the table to add.
  • targetFormat: The conversion target format (pdf, html, txt, rtf).
For your developer

Arazzo workflow microsoft-word:generate-and-convert, 4 operations: createDocument → addParagraph → insertTable → convertDocument. Specs on APIs.io.