public class

SharingOptions

extends Object
java.lang.Object
   ↳ com.pspdfkit.document.sharing.SharingOptions
Known Direct Subclasses

Class Overview

Options for document processing during the sharing process.

Summary

Public Constructors
SharingOptions(PdfProcessorTask.AnnotationProcessingMode annotationProcessingMode)
Constructs options for sharing document with all pages and default document name.
SharingOptions(PdfProcessorTask.AnnotationProcessingMode annotationProcessingMode, List<Range> pages)
Constructs options for sharing document with default document name.
SharingOptions(String documentName)
Constructs options for sharing document with all annotations and pages.
SharingOptions(PdfProcessorTask.AnnotationProcessingMode annotationProcessingMode, List<Range> pages, String documentName)
Constructs options for sharing document.
Protected Constructors
SharingOptions(SharingOptions options)
Copies sharing options to this instance.
Public Methods
boolean equals(Object obj)
PdfProcessorTask.AnnotationProcessingMode getAnnotationProcessingMode()
Returns annotation processing mode that describes what user wants to do with shared document annotations.
String getDocumentName()
Returns name of the document that should be used while sharing.
Set<Integer> getPagesToRemove(int documentPagesCount)
Retrieve set of pages that need to be removed by PdfProcessor before sharing.
PdfProcessorTask getProcessorTask(PdfDocument document)
Converts sharing options to PdfProcessorTask usable for processing document via PdfProcessor.
int hashCode()
static List<Range> parsePageRange(String rangeString, int documentPagesCount)
Parse page ranges strings.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SharingOptions (PdfProcessorTask.AnnotationProcessingMode annotationProcessingMode)

Constructs options for sharing document with all pages and default document name.

Parameters
annotationProcessingMode Describes how annotations will be processed by PdfProcessor before sharing.

public SharingOptions (PdfProcessorTask.AnnotationProcessingMode annotationProcessingMode, List<Range> pages)

Constructs options for sharing document with default document name.

Parameters
annotationProcessingMode Describes how annotations will be processed by PdfProcessor before sharing.
pages Range of pages for sharing.

public SharingOptions (String documentName)

Constructs options for sharing document with all annotations and pages.

Parameters
documentName Name of the document that will be sued while sharing.

public SharingOptions (PdfProcessorTask.AnnotationProcessingMode annotationProcessingMode, List<Range> pages, String documentName)

Constructs options for sharing document.

Parameters
annotationProcessingMode Describes how annotations will be processed by PdfProcessor before sharing.
pages Range of pages for sharing.
documentName Name of the document that will be sued while sharing.

Protected Constructors

protected SharingOptions (SharingOptions options)

Copies sharing options to this instance.

Parameters
options Sharing options to be copied into this instance.

Public Methods

public boolean equals (Object obj)

public PdfProcessorTask.AnnotationProcessingMode getAnnotationProcessingMode ()

Returns annotation processing mode that describes what user wants to do with shared document annotations.

Returns
  • An annotation processing mode to be applied to this document share process.

public String getDocumentName ()

Returns name of the document that should be used while sharing.

Returns
  • A document name to be used on document in the sharing process.

public Set<Integer> getPagesToRemove (int documentPagesCount)

Retrieve set of pages that need to be removed by PdfProcessor before sharing.

Parameters
documentPagesCount Number of pages in the document.
Returns
  • Set of all pages that need to be removed.

public PdfProcessorTask getProcessorTask (PdfDocument document)

Converts sharing options to PdfProcessorTask usable for processing document via PdfProcessor.

Parameters
document Document on which to run processing.
Returns
  • Processing task if processing is necessary or null if no processing is required.

public int hashCode ()

public static List<Range> parsePageRange (String rangeString, int documentPagesCount)

Parse page ranges strings.

Parameters
rangeString String with page range specification (e.g "1-5,8,11-13"). Page indexes are are 1-based.
documentPagesCount Number of pages in the document.
Returns
  • List of parsed page ranges. If input range is invalid returns empty list.

public String toString ()