Plumsail Documents

The API allows you to create documents from templates (DOCX or HTML file), convert it to PDF and many more. Visit https://plumsail.com/documents for more information

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
Flow Standard All Flow regions except the following:
     -   US Government (GCC)
PowerApps Standard All PowerApps regions except the following:
     -   US Government (GCC)

Creating a connection

To connect your account, you will need the following information:

Name Type Description
API Key securestring

The API Key for this api

Throttling Limits

Name Calls Renewal Period
API calls per connection120060 seconds

Actions

Add a watermark to PDF

Adds a text watermark to PDF

Convert DOC to DOCX

It takes DOC document and converts it to DOCX

Convert DOCX to PDF

It takes DOCX document and converts it to PDF

Convert HTML to PDF

It takes HTML markup, renders it and converts to PDF document

Convert PDF to Image

It takes PDF document and converts it to Image (jpeg, png, gif, bmp)

Convert PPT to PPTX

It takes PPT document and converts it to PPTX

Convert PPTX to PDF

It takes PPTX document and converts it to PDF

Convert XLS to XLSX

It takes XLS document and converts it to XLSX

Convert XLSX to PDF

It takes XLSX document and converts it to PDF

Create DOCX document from template

Created Word DOCX document from template. More information: https://plumsail.com/docs/actions/v1.x/document-generation/docx/index.html

Create HTML from template

It takes input HTML template string or file and replaces special {{Tokens}} by specified data. We use Mustache framework for templates internally. More information about templates in Mustache docs: http://mustache.github.io/mustache.5.html

Create XLSX document from template

Created Excel XLSX document from template. More information: https://plumsail.com/docs/actions/v1.x/document-generation/xlsx/index.html

Extract text from PDF document

It takes PDF document and extracts text to Raw or HTML format

Fill in PDF Form

Filling out PDF form by provided data

Fill merge fields in DOCX document

It takes a DOCX document with merge fields and replaces them by specified data. The keys in data object should be the same as names of MergeFields (Express block) in document

Get Form from PDF

Returns fillable form data from PDF as JSON

Merge Docx

It takes an array of Docx documents and merge it into single file

Merge PDF

It takes an array of PDF documents and merge it

Parse CSV

It works like Parse JSON but for CSV file

Protect PDF document

Adds passwords, copy-, printing-, and other protections to PDF file

Regular Expression Match

Searches an input string for all occurrences of a regular expression and returns all the matches. We would recommend you to use Regex Hero to test your expressions. It supports the same syntax as actions

Regular Expression Replace

In a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string. We would recommend you to use Regex Hero to test your expressions. It supports the same syntax as actions

Regular Expression Test

Indicates whether the regular expression specified in the Regex constructor finds a match in a specified input string. We would recommend you to use Regex Hero to test your expressions. It supports the same syntax as actions

Split PDF

It takes PDF document and split it

Add a watermark to PDF

Adds a text watermark to PDF

Parameters

Name Key Required Type Description
Type
type True string

The type of the watermark

request
request True dynamic

The type of the watermark

Returns

Convert DOC to DOCX

It takes DOC document and converts it to DOCX

Parameters

Name Key Required Type Description
Document content
documentContent True byte

Content of document that should be converted

Returns

Result file
binary

Convert DOCX to PDF

It takes DOCX document and converts it to PDF

Parameters

Name Key Required Type Description
Document content
documentContent True byte

Content of document that should be converted

Returns

Convert HTML to PDF

It takes HTML markup, renders it and converts to PDF document

Parameters

Name Key Required Type Description
Source HTML
html True byte

HTML markup that should be converted to PDF

Header HTML
headerHtml string

HTML markup that should be added as a header

Footer HTML
footerHtml string

HTML markup that should be added as a footer

Papper Size
size string

Can be A4,A5 etc...

Orientation
orientation string

Portrait vs Landscape

Margins
margins string

The page margins that separated ' '. Way of setting values as in CSS

Returns

Convert PDF to Image

It takes PDF document and converts it to Image (jpeg, png, gif, bmp)

Parameters

Name Key Required Type Description
Content of the PDF document
documentContent True byte

Raw content of PDF document

Image Format
format string

The format of the result image

Start Page
startPage integer

The first page to start extraction (1 based)

End Page
endPage integer

The last page to extract (inclusive)

Pages
pages string

Page numbers for extraction separated by ';' (only this pages will be extracted)

DPI
dpi integer

The resolution of the result image

Password
password string

Password to decrypt document

Returns

Convert PPT to PPTX

It takes PPT document and converts it to PPTX

Parameters

Name Key Required Type Description
Document content
documentContent True byte

Content of document that should be converted

Returns

Result file
binary

Convert PPTX to PDF

It takes PPTX document and converts it to PDF

Parameters

Name Key Required Type Description
Document content
documentContent True byte

Content of document that should be converted

Returns

Result file
binary

Convert XLS to XLSX

It takes XLS document and converts it to XLSX

Parameters

Name Key Required Type Description
Document content
documentContent True byte

Content of document that should be converted

Returns

Result file
binary

Convert XLSX to PDF

It takes XLSX document and converts it to PDF

Parameters

Name Key Required Type Description
Document content
documentContent True byte

Content of document that should be converted

Returns

Result file
binary

Create DOCX document from template

Created Word DOCX document from template. More information: https://plumsail.com/docs/actions/v1.x/document-generation/docx/index.html

Parameters

