Connectors Reference

Cloudmersive PDF

PDF lets you effortlessly create, convert, process, edit, work with, encrypt, and sign PDF files.

 

Status: Preview

Tier: Premium

Version: v1

 

Actions:

Name

Summary

EditPdf_AddAnnotations (AddPdfAnnotationRequest request)

Add one or more PDF annotations, comments in the PDF document

EditPdf_GetAnnotations (file inputFile)

Get PDF annotations, including comments in the document

EditPdf_RemoveAllAnnotations (file inputFile)

Remove all PDF annotations, including comments in the document

EditPdf_RemoveAnnotationItem (file inputFile, integer annotationIndex)

Remove a specific PDF annotation, comment in the document

EditPdf_Decrypt (string password, file inputFile)

Decrypt and password-protect a PDF

EditPdf_Encrypt ([Optional]string userPassword, [Optional]string ownerPassword, [Optional]string encryptionKeyLength, file inputFile)

Encrypt and password-protect a PDF

EditPdf_SetPermissions (string ownerPassword, string userPassword, [Optional]string encryptionKeyLength, [Optional]boolean allowPrinting, [Optional]boolean allowDocumentAssembly, [Optional]boolean allowContentExtraction, [Optional]boolean allowFormFilling, [Optional]boolean allowEditing, [Optional]boolean allowAnnotations, [Optional]boolean allowDegradedPrinting, file inputFile)

Encrypt, password-protect and set restricted permissions on a PDF

EditPdf_GetFormFields (file inputFile)

Gets PDF Form fields and values

EditPdf_SetFormFields (SetPdfFormFieldsRequest fieldValues)

Sets ands fills PDF Form field values

EditPdf_GetMetadata (file inputFile)

Get PDF document metadata

EditPdf_DeletePages (file inputFile, integer pageStart, integer pageEnd)

Remove, delete pages from a PDF document

EditPdf_GetPdfTextByPages (file inputFile)

Get text in a PDF document by page

EditPdf_InsertPages (file sourceFile, file destinationFile, integer pageStartSource, integer pageEndSource, integer pageInsertBeforeDesitnation)

Insert, copy pages from one PDF document into another

EditPdf_RotateAllPages (file inputFile, integer rotationAngle)

Rotate all pages in a PDF document

EditPdf_RotatePageRange (file inputFile, integer rotationAngle, integer pageStart, integer pageEnd)

Rotate a range, subset of pages in a PDF document

EditPdf_Rasterize (file inputFile)

Rasterize a PDF to an image-based PDF

EditPdf_SetMetadata (SetPdfMetadataRequest request)

Sets PDF document metadata

EditPdf_WatermarkText (string watermarkText, [Optional]string fontName, [Optional]number fontSize, [Optional]string fontColor, [Optional]number fontTransparency, file inputFile)

Add a text watermark to a PDF

 

Triggers:

Name

Summary

 

Objects:

Name

Summary

AddPdfAnnotationRequest

 

file

Input file to perform the operation on.

GetPdfAnnotationsResult

 

PdfAnnotation

 

PdfFormField

 

PdfFormFields

 

PdfMetadata

 

PdfPageText

 

PdfTextByPageResult

 

SetFormFieldValue

 

SetPdfFormFieldsRequest

 

SetPdfMetadataRequest

 

 

Actions:

EditPdf_AddAnnotations

Summary: Add one or more PDF annotations, comments in the PDF document

Description: Adds one or more annotations, comments to a PDF document.

 

Syntax:

CloudmersivePDF.EditPdf_AddAnnotations (AddPdfAnnotationRequest request)

 

Parameters:

Name

Type

Summary

Required

Related Action

request

AddPdfAnnotationRequest

 

Request to add annotations to a PDF

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_GetAnnotations

Summary: Get PDF annotations, including comments in the document

Description: Enumerates the annotations, including comments and notes, in a PDF document.

 

Syntax:

CloudmersivePDF.EditPdf_GetAnnotations (file inputFile)

 

Parameters:

Name

Type

Summary

Required

Related Action

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

 

Returns:

          Type:GetPdfAnnotationsResult

          Description: Result of retrieving annotations from a PDF document

 

