WebViewPdfExport

PDF Export Test Page

3
Platforms
2
Methods
A4
Page Size

Pages
Platform Support
PlatformEngineStatus
B4A (Android)PrintDocumentAdapterReady
B4i (iOS)WKWebView.createPDFReady
B4J (Desktop)WebEngine + BrowserNew
Quarterly Sales Report

Sample business data to test multi-column rendering and alignment.

RegionH1H2Total
North America$262,700$329,200$591,900
Europe$204,000$241,300$445,300
Asia Pacific$160,600$195,000$355,600
Latin America$90,100$109,800$199,900
Middle East$67,000$82,500$149,500
Features
Full-content PDF — captures entire page, not just the visible viewport
Multi-page support — long content paginates automatically
Silent generation on mobile — no print dialog on Android or iOS
System share sheet on mobile — AirDrop, email, save to files
A4 page size — standard document format
Tables and complex layouts render faithfully
Cross-platform API — same code on Android, iOS, and Desktop
Dependency-free on iOS and B4J — Android requires one small jar
Extended Content (Pagination Test)

This section verifies that the PDF correctly paginates across multiple pages.

Android: The WebView's createPrintDocumentAdapter method creates a print adapter that re-renders the full HTML content. The PdfPrint helper class (compiled into a jar) lives in the android.print package to access package-protected callback classes.

iOS: WKWebView's native createPDF method (iOS 14+) generates PDF data directly from the web content. The data is received as NSData via an async callback, converted to a byte array, and shared via UIActivityViewController.

Desktop: The WebEngine's executeScript method extracts the full HTML content from the WebView. A FileChooser save dialog lets the user choose where to save the HTML file, which is then opened in the default browser for printing or saving as PDF.

Employee Directory
NameDepartmentLocationStatus
Sarah MitchellEngineeringSydneyActive
James ChenDesignMelbourneActive
Emma WilsonMarketingLondonActive
Michael BrownEngineeringNew YorkActive
Olivia TaylorProductTorontoActive
Daniel KimEngineeringSingaporeActive
Sophie AndersonSalesSydneyOn Leave
Liam O'BrienSupportDublinActive
Isabella GarciaDesignAucklandActive
Noah PatelEngineeringLondonActive
Ava JohanssonMarketingStockholmActive
W. de VriesProductAmsterdamContractor
Monthly Performance Metrics
MonthRevenueUsersTrend
January$48,20012,340Up 12%
February$44,80011,890Down 7%
March$56,10014,520Up 25%
April$52,40013,780Down 7%
May$61,30015,920Up 17%
June$67,80017,450Up 11%
July$63,20016,340Down 7%
August$71,50018,670Up 13%
September$68,90017,890Down 4%
October$74,20019,340Up 8%
November$82,10021,560Up 11%
December$89,40023,120Up 9%