{"action":"created","issue":{"url":"https://api.github.com/repos/bluejamesbond/TextJustify-Android/issues/50","labels_url":"https://api.github.com/repos/bluejamesbond/TextJustify-Android/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/bluejamesbond/TextJustify-Android/issues/50/comments","events_url":"https://api.github.com/repos/bluejamesbond/TextJustify-Android/issues/50/events","html_url":"https://github.com/bluejamesbond/TextJustify-Android/issues/50","id":53599906,"number":50,"title":"How can I get the number of lines of text?","user":{"login":"object1984","id":2276819,"avatar_url":"https://avatars.githubusercontent.com/u/2276819?v=3","gravatar_id":"","url":"https://api.github.com/users/object1984","html_url":"https://github.com/object1984","followers_url":"https://api.github.com/users/object1984/followers","following_url":"https://api.github.com/users/object1984/following{/other_user}","gists_url":"https://api.github.com/users/object1984/gists{/gist_id}","starred_url":"https://api.github.com/users/object1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/object1984/subscriptions","organizations_url":"https://api.github.com/users/object1984/orgs","repos_url":"https://api.github.com/users/object1984/repos","events_url":"https://api.github.com/users/object1984/events{/privacy}","received_events_url":"https://api.github.com/users/object1984/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"bluejamesbond","id":376453,"avatar_url":"https://avatars.githubusercontent.com/u/376453?v=3","gravatar_id":"","url":"https://api.github.com/users/bluejamesbond","html_url":"https://github.com/bluejamesbond","followers_url":"https://api.github.com/users/bluejamesbond/followers","following_url":"https://api.github.com/users/bluejamesbond/following{/other_user}","gists_url":"https://api.github.com/users/bluejamesbond/gists{/gist_id}","starred_url":"https://api.github.com/users/bluejamesbond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluejamesbond/subscriptions","organizations_url":"https://api.github.com/users/bluejamesbond/orgs","repos_url":"https://api.github.com/users/bluejamesbond/repos","events_url":"https://api.github.com/users/bluejamesbond/events{/privacy}","received_events_url":"https://api.github.com/users/bluejamesbond/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-01-07T05:44:35Z","updated_at":"2015-01-12T17:34:21Z","closed_at":null,"body":"I want to do pagination"},"comment":{"url":"https://api.github.com/repos/bluejamesbond/TextJustify-Android/issues/comments/69609710","html_url":"https://github.com/bluejamesbond/TextJustify-Android/issues/50#issuecomment-69609710","issue_url":"https://api.github.com/repos/bluejamesbond/TextJustify-Android/issues/50","id":69609710,"user":{"login":"bluejamesbond","id":376453,"avatar_url":"https://avatars.githubusercontent.com/u/376453?v=3","gravatar_id":"","url":"https://api.github.com/users/bluejamesbond","html_url":"https://github.com/bluejamesbond","followers_url":"https://api.github.com/users/bluejamesbond/followers","following_url":"https://api.github.com/users/bluejamesbond/following{/other_user}","gists_url":"https://api.github.com/users/bluejamesbond/gists{/gist_id}","starred_url":"https://api.github.com/users/bluejamesbond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluejamesbond/subscriptions","organizations_url":"https://api.github.com/users/bluejamesbond/orgs","repos_url":"https://api.github.com/users/bluejamesbond/repos","events_url":"https://api.github.com/users/bluejamesbond/events{/privacy}","received_events_url":"https://api.github.com/users/bluejamesbond/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T17:34:21Z","updated_at":"2015-01-12T17:34:21Z","body":"Ok so if you want to render one page to a Bitmap, here is how you do it. It should work for PageCurl as well.\r\n\r\n```java\r\n// Page dimensions\r\nfloat pageHeight = 600;\r\nfloat pageWidth = 400;\r\n\r\n// Create and setup layout\r\nIDocumentLayout documentLayout = new StringDocumentLayout(this, new TextPaint());\r\ndocumentLayout.setText(\"Large text input\");\r\ndocumentLayout.getLayoutParams().setParentWidth(pageWidth);\r\ndocumentLayout.measure(new IDocumentLayout.ISet<Float>() {\r\n    @Override\r\n    public void set(Float val) {\r\n        Log.d(\"progress\", val.toString());\r\n    }\r\n}, new IDocumentLayout.IGet<Boolean>() {\r\n    @Override\r\n    public Boolean get() {\r\n        return true; // don't ever cancel the process\r\n    }\r\n});\r\n\r\n// Create bitmap\r\nBitmap bitmap = Bitmap.createBitmap((int) pageWidth, (int) pageHeight, Bitmap.Config.ARGB_8888);\r\n\r\n// If you only want text between 30 and 100\r\nint drawStartY = 30;\r\nint drawEndY = 100;\r\ndocumentLayout.draw(new Canvas(bitmap), drawStartY, drawEndY);\r\n```"}}