Search code examples
pdftron

Change sticky note annotation icon size created with PDFTron Android


enter image description here

The sticky note annotation icon added with PDFTron looks quite small, Is there any way to change it.


Solution

  • If you have not already, you should update to the latest version of PDFNet as the default size might have changed since the version you are using.

    Either way, you can use PDFViewCtrl.setDevicePixelDensity to adjust the size of the note. This function allows you to adjust depending on the device if you like.

    For example

    double deviceDensity = 1.0; // Scale relative to the internal DPI of 96 (default 1.0).
    mPdfViewCtrl.setDevicePixelDensity(deviceDensity, 1);