Package org.mozilla.geckoview
Class SessionPdfFileSaver
Object
org.mozilla.geckoview.SessionPdfFileSaver
PdfFileSaver
instances returned by GeckoSession.getPdfFileSaver()
performs save
operation.-
Method Summary
Modifier and TypeMethodDescriptionstatic GeckoResult<WebResponse>
createResponse
(GeckoSession session, String url, String filename, String originalUrl, boolean skipConfirmation, boolean requestExternalApp) Create a WebResponse from some binary data in order to use it to download a PDF file.save()
Save the current PDF.
-
Method Details
-
save
Save the current PDF.- Returns:
- Result of the save operation as a
GeckoResult
object.
-
createResponse
@Nullable public static GeckoResult<WebResponse> createResponse(@NonNull GeckoSession session, @NonNull String url, @NonNull String filename, @NonNull String originalUrl, boolean skipConfirmation, boolean requestExternalApp) Create a WebResponse from some binary data in order to use it to download a PDF file.- Parameters:
session
- The session.url
- The url for fetching the data.filename
- The file name.originalUrl
- The original url for the file.skipConfirmation
- Whether to skip the confirmation dialog.requestExternalApp
- Whether to request an external app to open the file.- Returns:
- a response used to "download" the pdf.
-