Summary
The WebViewClient used to render notes to PDF in app/src/main/java/android/print/PdfExtensions.kt overrides onPageFinished but does not override onReceivedError. The onPageFinished handler immediately hands the WebView off to createPrintDocumentAdapter(...), so a failed load (for example a remote image referenced in note content not being reachable) still ends up triggering the print pipeline and produces a PDF that is silently missing pieces.
Because the WebViewClient does not surface the error, neither the user nor logcat knows that anything went wrong. The only way to discover the failure today is to inspect the resulting PDF.
Proposal
Add a minimal onReceivedError(view, errorCode, description, failingUrl) override that logs the error code, description and failing URL with Log.w. Logging only, no UI change, no change to the happy path.
The deprecated 4-arg signature is used on purpose because minSdk is 21 and that signature is the one the framework dispatches on every supported API level.
Summary
The
WebViewClientused to render notes to PDF inapp/src/main/java/android/print/PdfExtensions.ktoverridesonPageFinishedbut does not overrideonReceivedError. TheonPageFinishedhandler immediately hands the WebView off tocreatePrintDocumentAdapter(...), so a failed load (for example a remote image referenced in note content not being reachable) still ends up triggering the print pipeline and produces a PDF that is silently missing pieces.Because the
WebViewClientdoes not surface the error, neither the user nor logcat knows that anything went wrong. The only way to discover the failure today is to inspect the resulting PDF.Proposal
Add a minimal
onReceivedError(view, errorCode, description, failingUrl)override that logs the error code, description and failing URL withLog.w. Logging only, no UI change, no change to the happy path.The deprecated 4-arg signature is used on purpose because
minSdkis 21 and that signature is the one the framework dispatches on every supported API level.