WebView PDF Printing Adds Padding (White Spaces) to Border
I am working on an Android app using Jetpack Compose, and I have a WebView in which I display HTML content. I want to provide users with the ability to download the WebView’s content as a PDF. For this purpose, I’m using the getSystemService(Context.PRINT_SERVICE) method along with createPrintDocumentAdapter() to generate the PDF.
However, when I download the WebView content as a PDF, I notice that it adds padding (white spaces) to the border, which negatively affects the overall appearance...