A simple javascript calculator to calculate optimal print resolution