Class GeckoViewPrintDocumentAdapter

Object
android.print.PrintDocumentAdapter
org.mozilla.geckoview.GeckoViewPrintDocumentAdapter

public class GeckoViewPrintDocumentAdapter extends PrintDocumentAdapter
  • Constructor Details

    • GeckoViewPrintDocumentAdapter

      public GeckoViewPrintDocumentAdapter(@NonNull InputStream pdfInputStream, @NonNull Context context)
      Default GeckoView PrintDocumentAdapter to be used with a PrintManager to print documents using the default Android print functionality. Will make a temporary PDF file from InputStream.
      Parameters:
      pdfInputStream - an input stream containing a PDF
      context - context that should be used for making a temporary file
    • GeckoViewPrintDocumentAdapter

      public GeckoViewPrintDocumentAdapter(@NonNull InputStream pdfInputStream, @NonNull Context context, @Nullable GeckoResult<Boolean> printDialogFinish)
      GeckoView PrintDocumentAdapter to be used with a PrintManager to print documents using the default Android print functionality. Will make a temporary PDF file from InputStream.
      Parameters:
      pdfInputStream - an input stream containing a PDF
      context - context that should be used for making a temporary file
      printDialogFinish - result to report that the print finished
    • GeckoViewPrintDocumentAdapter

      public GeckoViewPrintDocumentAdapter(@NonNull File pdfFile)
      Default GeckoView PrintDocumentAdapter to be used with a PrintManager to print documents using the default Android print functionality. Will use existing PDF file for rendering. The filename may be displayed to users.

      Note: Recommend using other constructor if the PDF file still needs to be created so that the UI reflects progress.

      Parameters:
      pdfFile - PDF file
  • Method Details