Introduction of Print API
Introduction of Print API
Version :V1.1
Total 7 pages
(Including cover)
Compose
Review
Countersign
Add.4th Floor, HuixinIBC Building A, Zhangba 1st Road, Hi-tech Zone, Xi'an City, China.
1
Internal Public▲ (Permanent)
Modifiy record
Composed
ShiLiangY
V1.0 ZhangYong 2017.03.27 None None
i
Note: When the file is prepared for the first time, write “None” on
Add.4th Floor, HuixinIBC Building A, Zhangba 1st Road, Hi-tech Zone, Xi'an City, China.
2
Internal Public▲ (Permanent)
Contents
1 Description ...................................................................................................................................................... 4
3.1 PrintLineInit................................................................................................................................................... 4
3.2 PrintLineString...............................................................................................................................................4
3.3 PrintLineStringByType....................................................................................................................................5
3.4 PrintLineEnd...................................................................................................................................................5
3.5 PrintStringEx..................................................................................................................................................5
3.6 GetOneString.................................................................................................................................................6
3.7 PrintOneString............................................................................................................................................... 6
3.8 PrintBitmap....................................................................................................................................................6
3.9 PrintBitmapAtCenter......................................................................................................................................7
3.10 doHardwarePrint.........................................................................................................................................7
Add.4th Floor, HuixinIBC Building A, Zhangba 1st Road, Hi-tech Zone, Xi'an City, China.
3
Internal Public▲ (Permanent)
1 Description
This document detailed describes all the API which use for print.
The tool class is PrintHelper.java. Provides the open and close print service, print pictures, print text,
jump to the next page label function,and set the print grayscale interface.
3.1 PrintLineInit
3.2 PrintLineString
Function public void PrintLineString(String str, int textSize, int nLeft,boolean bBold)
prototype
Functional According to the parameter description,draw a single line of text .
description
Parameter Param1 1: text content
Param1 2:text font size
Add.4th Floor, HuixinIBC Building A, Zhangba 1st Road, Hi-tech Zone, Xi'an City, China.
4
Internal Public▲ (Permanent)
3.3 PrintLineStringByType
3.4 PrintLineEnd
3.5 PrintStringEx
Add.4th Floor, HuixinIBC Building A, Zhangba 1st Road, Hi-tech Zone, Xi'an City, China.
5
Internal Public▲ (Permanent)
3.6 GetOneString
Function Boolean GetOneString(Paint pat, String str, int[] index, int nH)
prototype
Functional From the long text, get the start and end indexes in each line which will be
description print.
Parameter Param 1:Paint
description Param 2:text content
Param 3:the start and end indexes array
Param 4:text font size
Returned True or False
Value
3.7 PrintOneString
3.8 PrintBitmap
3.9 PrintBitmapAtCenter
description directions
Parameter Param 1:Bitmap
Param 2:the height of a single lable
description
Returned void
Value
3.10 doHardwarePrint
Add.4th Floor, HuixinIBC Building A, Zhangba 1st Road, Hi-tech Zone, Xi'an City, China.
7