{"id":20457330,"url":"https://github.com/tlapnet/pedef","last_synced_at":"2026-03-19T15:58:23.992Z","repository":{"id":44159173,"uuid":"212102562","full_name":"tlapnet/pedef","owner":"tlapnet","description":":ledger: Portablus Documentus Formatus (PDF)","archived":false,"fork":false,"pushed_at":"2023-07-12T04:04:30.000Z","size":2103,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-17T16:34:19.784Z","etag":null,"topics":["generator","image","pdf","preview","tlapnet"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tlapnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-10-01T13:25:53.000Z","updated_at":"2025-03-17T13:04:15.000Z","dependencies_parsed_at":"2025-01-15T23:27:53.614Z","dependency_job_id":"92cf7132-ddd6-4163-a433-e873598648a6","html_url":"https://github.com/tlapnet/pedef","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tlapnet/pedef","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlapnet%2Fpedef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlapnet%2Fpedef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlapnet%2Fpedef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlapnet%2Fpedef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tlapnet","download_url":"https://codeload.github.com/tlapnet/pedef/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tlapnet%2Fpedef/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29311032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["generator","image","pdf","preview","tlapnet"],"created_at":"2024-11-15T12:06:38.016Z","updated_at":"2026-02-10T18:30:45.327Z","avatar_url":"https://github.com/tlapnet.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PeDeF\n#### A microservice for generation and pdf manipulation\n\n## USAGE\n\n__[GET] /ping__\nWill return \"pong\" response if app runs\n\n__[POST] /v1/pdf/from-url/__\n\nWill generate a pdf file for existing web page. Pass the web url in json request.\nSee Renderer options to view all possible options.\n```json\n{\n  \"url\": \"http://www.google.com\",\n  \"options\": {}\n}\n```\n\n__[POST] /v1/pdf/from-file/__\n\nWill generate a pdf file for uploaded html page. Upload the .html file as the form upload file.\nOnly the first uploaded file will be taken into consideration during the generate process.\nYou can also add field \"options\" to uploaded form.\nThis \"options\" field must contain valid options JSON string e.g.: \"{\"format\": \"A5\", \"landscape\": true}\"\nSee Renderer options to view all possible options.\n\n__[POST] /v1/pdf/thumbnail/__\n\nGenerates a png image of the first page of uploaded pdf file.\n\n__[POST] /v1/pdf/merge/__\n\nMerges multiple uploaded pdf files into one. At least 2 files are required.\n\n### Renderer options:\nYou can provide additional options for puppeteer renderer.\nFull description of option params is on https://pptr.dev/#?product=Puppeteer\u0026version=v1.6.1\u0026show=api-pagepdfoptions\n\nBellow are listed possible options with default values.\nAll option fields are optional.  \n```json\n{\n    \"format\": \"A4\",\n    \"landscape\": false,\n    \"printBackground\": false,\n    \"displayHeaderFooter\": true,\n    \"margin\": {\"top\":\"0cm\", \"bottom\": \"0cm\", \"left\": \"0cm\", \"right\": \"0cm\"},\n    \"headerTemplate\": \"\",\n    \"footerTemplate\": \"\",\n    \"pageRanges\": \"\"\n}\n```\n\nNote: If you want to use header and/or footer template you must set margins to place the templates into and\nyou must set displayHeaderFooter: true. You can use placeholders like `pageNumber, totalPages, date, title, url` in templates.\n\nExample of valid options:\n```json\n{\n    \"pageRanges\": \"1-2\",\n    \"format\": \"A4\",\n    \"landscape\": false,\n    \"displayHeaderFooter\": true,\n    \"margin\": {\"top\":\"3cm\", \"bottom\": \"3cm\"},\n    \"headerTemplate\": \"\u003cp style='font-size: 20px;'\u003ePrinted on: \u003cspan class='date'\u003e\u003c/span\u003e\u003c/p\u003e\",\n    \"footerTemplate\": \"\u003cp style='font-size: 20px;'\u003ePage \u003cspan class='pageNumber'\u003e\u003c/span\u003e/\u003cspan class='totalPages'\u003e\u003c/span\u003e\u003c/p\u003e\"\n}\n```\n\n## How to run locally using docker\n\n1. clone this repo and cd to its folder\n2. `make docker-build`\n3. `make docker-start`\n\n## How to run locally on OSX \n\n- Download and install pdftk library: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg\n- Download and install libraries for thumbnails: `brew install imagemagick ghostscript poppler`\n\n```\nnpm install\nnpm start \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlapnet%2Fpedef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlapnet%2Fpedef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlapnet%2Fpedef/lists"}