EditPdf_RemoveAllAnnotations

Summary: Remove all PDF annotations, including comments in the document

Description: Removes all of the annotations, including comments and notes, in a PDF document.

 

Syntax:

CloudmersivePDF.EditPdf_RemoveAllAnnotations (file inputFile)

 

Parameters:

Name

Type

Summary

Required

Related Action

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_RemoveAnnotationItem

Summary: Remove a specific PDF annotation, comment in the document

Description: Removes a specific annotation in a PDF document, using the AnnotationIndex.  To enumerate AnnotationIndex for all of the annotations in the PDF document, use the /edit/pdf/annotations/list API.

 

Syntax:

CloudmersivePDF.EditPdf_RemoveAnnotationItem (file inputFile, integer annotationIndex)

 

Parameters:

Name

Type

Summary

Required

Related Action

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

annotationIndex

integer

(The 0-based index of the annotation in the document)

The 0-based index of the annotation in the document

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_Decrypt

Summary: Decrypt and password-protect a PDF

Description: Decrypt a PDF document with a password.  Decrypted PDF will no longer require a password to open.

 

Syntax:

CloudmersivePDF.EditPdf_Decrypt (string password, file inputFile)

 

Parameters:

Name

Type

Summary

Required

Related Action

password

string

(Valid password for the PDF file)

Valid password for the PDF file

True

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_Encrypt

Summary: Encrypt and password-protect a PDF

Description: Encrypt a PDF document with a password.  Set an owner password to control owner (editor/creator) permissions, and set a user (reader) password to control the viewer of the PDF.  Set the password fields null to omit the given password.

 

Syntax:

CloudmersivePDF.EditPdf_Encrypt ([Optional]string userPassword, [Optional]string ownerPassword, [Optional]string encryptionKeyLength, file inputFile)

 

Parameters:

Name

Type

Summary

Required

Related Action

userPassword

string

(Password of a user (reader) of the PDF file)

Password of a user (reader) of the PDF file

False

ownerPassword

string

(Password of a owner (creator/editor) of the PDF file)

Password of a owner (creator/editor) of the PDF file

False

encryptionKeyLength

string

