{"id":22104200,"url":"https://github.com/brianpursley/pdf-filler","last_synced_at":"2025-06-18T09:38:34.808Z","repository":{"id":49536226,"uuid":"274763796","full_name":"brianpursley/pdf-filler","owner":"brianpursley","description":"A PDF filler web service based on Apache PDFBox","archived":false,"fork":false,"pushed_at":"2024-10-04T14:21:16.000Z","size":383,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T03:41:20.700Z","etag":null,"topics":["java","pdf"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brianpursley.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":"2020-06-24T20:32:07.000Z","updated_at":"2024-10-30T00:43:16.000Z","dependencies_parsed_at":"2022-09-21T08:50:13.891Z","dependency_job_id":null,"html_url":"https://github.com/brianpursley/pdf-filler","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/brianpursley/pdf-filler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianpursley%2Fpdf-filler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianpursley%2Fpdf-filler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianpursley%2Fpdf-filler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianpursley%2Fpdf-filler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brianpursley","download_url":"https://codeload.github.com/brianpursley/pdf-filler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianpursley%2Fpdf-filler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260528675,"owners_count":23023019,"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":["java","pdf"],"created_at":"2024-12-01T06:29:26.115Z","updated_at":"2025-06-18T09:38:29.791Z","avatar_url":"https://github.com/brianpursley.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a simple web service based on [Apache PDFBox](https://pdfbox.apache.org/), that lets you generate filled PDF forms using a set of values you post to the endpoint.\n\n# Usage\n\nThe service provides two endpoints `/` and `/template`.\n\n`/template` generates an example payload for the given fillable PDF.\n\nFor example, to generate a template for an [IRS W-9 form](https://www.irs.gov/pub/irs-prior/fw9--2018.pdf), you can make this request and pipe the output through [jq](https://github.com/jqlang/jq):\n\n```shell\ncurl --request POST \\\n  --url http://localhost:8080/template \\\n  --header 'content-type: application/json' \\\n  --data '{\n\t\"url\": \"https://www.irs.gov/pub/irs-prior/fw9--2018.pdf\"\n}' | jq\n```\n\nThe response is a template containing the URL along with the fields and their default values, like this:\n```json\n{\n  \"url\": \"https://www.irs.gov/pub/irs-prior/fw9--2018.pdf\",\n  \"values\": {\n    \"topmostSubform[0].Page1[0].f1_1[0]\": \"\",\n    \"topmostSubform[0].Page1[0].f1_2[0]\": \"\",\n    \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[0]\": \"Off\",\n    \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[1]\": \"Off\",\n    \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[2]\": \"Off\",\n    \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[3]\": \"Off\",\n    \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[4]\": \"Off\",\n    \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[5]\": \"Off\",\n    \"topmostSubform[0].Page1[0].FederalClassification[0].f1_3[0]\": \"\",\n    \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[6]\": \"Off\",\n    \"topmostSubform[0].Page1[0].FederalClassification[0].f1_4[0]\": \"\",\n    \"topmostSubform[0].Page1[0].Exemptions[0].f1_5[0]\": \"\",\n    \"topmostSubform[0].Page1[0].Exemptions[0].f1_6[0]\": \"\",\n    \"topmostSubform[0].Page1[0].Address[0].f1_7[0]\": \"\",\n    \"topmostSubform[0].Page1[0].Address[0].f1_8[0]\": \"\",\n    \"topmostSubform[0].Page1[0].f1_9[0]\": \"\",\n    \"topmostSubform[0].Page1[0].f1_10[0]\": \"\",\n    \"topmostSubform[0].Page1[0].SSN[0].f1_11[0]\": \"\",\n    \"topmostSubform[0].Page1[0].SSN[0].f1_12[0]\": \"\",\n    \"topmostSubform[0].Page1[0].SSN[0].f1_13[0]\": \"\",\n    \"topmostSubform[0].Page1[0].EmployerID[0].f1_14[0]\": \"\",\n    \"topmostSubform[0].Page1[0].EmployerID[0].f1_15[0]\": \"\"\n  }\n}\n```\n\nOnce you know the structure of the payload, you can generate a custom payload and post it to the `/` endpoint to generate a filled-in PDF, like this:\n```shell\ncurl --request POST \\\n  --url http://localhost:8080/ \\\n  --output example.pdf \\\n  --header 'content-type: application/json' \\\n  --data '{\n      \"url\": \"https://www.irs.gov/pub/irs-prior/fw9--2018.pdf\",\n      \"values\": {\n        \"topmostSubform[0].Page1[0].f1_1[0]\": \"Foo Bar\",\n        \"topmostSubform[0].Page1[0].f1_2[0]\": \"Baz LLC\",\n        \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[0]\": \"1\",\n        \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[1]\": \"Off\",\n        \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[2]\": \"Off\",\n        \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[3]\": \"Off\",\n        \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[4]\": \"Off\",\n        \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[5]\": \"Off\",\n        \"topmostSubform[0].Page1[0].FederalClassification[0].f1_3[0]\": \"\",\n        \"topmostSubform[0].Page1[0].FederalClassification[0].c1_1[6]\": \"Off\",\n        \"topmostSubform[0].Page1[0].FederalClassification[0].f1_4[0]\": \"\",\n        \"topmostSubform[0].Page1[0].Exemptions[0].f1_5[0]\": \"\",\n        \"topmostSubform[0].Page1[0].Exemptions[0].f1_6[0]\": \"\",\n        \"topmostSubform[0].Page1[0].Address[0].f1_7[0]\": \"123 Fake Street\",\n        \"topmostSubform[0].Page1[0].Address[0].f1_8[0]\": \"Cincinnati, OH 45241\",\n        \"topmostSubform[0].Page1[0].f1_9[0]\": \"\",\n        \"topmostSubform[0].Page1[0].f1_10[0]\": \"\",\n        \"topmostSubform[0].Page1[0].SSN[0].f1_11[0]\": \"\",\n        \"topmostSubform[0].Page1[0].SSN[0].f1_12[0]\": \"\",\n        \"topmostSubform[0].Page1[0].SSN[0].f1_13[0]\": \"\",\n        \"topmostSubform[0].Page1[0].EmployerID[0].f1_14[0]\": \"12\",\n        \"topmostSubform[0].Page1[0].EmployerID[0].f1_15[0]\": \"3456789\"\n      }\n    }'\n```\n\nThe response saved in `example.pdf` is a [filled-in PDF](https://github.com/brianpursley/pdf-filler/raw/master/examples/filled-w9.pdf):\n![Filled W-9](https://github.com/brianpursley/pdf-filler/raw/master/examples/filled-w9.png)\n\n# Docker\n\nYou can run the service using the docker image like this:\n\n```\ndocker run -p 8080:8080 brianpursley/pdf-filler:latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianpursley%2Fpdf-filler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianpursley%2Fpdf-filler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianpursley%2Fpdf-filler/lists"}