ConvertWebViewToPdfDemo icon indicating copy to clipboard operation
ConvertWebViewToPdfDemo copied to clipboard

Is there any way to set the size of PDF? I want to set size to A5. Default size is A4 and there is a huge blank space.

Open xihuny opened this issue 5 years ago • 1 comments

xihuny avatar Mar 20 '19 17:03 xihuny

Currently not any option for A5 in my library. I will add option for A5 size soon. If you want to implement in your app just download my library and import in your project as a library. Go the class PdfView - >change this code .setMediaSize(PrintAttributes.MediaSize.ISO_A4) to .setMediaSize(PrintAttributes.MediaSize.ISO_A5)

// it is also depend on your width, height so change this as per your requirement. .setResolution(new PrintAttributes.Resolution("pdf", "pdf", 600, 600))

It will work.

Let me know if you are facing any issue. Thanks,

pramodkr123 avatar Mar 22 '19 09:03 pramodkr123