Name Key Required Type Description
Document content
documentContent binary

Content of the template

Locale
locale string

The locale that will be applyed to the document

Returns

Result file
binary

Create HTML from template

It takes input HTML template string or file and replaces special {{Tokens}} by specified data. We use Mustache framework for templates internally. More information about templates in Mustache docs: http://mustache.github.io/mustache.5.html

Parameters

Name Key Required Type Description
Source HTML
html byte

Text HTML template or HTML file template

Locale
locale string

The locale that will be applyed to the document

Returns

Create XLSX document from template

Created Excel XLSX document from template. More information: https://plumsail.com/docs/actions/v1.x/document-generation/xlsx/index.html

Parameters

Name Key Required Type Description
Document content
documentContent binary

Content of the template

Locale
locale string

The locale that will be applyed to the document

Returns

Result file
binary

Extract text from PDF document

It takes PDF document and extracts text to Raw or HTML format

Parameters

Name Key Required Type Description
Content of the PDF document
documentContent True byte

Raw content of PDF document

Result Type
resultType string

Raw or HTML

Start Page
startPage integer

The first page to start extraction (1 based)

End Page
endPage integer

The last page to extract (inclusive)

Password
password string

Password to decrypt document

Returns

Fill in PDF Form

Filling out PDF form by provided data

Parameters

Name Key Required Type Description
Content of the PDF document
documentContent byte

Raw content of PDF document

JSON data
jsonData True string

The data that will be used to fill out the form

Returns

Fill merge fields in DOCX document

It takes a DOCX document with merge fields and replaces them by specified data. The keys in data object should be the same as names of MergeFields (Express block) in document

Parameters

Name Key Required Type Description
DOCX document content
docxDocument byte

Raw content of docx document template. MergeField names should be the same as keys in template data

Returns

Get Form from PDF

Returns fillable form data from PDF as JSON

Parameters

Name Key Required Type Description
Content of the PDF document
documentContent True byte

Raw content of PDF document

Password
password string

Password to decrypt document

Returns

Merge Docx

It takes an array of Docx documents and merge it into single file

Parameters

Name Key Required Type Description
Content of Docx documents
Content of Docx documents binary

It takes an array of Docx documents and merge it into single file

Returns

Merge PDF

It takes an array of PDF documents and merge it

Parameters

Name Key Required Type Description
Content of PDF documents
Content of PDF documents binary

It takes an array of PDF documents and merge it

Returns

Result file
binary

Parse CSV

It works like Parse JSON but for CSV file

Parameters

Name Key Required Type Description
Headers
headers string

Comma separated list of columns

Content of CSV document
content True byte

Content of CSV document

Delimiter
delimiter string

Delimiter of columns (by default it is just comma)

Returns

The outputs of this operation are dynamic.

Protect PDF document

Adds passwords, copy-, printing-, and other protections to PDF file

Parameters

Name Key Required Type Description
Content of the PDF document
documentContent True byte

Raw content of PDF document

Enable printing
allowPrinting True boolean

Protect the PDF file from being printed out

Enable modification
allowModification True boolean

Protect the PDF file from being edited

Enable extract data
allowExtract True boolean

Allows extraction of text, images, and other media from the PDF file

Enable annotate
allowAnnotate True boolean

Allows annotation (e.g. comments, form fill-in, signing) of the PDF file

PDF owner password
newOwnerPassword string

Enter an optional owner password here. This password can be used to disable document restrictions

PDF user password
newUserPassword string

Enter an optional user password here. Each time an user opens the PDF he will be asked for this password. If you do not want a password prompt then leave this field blank

Password
password string

Password to decrypt document

Returns

Regular Expression Match

Searches an input string for all occurrences of a regular expression and returns all the matches. We would recommend you to use Regex Hero to test your expressions. It supports the same syntax as actions

Parameters

Name Key Required Type Description
Pattern
pattern True string

Regular expression pattern

Text
text True string

String to search for matches

Returns

The outputs of this operation are dynamic.

Regular Expression Replace

In a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string. We would recommend you to use Regex Hero to test your expressions. It supports the same syntax as actions

Parameters

Name Key Required Type Description
Replacement
replacement True string

Replacement string

Pattern
pattern True string

Regular expression pattern

Text
text True string

String to search for matches

Returns

Regular Expression Test

Indicates whether the regular expression specified in the Regex constructor finds a match in a specified input string. We would recommend you to use Regex Hero to test your expressions. It supports the same syntax as actions

Parameters

Name Key Required Type Description
Pattern
pattern True string

Regular expression pattern

Text
text True string

String to search for matches

Returns

Split PDF

It takes PDF document and split it

Parameters

Name Key Required Type Description
Content of the PDF document
documentContent True byte

Raw content of PDF document

Start Page
startPage integer

The first page to start split (1 based)

End Page
endPage integer

The last page to split (inclusive)

Split At Page
splitAtPage integer

Number of pages per partition

Password
password string

Password to decrypt document

Returns

Definitions

DocumentProcessingResponse

Name Path Type Description
Result file
fileContent byte

The result as a file

ApplyHtmlTemplateResponse

Name Path Type Description
Result HTML
htmlResult string

Raw HTML result

DocumentsArrayResponse

Name Path Type Description
Result files
resultFilesContents array of byte

The array of raw content of result files

StringResultResponse

Name Path Type Description
Result
result string

BooleanResultResponse

Name Path Type Description
IsSuccess
isSuccess boolean