How to print RecyclerView content in a PDF file from your Android App? - Android 13 | API 33

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ต.ค. 2024

ความคิดเห็น • 6

  • @abah_aini
    @abah_aini ปีที่แล้ว +1

    terimakasih bro

  • @VenuGopal.Pottangi
    @VenuGopal.Pottangi ปีที่แล้ว +1

    what about multiple pages for longer recyclerview

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว

      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
      -

  • @JC-dk8mk
    @JC-dk8mk 9 หลายเดือนก่อน

    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

  • @sonkemedia
    @sonkemedia ปีที่แล้ว

    Hi for min sdk of 24 it doesn't work.. Do you have any other solution for this?

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว

      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
      -