We are passing receipt string to printer so we need to format the receipt for this reason we are using ViewPrintJob for printing receipt in our native integration and we have gone through below thread in which mentioned that choose the larger width (576). If printed on a smaller width printer the contents will be scaled.
https://community.clover.com/questions/16117/how-do-i-use-viewprintjob-i-get-measured-view-widt.html
So as per above we set the larger width(576) but the font size of textview getting decreases due to auto scaling.
As per your ViewPrintJob example we have created and called layoutAndMeasureView() method before printing and we have LinearLayout as a mainview and in that textview has been added.
So can you please help us on the font size issue.