(Possible values are "128" (128-bit RC4 encryption) and "256" (256-bit)

Possible values are "128" (128-bit RC4 encryption) and "256" (256-bit

False

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_SetPermissions

Summary: Encrypt, password-protect and set restricted permissions on a PDF

Description: Encrypt a PDF document with a password, and set permissions on the PDF.  Set an owner password to control owner (editor/creator) permissions [required], and set a user (reader) password to control the viewer of the PDF [optional].  Set the reader password to null to omit the password.  Restrict or allow printing, copying content, document assembly, editing (read-only), form filling, modification of annotations, and degraded printing through document Digital Rights Management (DRM).

 

Syntax:

CloudmersivePDF.EditPdf_SetPermissions (string ownerPassword, string userPassword, [Optional]string encryptionKeyLength, [Optional]boolean allowPrinting, [Optional]boolean allowDocumentAssembly, [Optional]boolean allowContentExtraction, [Optional]boolean allowFormFilling, [Optional]boolean allowEditing, [Optional]boolean allowAnnotations, [Optional]boolean allowDegradedPrinting, file inputFile)

 

Parameters:

Name

Type

Summary

Required

Related Action

ownerPassword

string

(Password of a owner (creator/editor) of the PDF file (required))

Password of a owner (creator/editor) of the PDF file (required)

True

userPassword

string

(Password of a user (reader) of the PDF file (optional))

Password of a user (reader) of the PDF file (optional)

True

encryptionKeyLength

string

(Possible values are "128" (128-bit RC4 encryption) and "256" (256-bit)

Possible values are "128" (128-bit RC4 encryption) and "256" (256-bit

False

allowPrinting

boolean

(Set to false to disable printing through DRM.  Default is true.)

Set to false to disable printing through DRM.  Default is true.

False

allowDocumentAssembly

boolean

(Set to false to disable document assembly through DRM.  Default is true.)

Set to false to disable document assembly through DRM.  Default is true.

False

allowContentExtraction

boolean

(Set to false to disable copying/extracting content out of the PDF thro)

Set to false to disable copying/extracting content out of the PDF thro

False

allowFormFilling

boolean

(Set to false to disable filling out form fields in the PDF through DRM)

Set to false to disable filling out form fields in the PDF through DRM

False

allowEditing

boolean

(Set to false to disable editing in the PDF through DRM (making the PDF)

Set to false to disable editing in the PDF through DRM (making the PDF

False

allowAnnotations

boolean

(Set to false to disable annotations and editing of annotations in the)

Set to false to disable annotations and editing of annotations in the

False

allowDegradedPrinting

boolean

(Set to false to disable degraded printing of the PDF through DRM.  Def)

Set to false to disable degraded printing of the PDF through DRM.  Def

False

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_GetFormFields

Summary: Gets PDF Form fields and values

Description: Encrypt a PDF document with a password.  Set an owner password to control owner (editor/creator) permissions, and set a user (reader) password to control the viewer of the PDF.  Set the password fields null to omit the given password.

 

Syntax:

CloudmersivePDF.EditPdf_GetFormFields (file inputFile)

 

Parameters:

Name

Type

Summary

Required

Related Action

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

 

Returns:

          Type:PdfFormFields

          Description: Result of retrieving PDF form fields

 

EditPdf_SetFormFields

Summary: Sets ands fills PDF Form field values

Description: Fill in the form fields in a PDF form with specific values.  Use form/get-fields to enumerate the available fields and their data types in an input form.

 

Syntax:

CloudmersivePDF.EditPdf_SetFormFields (SetPdfFormFieldsRequest fieldValues)

 

Parameters:

Name

Type

Summary

Required

Related Action

fieldValues

SetPdfFormFieldsRequest

 

Request to set the fields in a PDF form

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_GetMetadata

Summary: Get PDF document metadata

Description: Returns the metadata from the PDF document, including Title, Author, etc.

 

Syntax:

CloudmersivePDF.EditPdf_GetMetadata (file inputFile)

 

Parameters:

Name

Type

Summary

Required

Related Action

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

 

Returns:

          Type:PdfMetadata

          Description: Result of an autodetect/get-info operation

 

EditPdf_DeletePages

Summary: Remove, delete pages from a PDF document

Description: Remove one or more pages from a PDF document

 

Syntax:

CloudmersivePDF.EditPdf_DeletePages (file inputFile, integer pageStart, integer pageEnd)

 

Parameters:

Name

Type

Summary

Required

Related Action

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

pageStart

integer

(Page number (1 based) to start deleting pages from (inclusive).)

Page number (1 based) to start deleting pages from (inclusive).

True

pageEnd

integer

(Page number (1 based) to stop deleting pages from (inclusive).)

Page number (1 based) to stop deleting pages from (inclusive).

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_GetPdfTextByPages

Summary: Get text in a PDF document by page

Description: Gets the text in a PDF by page

 

Syntax:

CloudmersivePDF.EditPdf_GetPdfTextByPages (file inputFile)

 

Parameters:

Name

Type

Summary

Required

Related Action

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

 

Returns:

          Type:PdfTextByPageResult

          Description: Text of the PDF, broken down by page

 

EditPdf_InsertPages

Summary: Insert, copy pages from one PDF document into another

Description: Copy one or more pages from one PDF document (source document) and insert them into a second PDF document (destination document).

 

Syntax:

CloudmersivePDF.EditPdf_InsertPages (file sourceFile, file destinationFile, integer pageStartSource, integer pageEndSource, integer pageInsertBeforeDesitnation)

 

Parameters:

Name

Type

Summary

Required

Related Action

sourceFile

file

(Source PDF file to copy pages from.)

Source PDF file to copy pages from.

True

destinationFile

file

(Destination PDF file to copy pages into.)

Destination PDF file to copy pages into.

True

pageStartSource

integer

(Page number (1 based) to start copying pages from (inclusive) in the S)

Page number (1 based) to start copying pages from (inclusive) in the S

True

pageEndSource

integer

(Page number (1 based) to stop copying pages pages from (inclusive) in)

Page number (1 based) to stop copying pages pages from (inclusive) in

True

pageInsertBeforeDesitnation

integer

(Page number (1 based) to insert the pages before in the Destination file.)

Page number (1 based) to insert the pages before in the Destination file.

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_RotateAllPages

Summary: Rotate all pages in a PDF document

Description: Rotate all of the pages in a PDF document by a multiple of 90 degrees

 

Syntax:

CloudmersivePDF.EditPdf_RotateAllPages (file inputFile, integer rotationAngle)

 

Parameters:

Name

Type

Summary

Required

Related Action

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

rotationAngle

integer

(The angle to rotate the page in degrees, must be a multiple of 90 degr)

The angle to rotate the page in degrees, must be a multiple of 90 degr

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_RotatePageRange

Summary: Rotate a range, subset of pages in a PDF document

Description: Rotate a range of specific pages in a PDF document by a multiple of 90 degrees

 

Syntax:

CloudmersivePDF.EditPdf_RotatePageRange (file inputFile, integer rotationAngle, integer pageStart, integer pageEnd)

 

Parameters:

Name

Type

Summary

Required

Related Action

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

rotationAngle

integer

(The angle to rotate the page in degrees, must be a multiple of 90 degr)

The angle to rotate the page in degrees, must be a multiple of 90 degr

True

pageStart

integer

(Page number (1 based) to start rotating pages from (inclusive).)

Page number (1 based) to start rotating pages from (inclusive).

True

pageEnd

integer

(Page number (1 based) to stop rotating pages from (inclusive).)

Page number (1 based) to stop rotating pages from (inclusive).

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_Rasterize

Summary: Rasterize a PDF to an image-based PDF

Description: Rasterize a PDF into an image-based PDF.  The output is a PDF where each page is comprised of a high-resolution image, with all text, figures and other components removed.

 

Syntax:

CloudmersivePDF.EditPdf_Rasterize (file inputFile)

 

Parameters:

Name

Type

Summary

Required

Related Action

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_SetMetadata

Summary: Sets PDF document metadata

Description: Sets (writes) metadata into the input PDF document, including Title, Author, etc.

 

Syntax:

CloudmersivePDF.EditPdf_SetMetadata (SetPdfMetadataRequest request)

 

Parameters:

Name

Type

Summary

Required

Related Action

request

SetPdfMetadataRequest

 

Request to set PDF metadata

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 

EditPdf_WatermarkText

Summary: Add a text watermark to a PDF

Description: Adds a text watermark to a PDF

 

Syntax:

CloudmersivePDF.EditPdf_WatermarkText (string watermarkText, [Optional]string fontName, [Optional]number fontSize, [Optional]string fontColor, [Optional]number fontTransparency, file inputFile)

 

Parameters:

Name

Type

Summary

Required

Related Action

watermarkText

string

(Watermark text to add to the PDF (required))

Watermark text to add to the PDF (required)

True

fontName

string

(Font Family Name for the watermark text; default is Times New Roman)

Font Family Name for the watermark text; default is Times New Roman

False

fontSize

number

(Font Size in points of the text; default is 150)

Font Size in points of the text; default is 150

False

fontColor

string

(Font color in hexadecimal or HTML color name; default is Red)

Font color in hexadecimal or HTML color name; default is Red

False

fontTransparency

number

(Font transparency between 0.0 (completely transparent) to 1.0 (fully o)

Font transparency between 0.0 (completely transparent) to 1.0 (fully o

False

inputFile

file

(Input file to perform the operation on.)

Input file to perform the operation on.

True

 

Returns:

          Type:string(binary)OutputContent

Title: OutputContent

          Description: Output file content from the operation

 


 

AddPdfAnnotationRequest

Summary:

Description: Request to add annotations to a PDF

 

          Properties:

Name

Type

Summary

AnnotationsToAdd

array of (PdfAnnotation)

 

Annotations to add to the PDF file

InputFileBytes

string(byte)

 

Input file contents bytes for the file to modify


 

file

Summary: Input file to perform the operation on.

Description: Input file to perform the operation on.

 

          Properties:

Name

Type

Summary


 

GetPdfAnnotationsResult

Summary:

Description: Result of retrieving annotations from a PDF document

 

          Properties:

Name

Type

Summary

Annotations

array of (PdfAnnotation)

 

Annotations in the PDF file, ordered by placement from start to finish in the document

Successful

boolean

 

True if successful, false otherwise


 

PdfAnnotation

Summary:

Description: PDF Annotation details

 

          Properties:

Name

Type

Summary

AnnotationIndex

integer(int32)

 

The 0-based index of the annotation in the document

AnnotationType

string

 

Type of the annotation; possible values are Text

CreationDate

string(date-time)

 

Date that the annotation was created

Height

number(double)

 

Height of the annotation

LeftX

number(double)

 

Left X coordinate for the location of the annotation

ModifiedDate

string(date-time)

 

Date that the annotation was last modified

PageNumber

integer(int32)

 

The 1-based index of the page containing the annotation

Subject

string

 

Subject of the annotation

TextContents

string

 

Text contents of the annotation

Title

string

 

Title of the annotation; this is often the author of the annotation in Acrobat-created PDF files

TopY

number(double)

 

Top Y coordination of the location of the annotation

Width

number(double)

 

Width of the annotation


 

PdfFormField

Summary:

Description: Field definition and value in the form

 

          Properties:

Name

Type

Summary

FieldComboBoxSelectedIndex

integer(int32)

 

Applies to ComboBox field types only; specifies the selected index of the combo box selection if available

FieldName

string

 

Name of the form field

FieldType

string

 

The data type of the field; possible values are Text (FieldValue will be a string), Checkbox (FieldValue can be "true" or "false"), ComboBox (FieldComboBoxSelectedIndex will also be populated), Other

FieldValue

string

 

Value of the form field


 

PdfFormFields

Summary:

Description: Result of retrieving PDF form fields

 

          Properties:

Name

Type

Summary

FormFields

array of (PdfFormField)

 

Fields and field values found in the form

Successful

boolean

 

True if the operation was successful, false otherwise


 

PdfMetadata

Summary:

Description: Result of an autodetect/get-info operation

 

          Properties:

Name

Type

Summary

Author

string

 

User name of the creator/author of the document, if available, null if not available

Creator

string

 

Creator of the document

DateCreated

string(date-time)

 

The timestamp that the document was created, if available, null if not available

DateModified

string(date-time)

 

The timestamp that the document was last modified, if available, null if not available

Keywords

string

 

Keywords of the document

PageCount

integer(int32)

 

The number of pages in the document

Subject

string

 

Subject of the document

Successful

boolean

 

True if the operation was successful, false otherwise

Title

string

 

Title of the document


 

PdfPageText

Summary:

Description: Text of a single page of a PDF

 

          Properties:

Name

Type

Summary

PageNumber

integer(int32)

 

Page number of the page (1-based)

PageText

string

 

Text of the page


 

PdfTextByPageResult

Summary:

Description: Text of the PDF, broken down by page

 

          Properties:

Name

Type

Summary

Pages

array of (PdfPageText)

 

Pages in the PDF

Successful

boolean

 

True if the operation was successful, false otherwise


 

SetFormFieldValue

Summary:

Description: Individual field value to set in a PDF form

 

          Properties:

Name

Type

Summary

CheckboxValue

boolean

 

For fields of type Checkbox, the value to put into the field

ComboBoxSelectedIndex

integer(int32)

 

For fields of type ComboBox; specifies the selected index of the combo box selection

FieldName

string

 

Name of the field to set; you can call /convert/edit/pdf/form/get-fields to enumerate field names in a form

TextValue

string

 

For fields of type Text, the text value to put into the field


 

SetPdfFormFieldsRequest

Summary:

Description: Request to set the fields in a PDF form

 

          Properties:

Name

Type

Summary

FieldValues

array of (SetFormFieldValue)

 

Field values to set

InputFileBytes

string(byte)

 

Contents of the input file to set the fields on


 

SetPdfMetadataRequest

Summary:

Description: Request to set PDF metadata

 

          Properties:

Name

Type

Summary

InputFileBytes

string(byte)

 

Input file contents bytes for the file to modify

MetadataToSet

PdfMetadata

 

Result of an autodetect/get-info operation