Android PdfDocument.Page - Problems with image size

前端 未结 4 1837
甜味超标
甜味超标 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:36

    [I copied your solution to an answer. If you have found a solution please create an answer and accept it yourself]

    I have tried setting the bitmap density to a value higher than what I think it should be: logo.setDensity(DisplayMetrics.DENSITY_XHIGH); And this did the trick. (I originally set it to DENSITY_HIGH, but it was still scaling the image up slightly, so changed it to DENSITY_XHIGH.)

提交回复
热议问题