Home > Back-end >  How to create high quality PDF from a view in android studio (java)?
How to create high quality PDF from a view in android studio (java)?

Time:01-18

I want to create a PDF file of a linear layout of one of my activities. An example can be found in the following: enter image description here

Thus in this instance the image contained in the PDF is 1322 x 669 but it is displayed in a MediaBox of 594 x 841 , thus it has about 2.2 times more details to zoom in to

Another way is to draw your layout directly to the PDF page without going through a bitmap as this create create pdf "primatives" like text and line objects that scale better, BUT you have to size your layout to fit the PDF page size.

  • Related