Android PdfDocument.Page - Problems with image size

前端 未结 4 1839
甜味超标
甜味超标 2021-02-14 17:49

I am experiencing problems with images being larger when drawing onto a PdfDocument.Page. The app is targeted for a device running Android 4.4.4 (API level 19).

I am gen

4条回答
  •  太阳男子
    2021-02-14 18:13

    As requested, the solution I found was to set the density to a value higher than what it should be. Setting the bitmap density to DENSITY_XHIGH instead of DENSITY_HIGH improved the rendered bitmap considerably for me. The bitmap is closer to the size I would expect when the pdf is generated.

提交回复
热议问题