Class Job

This class represents a set of actions which can produce a new document from the input source Document. The Editor class can save this new document to a variety of destinations.

Inheritance
System.Object
Job
Namespace: PSPDFKit.Document.Editor
Assembly: PSPDFKit.dll
Syntax
public sealed class Job : object

Constructors

Job(Document)

Constructs a Job that takes a Document as input.

Declaration
public Job(Document document)
Parameters
Type Name Description
Document document

The input document for the editing job.

Methods

AddPageAtIndexAsync(NewPage, Int32)

Adds the new page at the specified index.

Declaration
public IAsyncAction AddPageAtIndexAsync(NewPage newPage, int pageIndex)
Parameters
Type Name Description
NewPage newPage

A NewPage that will be added.

System.Int32 pageIndex

The index at which to add the page.

Returns
Type Description
Windows.Foundation.IAsyncAction

ClearPageLabelsAsync()

Clears the label on all pages.

Declaration
public IAsyncAction ClearPageLabelsAsync()
Returns
Type Description
Windows.Foundation.IAsyncAction

GetPageCountAsync()

Gets the current page count of the new document.

Declaration
public IAsyncOperation<int> GetPageCountAsync()
Returns
Type Description
Windows.Foundation.IAsyncOperation<System.Int32>

KeepPagesAsync(IEnumerable<Int32>)

Keeps only the specified pages in the new document.

Declaration
public IAsyncAction KeepPagesAsync(IEnumerable<int> pagesToKeep)
Parameters
Type Name Description
IEnumerable<System.Int32> pagesToKeep

The indices of the pages to keep.

Returns
Type Description
Windows.Foundation.IAsyncAction

MovePagesAsync(IEnumerable<Int32>, Int32)

Moves the specified pages to the specified index in the new document.

Declaration
public IAsyncAction MovePagesAsync(IEnumerable<int> pagesToMove, int destinationIndex)
Parameters
Type Name Description
IEnumerable<System.Int32> pagesToMove

The indices of the pages to be moved.

System.Int32 destinationIndex

The destination index for the pages to be moved.

Returns
Type Description
Windows.Foundation.IAsyncAction

RemoveAllPagesAsync()

Removes all the pages from the new document.

Declaration
public IAsyncAction RemoveAllPagesAsync()
Returns
Type Description
Windows.Foundation.IAsyncAction

RemovePagesAsync(IEnumerable<Int32>)

Removes the specified pages from the new document.

Declaration
public IAsyncAction RemovePagesAsync(IEnumerable<int> pagesToRemove)
Parameters
Type Name Description
IEnumerable<System.Int32> pagesToRemove

The indices of the pages to remove.

Returns
Type Description
Windows.Foundation.IAsyncAction

RotatePageAsync(Int32, Rotation)

Rotate a page at a given index. The index of the page to be labeled. The Rotation To apply.

Declaration
public IAsyncAction RotatePageAsync(int pageIndex, Rotation rotation)
Parameters
Type Name Description
System.Int32 pageIndex
Rotation rotation
Returns
Type Description
Windows.Foundation.IAsyncAction

SetPageLabelAsync(Int32, String)

Sets a label on a page.

Declaration
public IAsyncAction SetPageLabelAsync(int pageIndex, string label)
Parameters
Type Name Description
System.Int32 pageIndex

The index of the page to be labeled.

System.String label

The label.

Returns
Type Description
Windows.Foundation.IAsyncAction

StripEmptyPagesAsync(Boolean)

Controls if empty pages will be stripped at the end of processing the job.

Declaration
public IAsyncAction StripEmptyPagesAsync(bool strip)
Parameters
Type Name Description
System.Boolean strip

If true the empty pages will be stripped at the end of processing the job.

Returns
Type Description
Windows.Foundation.IAsyncAction