You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ simply fork or download the project, you can also download and create `.aar` fil
13
13
* supports bitmap re usage.
14
14
* production proved code. Used in a commercial project.
15
15
16
-
##### How To Use
17
-
######1. create XML layouts
16
+
###Instructions
17
+
#### 1. create XML layouts
18
18
First create XML layouts. give it dimensions in pixels (and for all it's sub views) and proportions according landscape or portrait according to ratio 1:1.41.<br/><br/>
19
19
page1.xml
20
20
```
@@ -34,7 +34,7 @@ page1.xml
34
34
35
35
you can create as many as pages/templates as you need.
36
36
37
-
######2. Implement a View renderer
37
+
#### 2. Implement a View renderer
38
38
implement your View renderer by extending `AbstractViewRenderer` or by anonymously instantiating it and injecting the layout id. the initView(View view) will supply you an inflated View automatically. There are other options but I wont cover it now.
39
39
```
40
40
AbstractViewRenderer page = new AbstractViewRenderer(context, R.layout.page1) {
@@ -56,7 +56,7 @@ page.setReuseBitmap(true);
56
56
57
57
```
58
58
59
-
######3. Build the PDF document
59
+
#### 3. Build the PDF document
60
60
Use `PdfDocument` or `PdfDocument.Builder` to add pages and render and run it all at background with progress bar.
0 commit comments