{"id":14483317,"url":"https://github.com/ccnmtl/fdfgen","last_synced_at":"2025-05-15T14:07:47.318Z","repository":{"id":1169640,"uuid":"1063019","full_name":"ccnmtl/fdfgen","owner":"ccnmtl","description":"port of PDF fdfgen library for filling in PDF forms to Python","archived":false,"fork":false,"pushed_at":"2025-05-14T14:21:35.000Z","size":206,"stargazers_count":171,"open_issues_count":9,"forks_count":35,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-14T15:37:10.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ccnmtl.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,"zenodo":null}},"created_at":"2010-11-08T20:48:47.000Z","updated_at":"2025-05-14T14:21:31.000Z","dependencies_parsed_at":"2023-11-28T20:25:12.503Z","dependency_job_id":"2c4e1d6b-ca16-41e0-a5d1-b635bb9cab3f","html_url":"https://github.com/ccnmtl/fdfgen","commit_stats":{"total_commits":176,"total_committers":17,"mean_commits":"10.352941176470589","dds":0.6477272727272727,"last_synced_commit":"c63b2afa04f195d890902fc17fb5eb7b4effba74"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnmtl%2Ffdfgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnmtl%2Ffdfgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnmtl%2Ffdfgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnmtl%2Ffdfgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccnmtl","download_url":"https://codeload.github.com/ccnmtl/fdfgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355335,"owners_count":22057354,"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-09-03T00:01:41.562Z","updated_at":"2025-05-15T14:07:42.307Z","avatar_url":"https://github.com/ccnmtl.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# fdfgen\n\n[![Build Status](https://travis-ci.org/ccnmtl/fdfgen.svg?branch=master)](https://travis-ci.org/ccnmtl/fdfgen)\n\nPython port of the PHP [forge_fdf](http://www.pdfhacks.com/forge_fdf/) library by Sid Steward\n\nPDF forms work with FDF data. I ported a PHP FDF library to Python a while back when I had to do this and released it as fdfgen. I use that to generate an fdf file with the data for the form, then use [`pdftk`](http://www.pdflabs.com/tools/pdftk-server/) to push the fdf into a PDF form and generate the output.\n\n## QUICK INSTALL\n\n    pip install fdfgen\n\n## HOW IT WORKS\n\n1. You (or a designer) design the `form.pdf` in Acrobat.\n2. Mark the form fields and take note of the field names. This can be done either through Acrobat or by installing pdftk and entering the command line\n\n        pdftk [pdf name] dump_data_fields\n\n3. Let's say your form has fields \"name\" and \"telephone\".\n\n    Use fdfgen to create a FDF file:\n\n        #!/usr/bin/env python\n        from fdfgen import forge_fdf\n        \n        fields = [('name', 'John Smith'), ('telephone', '555-1234')]\n        fdf = forge_fdf(\"\",fields,[],[],[])\n        \n        with open(\"data.fdf\", \"wb\") as fdf_file:\n            fdf_file.write(fdf)\n\n4. Then you run pdftk to merge and flatten:\n\n       pdftk form.pdf fill_form data.fdf output output.pdf flatten\n\n    and a filled out, flattened (meaning that there are no longer editable form fields) pdf will be in `output.pdf`.\n\n## CHANGELOG\n\n* 0.16.1 -- 2017-11-21 -- Fix `TypeError` in python 3.6 by Tom Grundy (@caver456)\n* 0.16.0 -- 2017-02-22 -- Allow for different values for each checkbox by \u003cbil.bagpuss@gmail.com\u003e\n* 0.15.0 -- 2016-09-23 -- Encode field names as UTF-16 fix by Andreas Pelme \u003candreas@pelme.se\u003e\n* 0.14.0 -- 2016-08-09 -- Adobe FDF Compatibility added by Cooper Stimson (@6C1)\n* 0.13.0 -- 2016-04-22 -- python 3 bugfix from Julien Enselme \u003cjulien.enselme@ioda.net\u003e\n* 0.12.1 -- 2015-11-01 -- handle alternative checkbox values fix from Bil Bas \u003chttps://github.com/Spooner\u003e\n* 0.12.0 -- 2015-07-29 -- python 3 bugfixes\n* 0.11.0 -- 2013-12-07 -- python 3 port from Evan Fredericksen\n* 0.10.2 -- 2013-06-16 -- minor code refactor and added command line options from Robert Stewart \u003chttps://github.com/rwjs\u003e\n* 0.10.1 -- 2013-04-22 -- unbalanced paren bugfix from Brandon Rhodes \u003cbrandon@rhodesmill.org\u003e\n* 0.10.0 -- 2012-06-14 -- support checkbox fields and parenthesis in strings from Guangcong Luo \u003czarelsl@gmail.com\u003e\n* 0.9.2  -- 2011-01-12 -- merged unicode fix from Sébastien Fievet \u003czyegfryed@gmail.com\u003e\n\n## RUNNING TESTS:\n\n* Create a virtual environment\n* tox is required to run the tests. You can install the correct version with\n  `pip install -r requirements-tests.txt`\n* Run `tox` to run tests for all Python versions.\n* To run a specific test and specific Python versions, you may use `tox -e py27\n  -- tests/test_encoding.py`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccnmtl%2Ffdfgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccnmtl%2Ffdfgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccnmtl%2Ffdfgen/lists"}