Package 

Class ExtensionsKt

    • Method Detail

      • loadDocument

         final static Unit loadDocument(PDFView $self, String assetName, Function1<PdfLoadRequest.Builder, Unit> builder)

        Load PDF from the assets file.

        Parameters:
        assetName - The name of the asset file containing the PDF document.
        builder - A lambda function to configure the PDF load request using a {@link PdfLoadRequest.Builder} instance.
      • loadDocument

         final static Unit loadDocument(PDFView $self, File file, Function1<PdfLoadRequest.Builder, Unit> builder)

        Load PDF from a file.

        Parameters:
        file - The {@link File} containing the PDF document.
        builder - A lambda function to configure the PDF load request using a {@link PdfLoadRequest.Builder} instance.
      • loadDocument

         final static Unit loadDocument(PDFView $self, Uri uri, Function1<PdfLoadRequest.Builder, Unit> builder)

        Load PDF from a URI. Useful for content providers.

        Parameters:
        uri - The {@link Uri} pointing to the PDF document.
        builder - A lambda function to configure the PDF load request using a {@link PdfLoadRequest.Builder} instance.
      • loadDocument

         final static Unit loadDocument(PDFView $self, ByteArray bytes, Function1<PdfLoadRequest.Builder, Unit> builder)

        Load PDF from a byte array. Document is not saved on disk.

        Parameters:
        bytes - The byte array containing the PDF document content.
        builder - A lambda function to configure the PDF load request using a {@link PdfLoadRequest.Builder} instance.
      • loadDocument

         final static Unit loadDocument(PDFView $self, InputStream stream, Function1<PdfLoadRequest.Builder, Unit> builder)

        Load PDF from an {@link InputStream}. The stream is converted to a byte array, since native code does not support direct stream handling.

        Parameters:
        stream - The {@link InputStream} containing the PDF document content.
        builder - A lambda function to configure the PDF load request using a {@link PdfLoadRequest.Builder} instance.
      • configureView

         final static Unit configureView(PDFView $self, Function1<PdfViewConfiguration.Builder, Unit> builder)

        Configure PDF view with factory-time settings.

        Parameters:
        builder - A lambda function to configure the PDF view using a {@link PdfViewConfiguration.Builder} instance.