{"id":18544719,"url":"https://github.com/131/htmltar-to-pdf","last_synced_at":"2025-04-09T19:31:14.336Z","repository":{"id":45578970,"uuid":"201548661","full_name":"131/htmltar-to-pdf","owner":"131","description":"Convert HTML tar archives to PDFs","archived":false,"fork":false,"pushed_at":"2023-06-07T22:01:21.000Z","size":376,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T02:10:20.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/131.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}},"created_at":"2019-08-09T22:30:37.000Z","updated_at":"2021-12-21T14:49:50.000Z","dependencies_parsed_at":"2022-09-14T17:02:49.252Z","dependency_job_id":null,"html_url":"https://github.com/131/htmltar-to-pdf","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fhtmltar-to-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fhtmltar-to-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fhtmltar-to-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fhtmltar-to-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/131","download_url":"https://codeload.github.com/131/htmltar-to-pdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223407794,"owners_count":17140563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-06T20:17:24.389Z","updated_at":"2024-11-06T20:17:25.027Z","avatar_url":"https://github.com/131.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/131/htmltar-to-pdf/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/131/htmltar-to-pdf/actions/workflows/test.yml)\n[![Coverage Status](https://coveralls.io/repos/github/131/htmltar-to-pdf/badge.svg?branch=master)](https://coveralls.io/github/131/htmltar-to-pdf?branch=master)\n[![Version](https://img.shields.io/npm/v/htmltar-to-pdf.svg)](https://www.npmjs.com/package/htmltar-to-pdf)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n[![Code style](https://img.shields.io/badge/code%2fstyle-ivs-green.svg)](https://www.npmjs.com/package/eslint-plugin-ivs)\n\n\n# Motivation\n\n[htmltar-to-pdf](https://github.com/131/htmltar-to-pdf) is a wrapper around phantomjs that convert a HTML payload (in a tarball) as a PDF (or png) file.\n\nUsing a simple tar as input makes the whole API simple \u0026 stable.\n\n# API/usage\n\n```\nconst html2pdf = require('htmltar-to-pdf');\nconst infile  = '/some/path/to/a/file.tar';\n\nlet output_path = await html2pdf(infile, [format = \"pdf|png\", [options ]]); //will capture (index.html in tar file)\n\n\n//you wont make it any simplier...\nconsole.log(\"Please find a fine PDF in\", output_path);\n```\n\n## Configuration parameters \u0026 defaults values\n\n```\n  let opts = {\n    format         : 'A4',\n    orientation    : 'portrait || landscape',\n    dpi            : 72,\n    index          : 'index.html',\n\n    waitForDom     : true,\n    waitForEvent   : 'customPageEvent',\n    waitForTimeout : 5000 // timeout as ms\n\n     //configure one will set up #page-footer #page-header\n    pageBodyAnchor : null,\n    footerFile     : null,\n    headerFile     : null,\n  };\n```\n\n# Credits\n* [131 - auhor](https://github.com/131)\n* [kalmani](https://github.com/kalmani)\n* [ariya's phantomjs](https://github.com/ariya/phantomjs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fhtmltar-to-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F131%2Fhtmltar-to-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fhtmltar-to-pdf/lists"}