createPdf method
- @Deprecated("Use pdfConfiguration instead") IOSWKPDFConfiguration? iosWKPdfConfiguration,
- PDFConfiguration? pdfConfiguration,
Generates PDF data from the web view’s contents asynchronously.
Returns null if a problem occurred.
pdfConfiguration represents the object that specifies the portion of the web view to capture as PDF data.
Officially Supported Platforms/Implementations:
- iOS WKWebView 14.0+ (Official API - WKWebView.createPdf)
- macOS WKWebView 11.0+ (Official API - WKWebView.createPdf)
- Windows WebView2 (Official API - ICoreWebView2_16.PrintToPdfStream)
Parameters - Officially Supported Platforms/Implementations:
pdfConfiguration: all platforms
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
Future<Uint8List?> createPdf({
@Deprecated("Use pdfConfiguration instead")
// ignore: deprecated_member_use_from_same_package
IOSWKPDFConfiguration? iosWKPdfConfiguration,
PDFConfiguration? pdfConfiguration,
}) => platform.createPdf(
iosWKPdfConfiguration: iosWKPdfConfiguration,
pdfConfiguration: pdfConfiguration,
);