{ "info": { "author": "Aryeh Leib Taurog", "author_email": "python@aryehleib.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Office/Business" ], "description": "pdfforms\n=========\n\npdfforms is a small utility for populating fillable pdf forms from a csv\ndata source. It was created with the intent of filling US tax forms using\ntax data prepared with a spreadsheet, but should be equally applicable to\nother forms.\n\nFeatures\n---------\n\n* Assigns numeric id for each field\n* Generates test pdf showing ids of text fields\n* Merges csv data into final filled pdf\n* Can process multiple pdfs at a time\n\nRequirements\n------------\n\npdfforms requires Python 3.5 or higher and `pdftk`_, which does all the real work.\n\n.. _pdftk: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/\n\nInstallation\n-------------\n\nTo install: ``pip install pdfforms``\n\nUse\n---\n\nLet's say you have a spreadsheet with your tax calculations. You want to\npopulate your tax forms with the data from the spreadsheet. pdfforms\nallows you to do so with the following steps:\n\n#. First pdfforms must inspect the forms to be filled. pdfforms will\n extract a list of fields in each of the specified documents. Each field\n is assigned a numeric id, and test documents are generated with filled\n forms, showing the id of each text field::\n\n $ pdfforms inspect f1040*.pdf\n f1040sse.pdf\n f1040sce.pdf\n f1040.pdf\n\n\n The filled test pdfs are stored by default in the ``test/`` subdirectory.\n\n#. Browse the test pdf files and add the field numbers of the fields you\n need to fill to your spreadsheet. pdfforms only reads the first and\n third columns of the datafile. The first column should contain the name\n of the pdf file with the form to fill and the field numbers. The third\n column should contain the data to be written into the field. The rest\n of the sheet is ignored, so you can use it for notes, calculations, etc.\n\n Below is an example spreadsheet for a (fictional) 2016\n tax return.\n\n .. csv-table::\n\n f1040.pdf,Form 1040,,2016,\n 3,First Name and initial,John Q,,\n 4,Last Name,Public,,\n 5,SSN,321546789,321-54-6789,\n 6,Spouse's Name,Susie,,\n 7,Spouse's Last Name,Public,,\n 8,SSN,132458697,132-45-8697,\n 9,Address,5776 Winding Ln,,\n 11,,\"Springfield, MA\",,\n 18,Filing status,MJ,,\n 24,Exemption - self,1,,\n 25,Exemption - spouse,1,,\n 27,Dependent name,Timothy Public,,\n 28,Dependent ssn,531248680,531-24-8680,\n 29,Dependent relationship,Son,,\n 30,Dependent under 17,1,,\n 31,Dependent name,Abigail Public,,\n 32,Dependent ssn,428775031,428-77-5031,\n 33,Dependent relationship,Daughter,,\n 34,Dependent under 17,1,,\n 45,Line 6a,2,,\n 46,Line 6c,2,,\n 49,Line 6d,4,,\n 50,Line 7,\"60,000\",salaries,\n 52,Line 8a,124,taxable interest,\n 64,Line 12,\"15,000\",business income,\n 92,Line 22,\"75,124\",total income,\n 102,Line 27,\"1,060\",half SE tax,\n 121,Line 36,\"1,060\",,\n 123,Line 37,\"74,064\",Adjusted Gross Income,\n 125,Line 38,\"74,064\",,\n 133,Line 40,\"12,600\",Standard Deduction,\n 135,Line 41,\"61,464\",,\n 137,Line 42,\"16,200\",Exemptions,\"$ 4,050\"\n 139,Line 43,\"45,264\",Taxable income,\n 145,Line 44,\"4,528\",Tax,\n 151,Line 47,\"4,528\",,\n 161,Line 52,\"2,000\",Child Tax Credit,\n 171,Line 55,\"2,000\",Total Credits,\n 173,Line 56,\"2,528\",,\n 175,Line 57,\"2,119\",Self-employment tax,\n 196,Line 63,\"4,647\",Total Tax,\n 198,Line 64,\"8,688\",Tax withheld,\n 225,Line 74,\"8,688\",Total Payments,\n 227,Line 75,\"4,041\",Amount you overpaid,\n 230,Line 76a,\"4,041\",Amount you want refunded,\n 232,Line 76b,123654789,Routing Number,\n 234,Line 76c,Savings,Account Type,\n 235,Line 76d,135724,Account Number,\n 247,Occupation,Salesman,,\n 248,Daytime phone number,413-555-1212,,\n 249,Spouse's Occupation,Artist,,\n ,,,,\n f1040sce.pdf,Schedule C-EZ,,,\n 0,Name,Susie Public,,\n 1,SSN,132-45-8697,,\n 9,Line F,2,No,\n 2,Line A,Artist,Principle business or profession,\n 3,Line B,711510,Business Code,\n 13,Line 1,\"22,000\",gross receipts,\n 15,Line 2,\"7,000\",total expenses,\n 17,Line 3,\"15,000\",net profit,\n ,,,,\n f1040sse.pdf,Form SE - Section A Short Schedule SE,,,\n 0,Name,Susie Public,,\n 1,SSN,132-45-8697,,\n 6,Line 2,\"15,000\",,\n 8,Line 3,\"15,000\",92.35%,\n 10,Line 4,\"13,853\",15.30%,\n 12,Line 5,\"2,119\",50.00%,\n 14,Line 6,\"1,060\",,\n\n The test pdfs do not show field numbers for checkboxes. Currently the\n only way to fill checkboxes is to examine the ``fields.json`` file and\n find the field number and allowed values of the checkbox.\n\n#. Once the file name and field numbers have been added to your spreadsheet,\n save the spreadsheet as a csv file and fill the forms::\n\n $ pdfforms fill mydata.csv\n f1040sse.pdf\n f1040sce.pdf\n f1040.pdf\n\n The final, populated pdf files are saved by default to the ``filled/``\n subdirectory.\n\n\nChangelog\n-----------\n\n1.2.0\n\"\"\"\"\"\n:date: 24 September, 2019\n\n* Added ``--no-flatten`` option to keep form fillable\n* ``inspect`` doesn\u2019t crash if passed a pdf without fillable form\n\n1.1.0\n\"\"\"\"\"\n:date: 4 July, 2018\n\n* Fixed handling of whitespace (Thanks @rohitkhirapate for the bug report)\n* Added python 3.4 compatibility (Thanks @oneyb for the PR)\n\n1.0.0\n\"\"\"\"\"\n:date: 1 May, 2017\n\n* Initial release\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/altaurog/pdfforms", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pdfforms", "package_url": "https://pypi.org/project/pdfforms/", "platform": "", "project_url": "https://pypi.org/project/pdfforms/", "project_urls": { "Homepage": "https://github.com/altaurog/pdfforms" }, "release_url": "https://pypi.org/project/pdfforms/1.2.0/", "requires_dist": null, "requires_python": "", "summary": "Populate fillable pdf forms from csv data file", "version": "1.2.0" }, "last_serial": 5879594, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "1187a1e8833427030eb0be8a562946e4", "sha256": "25fe580f904c3fb784fd1c8c2ba222b3911f77af599b100d2e731915efd2caac" }, "downloads": -1, "filename": "pdfforms-1.0.0-py36-none-any.whl", "has_sig": false, "md5_digest": "1187a1e8833427030eb0be8a562946e4", "packagetype": "bdist_wheel", "python_version": "py36", "requires_python": null, "size": 8349, "upload_time": "2017-05-01T12:52:14", "url": "https://files.pythonhosted.org/packages/57/8d/1969c5e1714857f5925651d8cef3e607110fe1651ff356f970f7852fa60b/pdfforms-1.0.0-py36-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8e47ab1cf6c835a021b641727fd34459", "sha256": "c79350d3d389c1b426cc355e0756c5ac4258cbe6bd391dcba46cddfcc9799152" }, "downloads": -1, "filename": "pdfforms-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8e47ab1cf6c835a021b641727fd34459", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29639, "upload_time": "2017-05-01T12:52:16", "url": "https://files.pythonhosted.org/packages/b5/bc/17f479ed7ce3034f0e475c5e62ee8f091e5cc72ed35fbb61ec4ce3132385/pdfforms-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "4a4b81cc38b736dfdc247cdca49dc2b7", "sha256": "9a917c013793fbab6a397b6cc022ffe059bab9e8a07387a99262565274bd89cc" }, "downloads": -1, "filename": "pdfforms-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4a4b81cc38b736dfdc247cdca49dc2b7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5427, "upload_time": "2018-07-04T14:50:15", "url": "https://files.pythonhosted.org/packages/e6/5c/100d1209156e736cba0e2d231e943c77c8fbcacfe48eab04d6261b3353df/pdfforms-1.1.0-py3-none-any.whl" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "31beab25f80ba1ce8458fccfa086484f", "sha256": "6aa63f72b6a97a1709f43e2cde0dfb31d2bdd2c9528af4f9542b6b6521aa31d1" }, "downloads": -1, "filename": "pdfforms-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "31beab25f80ba1ce8458fccfa086484f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5626, "upload_time": "2019-09-24T13:07:52", "url": "https://files.pythonhosted.org/packages/60/71/0f5928ccd5799aa2fe452c759471b3439572734fa96790e83d7271d938e2/pdfforms-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9412e99db672d2163755f5704c75547f", "sha256": "c3d1118f73f5d6fb2c7e549f4d99d3f5284d37bc56b210d0e3eea9fe632bea29" }, "downloads": -1, "filename": "pdfforms-1.2.0.tar.gz", "has_sig": false, "md5_digest": "9412e99db672d2163755f5704c75547f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30114, "upload_time": "2019-09-24T13:07:54", "url": "https://files.pythonhosted.org/packages/69/04/4bcdf291fbfb762d317598b768b29874c086d09fdb426dea87513a233617/pdfforms-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "31beab25f80ba1ce8458fccfa086484f", "sha256": "6aa63f72b6a97a1709f43e2cde0dfb31d2bdd2c9528af4f9542b6b6521aa31d1" }, "downloads": -1, "filename": "pdfforms-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "31beab25f80ba1ce8458fccfa086484f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5626, "upload_time": "2019-09-24T13:07:52", "url": "https://files.pythonhosted.org/packages/60/71/0f5928ccd5799aa2fe452c759471b3439572734fa96790e83d7271d938e2/pdfforms-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9412e99db672d2163755f5704c75547f", "sha256": "c3d1118f73f5d6fb2c7e549f4d99d3f5284d37bc56b210d0e3eea9fe632bea29" }, "downloads": -1, "filename": "pdfforms-1.2.0.tar.gz", "has_sig": false, "md5_digest": "9412e99db672d2163755f5704c75547f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30114, "upload_time": "2019-09-24T13:07:54", "url": "https://files.pythonhosted.org/packages/69/04/4bcdf291fbfb762d317598b768b29874c086d09fdb426dea87513a233617/pdfforms-1.2.0.tar.gz" } ] }