Android PdfDocument.Page - Problems with image size

前端 未结 4 1328
闹比i
闹比i 2021-02-14 17:50

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:22

    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.

提交回复
热议问题