InstantPdfFragment

Fragment that actually displays instant PDF document. It contains only the document view without any additional views like outline, thumbnail bar, search, etc. Meant to be used if you want full custom implementation and design.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val PARAM_INSTANT_DOCUMENT_SOURCE: String = "Instant.InstantDocumentSource"

Functions

Link copied to clipboard
Adds a InstantDocumentListener for instant document events.
Link copied to clipboard
Returns manager for annotation preferences.
Link copied to clipboard
Gets the loaded document.
Link copied to clipboard
Returns this fragment's undo manager instance for performing undo/redo operations of annotation edits.
Link copied to clipboard
Creates and returns a new Fragment to display a PDF document from an already opened instance.
open fun newInstance(@NonNull serverUrl: String, @NonNull jwt: String, @NonNull configuration: PdfConfiguration): InstantPdfFragment
Creates and returns a new Fragment to display a PDF document downloaded from Instant Server (PSPDFKit Document Engine).
Link copied to clipboard
open fun onAttach(@NonNull context: Context)
Link copied to clipboard
Called when authentication with Instant Server (PSPDFKit Document Engine) has failed.
Link copied to clipboard
open fun onAuthenticationFinished(@NonNull instantDocument: InstantPdfDocument, @NonNull validJwt: String)
Called when authentication with Instant Server (PSPDFKit Document Engine) has successfully finished.
Link copied to clipboard
open fun onCreate(savedInstanceState: Bundle)
Link copied to clipboard
open fun onCreateView(@NonNull inflater: LayoutInflater, @Nullable container: ViewGroup, @Nullable savedInstanceState: Bundle): View
Link copied to clipboard
open fun onDestroy()
Link copied to clipboard
open fun onDetach()
Link copied to clipboard
Called when InstantPdfDocument has detected data corruption.
Link copied to clipboard
Called when InstantPdfDocument becomes invalid.
Link copied to clipboard
Called when document is successfully loaded and the document view has been laid out.
Link copied to clipboard
Called when the document changes its state.
Link copied to clipboard
open fun onResume()
Link copied to clipboard
open fun onStop()
Link copied to clipboard
Called when annotation sync has been finished with an error.
Link copied to clipboard
open fun onSyncFinished(@NonNull instantDocument: InstantPdfDocument)
Called when annotation sync has been finished successfully.
Link copied to clipboard
open fun onSyncStarted(@NonNull instantDocument: InstantPdfDocument)
Called when annotation sync has been started.
Link copied to clipboard
Link copied to clipboard
open fun save(): Boolean
Saves the annotations in opened document back to Instant Server (PSPDFKit Document Engine).
Link copied to clipboard
open fun saveAsync()
Saves the annotations in opened document back to Instant Server (PSPDFKit Document Engine).
Link copied to clipboard
open fun setHandleCriticalInstantErrors(showCriticalErrors: Boolean)
Sets whether the fragment should automatically handle certain critical Instant errors.
Link copied to clipboard
open fun setListenToServerChangesWhenVisible(listenToServerChangesWhenVisible: Boolean)
Controls whether to listen to server changes for loaded document when the fragment is resumed.
Link copied to clipboard
open fun setOverlaidAnnotationTypes(@NonNull overlayAnnotationTypes: EnumSet<AnnotationType>)
Sets annotation types that should be rendered as overlays.
Link copied to clipboard
open fun syncAnnotations()
Starts syncing annotations back to Instant Server (PSPDFKit Document Engine).