1

I have a activity_main.xml like this, this is main activity

 <ScrollView>

 data-->57 textviews

</Scrollview>

I want to convert as a PDF document those 57 fields

I tried lot of solutions what Stack Overflow provided and other forums too; I tried some GitHub samples also even though no use for me

So I need those text views convert into pdf inside scrollview and need to give print (PDF document) through printer (I'm using tablet).

halfer
  • 19,824
  • 17
  • 99
  • 186
Stack
  • 31
  • 1
  • 9
  • try to capture bitmap for scrollview, first take bitmap for visiblescreen and after scrolling to bottom take another bitmap. after last merge all bitmap into one – Divyesh Patel Jun 16 '17 at 07:27
  • can you provide me some sample code – Stack Jun 16 '17 at 07:41
  • check this : https://stackoverflow.com/questions/41356494/how-to-get-bitmap-of-a-view – Divyesh Patel Jun 16 '17 at 07:55
  • Please try to write your questions here using upper and lower case as appropriate. If you are posting on a mobile phone and find it hard to produce upper case letters, swap to a laptop or PC if you can. Sentences start with an upper case letter, and when referring to yourself ("I"), that is always upper case. Remember that questions that appear to have been written in a rush may not get as much attention as questions to which a great deal of research and care has been applied. Thanks! – halfer Jun 16 '17 at 08:19

1 Answers1

0

You can use XML to PDF Generator For Android library which is maintained by me. It also has support to print ScrollView.

Gk Mohammad Emon
  • 6,084
  • 3
  • 42
  • 42