Convert to PDF action allows you to convert the specified file to PDF. We support converting a wide variety of files: Microsoft Word documents (DOC, DOCX), Excel spreadsheets (XLS, XLSX) and PowerPoint files (PPT, PPTX).

For more information about Action Builder read Action Builder introduction article.

To configure the action Convert to PDF additional properties should be specified:

Configuration

PropertyRequiredTypeDescription

Source Library

yesChoice

A library where source document is located. It is possible to select:

  • from the current site, by selecting the 'On current site' option. The drop-down shows all available libraries on the site.
  • from any site, by selecting 'On any site' option and specifying the list in 'Select  Library' dialog or typing a server relative URL to a library.
  • Dynamic path which allows to specify expression based path to file
Item IdyesIntegerID of the document to be converted to pdf or expression to be evaluated as ID of a document.
TargetyesChoice

There are two options where converted pdf document can be stored:

- Open in browser. 

- Save to library.

Target libraryyesChoice

A library where converted pdf document will be stored.  It is possible to select:

  • from the current site, by selecting the 'On current site' option. The drop-down shows all available libraries on the site.
  • from any site, by selecting 'On any site' option and specifying the list in 'Select  Library' dialog or typing a server relative URL to a library.
  • Dynamic path which allows to specify expression based path to file
FoldernoString

Library relative URL. If you want to store converted pdf document to a new folder you can specify it in this property.

File namenoString

Fixed file name for pdf document or dynamically calculated using an expression. Leave empty in order to use the original file name with the pdf extension.

If already exists
yesChoice

If the file with the same name already exists you have several option to specify:
- Overwrite. It will overwrite to exiting document in the target document library.
- Rename and keep both. It will rename document you want to move and keep existing one.
- Fail. Action will fail with an error: A file or folder with the name [[FileName]] already exists at the destination.

 

Availability

Modern FormsList ActionsScheduled/Triggered Actions

 

Example of Convert PDF action configuration on the current site

ConvertToPDFAction.png

 

Output

Output ParameterTypeDescription
ItemID*NumberReturns the Id of the converted pdf document in a library 
FileNameStringReturns the file name of the pdf document
Url*StringAbsolute Url to the converted pdf document in a library. Starts with 'https://'
ServerRelativeUrl*StringServer relative path to the converted pdf document in a library. Starts with '/'
LibraryRelativeUrl*StringLibrary relative path to the converted pdf document in a library. Starts with file name

*Output parameter value is available in a case of using option "Save to library"

ConverToPDFOutputs.png