{"id":21903989,"url":"https://github.com/m1ga/ti.webviewpdf","last_synced_at":"2026-04-19T04:36:57.776Z","repository":{"id":80614929,"uuid":"561288306","full_name":"m1ga/ti.webviewpdf","owner":"m1ga","description":"Create a PDF from a WebView - Titanium SDK","archived":false,"fork":false,"pushed_at":"2022-11-03T11:31:09.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-08T05:48:27.358Z","etag":null,"topics":["android","pdf","titanium-module"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m1ga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-03T11:21:00.000Z","updated_at":"2023-02-02T22:36:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb14ebea-014c-4cb3-98a1-f5d275c13ca3","html_url":"https://github.com/m1ga/ti.webviewpdf","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/m1ga/ti.webviewpdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1ga%2Fti.webviewpdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1ga%2Fti.webviewpdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1ga%2Fti.webviewpdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1ga%2Fti.webviewpdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m1ga","download_url":"https://codeload.github.com/m1ga/ti.webviewpdf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1ga%2Fti.webviewpdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31995167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","pdf","titanium-module"],"created_at":"2024-11-28T15:30:46.319Z","updated_at":"2026-04-19T04:36:57.754Z","avatar_url":"https://github.com/m1ga.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Setup\n\n```xml\n\u003cmodule\u003eti.webviewpdf\u003c/module\u003e\n```\n\n```js\nrequire(\"ti.webviewpdf\").createPDF({webview: obj});\n```\n\n## Methods\n\n* createPDF:\n  * **webview**: (_required_) the webview object e.g. $.webview\n  * **pageWidth**: (int) the width in mils (thousandths of an inch) of the PDF\n  * **pageHeight**: (int) the height in mils (thousandths of an inch) of the PDF\n  * **pageSize**: (int) one of the default constants\n  * **showMenu**: (boolean) default false. Will show the printing menu and the user can change the paper size and storage place. There won't be a success call afterwards!\n  * **success**: (callback function), returns e.data (TiBlob) with the PDF\n  * **firstPageOnly**: (boolean) default false, only print first page\n\nUse either _pageWidth/pageHeight_ OR _pageSize_. If you don't use any size it will be DIN A4\n\n## Constants\n\n* DIN_A4 (default)\n* DIN_A3\n* DIN_A2\n* DIN_A1\n* DIN_A5\n* AUTO - will try to calculate the PDF page size depending on the webview height and screen width\n\n## Example\n```js\nrequire(\"ti.webviewpdf\").createPDF({\n  webview: webview,\n  pageWidth: 5000,\n  pageHeight: 72000,\n  success: function(e) {\n    saveData(e.data);\n  }\n});\n```\n\n\u003ca href=\"example/app.js\"\u003eFull example\u003c/a\u003e\n\n#### Tip\nYou can use `document.body.scrollHeight` to get the page height.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1ga%2Fti.webviewpdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm1ga%2Fti.webviewpdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1ga%2Fti.webviewpdf/lists"}