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).
Example
of Convert PDF action
configuration on the current site
To
configure the action Convert to PDF additional properties
should be specified:
Configuration
|
Property
|
Required
|
Type
|
Description
|
|
Source
Library
|
yes
|
Choice
|
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, choosing the
site in the drop-down or typing a server relative URL to the site and
then selecting a library in 'Library' drop-down
- Dynamic path which allows to specify expression based path to the
library
|
|
Item Id
|
yes
|
Integer
|
ID of the document to be converted to pdf or
expression to be evaluated as ID of a document.
|
|
Target
|
yes
|
Choice
|
There are two options where converted pdf document
can be stored:
- Open in browser.
- Save to library.
|
|
Target
library
|
yes
|
Choice
|
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, choosing the
site in the drop-down or typing a server relative URL to the site and
then selecting a library in 'Library' drop-down
- Dynamic path which allows to specify expression based path to the
library
|
|
Folder
|
no
|
String
|
Library relative URL. If you want to store converted
pdf document to a new folder you can specify it in this property.
|
|
File name
|
no
|
String
|
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
|
yes
|
Choice
|
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 Forms
|
List Actions
|
Scheduled/Triggered Actions
|
|
✓
|
✓
|
✓*
|
*
In Scheduled/Triggered actions only converting files to PDF from the current
site's libraries is available.
Note: action is available only in SharePoint Online
Output
|
Output Parameter
|
Type
|
Description
|
|
ItemID*
|
Number
|
Returns the Id of the converted pdf document in a
library
|
|
FileName
|
String
|
Returns the file name of the pdf document
|
|
Url*
|
String
|
Absolute Url to the converted pdf document in a
library. Starts with
'https://'
|
|
ServerRelativeUrl*
|
String
|
Server relative path to the converted pdf document
in a library. Starts
with '/'
|
|
LibraryRelativeUrl*
|
String
|
Library 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"
Note:
There is a known issue when editing
a Word document and using the Convert to PDF action.
Sometimes, the Convert to PDF action does not immediately
reflect the most recent changes made to the Word document.
To handle
this scenario, you can do the following:
Option 1:
Use Copy document action
(to copy the edited word document)
Then Convert to PDF action
(use output ItemID from the Copy document action)
Finally, use Delete
item action to delete copied file (use output ItemID from
the Copy document action)
Option 2:
Use Generate
document action to generate document
Then Convert to PDF action
(use output ItemID from the Generate document action)
Finally, use Delete
item action (use output ItemID from the Generate
document action)