We can use "recyclerView.scrollBy" API to scroll the recyclerView pages. Reference example in below link: programmerworld.co/android/how-to-scroll-recyclerview-page-up-and-down-programmatically-from-your-android-app/ And then write those pages to PDF document using the below APIs: PdfDocument.Page page = pdfDocument.startPage(pageInfo); recyclerView.draw(page.getCanvas()); For reference, details shown in this video is also shared in the below link: programmerworld.co/android/how-to-print-recyclerview-content-in-a-pdf-file-from-your-android-app-android-13-api-33/ Cheers Programmer World programmerworld.co -
Does anyone knows 80mm 3 inches print option ,save as pdf, print preview,share receipt also it will be very useful for business people like me ❤ scrollable page for 80mm width and height may vary with the content
What is the error or issue you are getting? Is it the recyclerView, or PDF part throwing error? For reference, details shown in this video is also shared in the below link: programmerworld.co/android/how-to-print-recyclerview-content-in-a-pdf-file-from-your-android-app-android-13-api-33/ Cheers Programmer World programmerworld.co -
terimakasih bro
what about multiple pages for longer recyclerview
We can use "recyclerView.scrollBy" API to scroll the recyclerView pages. Reference example in below link:
programmerworld.co/android/how-to-scroll-recyclerview-page-up-and-down-programmatically-from-your-android-app/
And then write those pages to PDF document using the below APIs:
PdfDocument.Page page = pdfDocument.startPage(pageInfo);
recyclerView.draw(page.getCanvas());
For reference, details shown in this video is also shared in the below link:
programmerworld.co/android/how-to-print-recyclerview-content-in-a-pdf-file-from-your-android-app-android-13-api-33/
Cheers
Programmer World
programmerworld.co
-
Does anyone knows
80mm 3 inches print option ,save as pdf, print preview,share receipt also it will be very useful for business people like me ❤
scrollable page for 80mm width and height may vary with the content
Hi for min sdk of 24 it doesn't work.. Do you have any other solution for this?
What is the error or issue you are getting? Is it the recyclerView, or PDF part throwing error?
For reference, details shown in this video is also shared in the below link:
programmerworld.co/android/how-to-print-recyclerview-content-in-a-pdf-file-from-your-android-app-android-13-api-33/
Cheers
Programmer World
programmerworld.co
-