question

rupesh avatar image
rupesh asked

How to auto set the text size of textview in larger width(ViewPrintJob)?

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.

PaymentConnector
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community