Is it possible to get the printers DPI value with Javascript or Java ?

Hello,

I am using a zt230 Printer for an android application and want to use the proper zpl.file for the different DPI values of the printers.

To my regret I couldn't find any command for javascript or java to get the DPI value of the connected printer.

Is it even possible to get the DPI value or do I have to tell the user that he has to set it by himselfe ?

Thank you in advance.