PDF Viewer 2
Opens a PDF via WTN.openPDF()
Custom PDF
Provide any URL & title
Call Log
Result of each Pdfopen call
Link Detection
Auto-route in-page links to the PDF viewer
Comma-separated. Any link containing one of these always opens in the PDF viewer, even without a ".pdf" extension.
No-extension / No-link PDF
Tests native-level URL pattern interception (bypasses this page's JS entirely)
The "Live demo" links above are only caught because this page listens for <a> clicks in JavaScript.
A real generated-PDF URL (no ".pdf" extension, no anchor tag β e.g. triggered by a redirect or a button
that sets window.location.href) never passes through that listener. The only
thing that can catch it is the app's native "URL patterns" setting matching the navigation itself.
Set a pattern there that matches the URL below (e.g. drive.usercontent), reload the app, then
use a button here. If interception works, the PDF viewer opens and you stay in the app. If it doesn't,
the webview will actually navigate away to the raw file/download.
Defaults to generated-invoice β a real PDF file in this repo hosted with no extension, resolved relative to wherever this page is deployed. Swap in the Drive link or your own generated-PDF endpoint if you'd rather test that.
Large PDF
Test the loading state on a slow-to-open file
Opens via the same Pdfopen() call. The button shows a loading state until the native viewer hands control back (visibilitychange) or after an 8s fallback timeout.