Android PdfDocument file size

后端 未结 5 1627
予麋鹿
予麋鹿 2021-01-05 02:03

I want to generate a PDF File from a View using the PdfDocument android class introduced in KitKat. I managed to do it, and the file is so far generated ok, end

5条回答
  •  长情又很酷
    2021-01-05 02:24

    To decrease PDF file size while using PdfDocument create your bitmap with Bitmap.Config.RGB_565 using Bitmap.Config.ARGB_8888 or Bitmap.Config.ARGB_4444 will increase the file size

    Bitmap b = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
    

提交回复
热议问题