POST api/Document/ConvertToPDF
Converts selected documents to PDFs
Request Information
URI Parameters
None.
Body Parameters
WorkPoint365.WebAPI.Model.Document+DocumentToPDFConversionParameter| Name | Description | Type | Additional information |
|---|---|---|---|
| Items | Collection of Object |
None. |
|
| TargetBusinessModule | globally unique identifier |
Required |
|
| TargetBusinessModuleEntity |
Gets or sets the identifier of the destination business module entity. For current entity, select Entity.ID from the context. |
integer |
Required |
| TargetList |
The destination library on the entity site. |
string |
Required |
| TargetFolder | string |
None. |
|
| OutputExistsBehaviour |
The behaviour if the output document already exists in the destination folder or library. |
WorkPoint365.WebAPI.Model.Document+OutputExistsBehaviour |
Required |
| PdfFormat |
The PDF conversion format. If not specified the default PDF format will be used. |
WorkPoint365.WebAPI.Model.Document+ValidPdfFormat |
None. |
| UseStepInputValues |
Should the step use the values from the step input when creating the items. Not applicaple in Combine Files Mode. |
boolean |
None. |
| SourceItemFieldsToCopyToPdfItem |
Option to copy source item fields to the combined pdf item. You can specify which fields to copy by entering the internal field names. |
Collection of string |
None. |
| CombineFiles |
Option to select if the converted PDFs should be Concactated |
boolean |
None. |
| FieldValues |
Collection of the field values for the combined file(s) |
Dictionary of string [key] and Object [value] |
None. |
| MaxCombineSizeInMB |
Option to select the max size of the combined file. If the combined file exceeds this size. The file will be split into multiple files. Leave empty to not split the combined file based on size. |
integer |
None. |
| AddPageNumbers |
Option to Add page numbers |
boolean |
None. |
| AddIndex |
Add index page (yes|no) |
boolean |
None. |
| IndexPlacementOption |
Select the placement of the index for the combined pdf file. This option is not applicable if 'Add Index' is not selected. |
WorkPoint365.WebAPI.Model.Document+DocumentToPDFConversionParameter+IndexPlacement |
None. |
| AddDocumentOutline |
Add Document Outline |
boolean |
None. |
| AddSourceInformation |
Option to Add Source Information |
boolean |
None. |
| DocumentVersion |
Option for which Version to use |
WorkPoint365.WebAPI.Model.Document+DocumentToPDFConversionParameter+Version |
None. |
| Async |
Option to run the pdf creation as job. Optimal for large documents or a large amount of documents. If selected, the process will run asynchronously and will continue when all documents are converted, combined and saved. If not selected, the process will run synchronously and the output document(s) will be saved as soon as each document is converted or combined. |
boolean |
None. |
| CallbackUrl |
Option for Callback Url |
string |
None. |
| CallbackHeaders |
Option for Callback Headers |
Dictionary of string [key] and string [value] |
None. |
Request Formats
application/json, text/json
{
"Items": null,
"TargetBusinessModule": "75ccaf0b-c602-40b7-9d61-7918b930c669",
"TargetBusinessModuleEntity": 2,
"TargetList": "sample string 3",
"TargetFolder": "sample string 4",
"OutputExistsBehaviour": 10,
"PdfFormat": 8,
"UseStepInputValues": true,
"SourceItemFieldsToCopyToPdfItem": [
"sample string 1",
"sample string 2"
],
"CombineFiles": true,
"FieldValues": {
"sample string 1": {},
"sample string 3": {}
},
"MaxCombineSizeInMB": 1,
"AddPageNumbers": true,
"AddIndex": true,
"IndexPlacementOption": 0,
"AddDocumentOutline": true,
"AddSourceInformation": true,
"DocumentVersion": "LatestVersion",
"Async": true,
"CallbackUrl": "sample string 12",
"CallbackHeaders": {
"sample string 1": "sample string 2",
"sample string 3": "sample string 4"
}
}
application/xml, text/xml
<Document.DocumentToPDFConversionParameter xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WorkPoint365.WebAPI.Model">
<AddDocumentOutline>true</AddDocumentOutline>
<AddIndex>true</AddIndex>
<AddPageNumbers>true</AddPageNumbers>
<AddSourceInformation>true</AddSourceInformation>
<Async>true</Async>
<CallbackHeaders xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>sample string 1</d2p1:Key>
<d2p1:Value>sample string 2</d2p1:Value>
</d2p1:KeyValueOfstringstring>
<d2p1:KeyValueOfstringstring>
<d2p1:Key>sample string 3</d2p1:Key>
<d2p1:Value>sample string 4</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</CallbackHeaders>
<CallbackUrl>sample string 12</CallbackUrl>
<CombineFiles>true</CombineFiles>
<DocumentVersion>LatestVersion</DocumentVersion>
<FieldValues xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>sample string 1</d2p1:Key>
<d2p1:Value />
</d2p1:KeyValueOfstringanyType>
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>sample string 3</d2p1:Key>
<d2p1:Value />
</d2p1:KeyValueOfstringanyType>
</FieldValues>
<IndexPlacementOption>Beginning</IndexPlacementOption>
<Items xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
<MaxCombineSizeInMB>1</MaxCombineSizeInMB>
<OutputExistsBehaviour>Cancel</OutputExistsBehaviour>
<PdfFormat>PDF_v_1_3</PdfFormat>
<SourceItemFieldsToCopyToPdfItem xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</SourceItemFieldsToCopyToPdfItem>
<TargetBusinessModule>75ccaf0b-c602-40b7-9d61-7918b930c669</TargetBusinessModule>
<TargetBusinessModuleEntity>2</TargetBusinessModuleEntity>
<TargetFolder>sample string 4</TargetFolder>
<TargetList>sample string 3</TargetList>
<UseStepInputValues>true</UseStepInputValues>
</Document.DocumentToPDFConversionParameter>
Response Information
Resource Description
System.Web.Http.IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample not available.