Instant Pdf Fragment
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.
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
open fun newInstance(@NonNull document: InstantPdfDocument, @NonNull configuration: PdfConfiguration): InstantPdfFragment
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 onAuthenticationFailed(@NonNull instantDocument: InstantPdfDocument, @NonNull error: InstantException)
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 onCreateView(@NonNull inflater: LayoutInflater, @Nullable container: ViewGroup, @Nullable savedInstanceState: Bundle): View
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
open fun onDocumentStateChanged(@NonNull instantDocument: InstantPdfDocument, @NonNull state: InstantDocumentState)
Called when the document changes its state.
Link copied to clipboard
open fun onSyncError(@NonNull instantDocument: InstantPdfDocument, @NonNull error: InstantException)
Called when annotation sync has been finished with an error.
Link copied to clipboard
Called when annotation sync has been finished successfully.
Link copied to clipboard
Called when annotation sync has been started.
Link copied to clipboard
Removes a previously added InstantDocumentListener.
Link copied to clipboard
Sets whether the fragment should automatically handle certain critical Instant errors.
Link copied to clipboard
Controls whether to listen to server changes for loaded document when the fragment is resumed.
Link copied to clipboard
Sets annotation types that should be rendered as overlays.
Link copied to clipboard
Starts syncing annotations back to Instant Server (PSPDFKit Document Engine).