{"id":13398618,"url":"https://github.com/euske/pdfminer","last_synced_at":"2025-10-05T17:31:45.869Z","repository":{"id":1229758,"uuid":"1161119","full_name":"euske/pdfminer","owner":"euske","description":"Python PDF Parser (Not actively maintained). Check out pdfminer.six.","archived":true,"fork":false,"pushed_at":"2022-12-07T11:28:01.000Z","size":6276,"stargazers_count":5274,"open_issues_count":243,"forks_count":1128,"subscribers_count":221,"default_branch":"master","last_synced_at":"2025-01-07T04:13:31.685Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/pdfminer/pdfminer.six","language":"Python","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/euske.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":"2010-12-12T12:50:22.000Z","updated_at":"2025-01-02T15:21:31.000Z","dependencies_parsed_at":"2022-07-14T22:46:49.275Z","dependency_job_id":null,"html_url":"https://github.com/euske/pdfminer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euske%2Fpdfminer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euske%2Fpdfminer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euske%2Fpdfminer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euske%2Fpdfminer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/euske","download_url":"https://codeload.github.com/euske/pdfminer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235424991,"owners_count":18988325,"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-07-30T19:00:29.372Z","updated_at":"2025-10-05T17:31:39.647Z","avatar_url":"https://github.com/euske.png","language":"Python","readme":"# PDFMiner\n\nPDFMiner is a text extraction tool for PDF documents.\n\n[![Build Status](https://travis-ci.org/euske/pdfminer.svg?branch=master)](https://travis-ci.org/euske/pdfminer)\n[![PyPI](https://img.shields.io/pypi/v/pdfminer)](https://pypi.org/project/pdfminer/)\n\n**Warning**: **As of 2020, PDFMiner is not actively maintained**.\nThe code still works, but this project is largely dormant.\nFor the active project, check out its fork\n\u003ca href=\"https://github.com/pdfminer/pdfminer.six\"\u003epdfminer.six\u003c/a\u003e.\n\n## Features:\n\n  * Pure Python (3.6 or above).\n  * Supports PDF-1.7. (well, almost)\n  * Obtains the exact location of text as well as other layout information (fonts, etc.).\n  * Performs automatic layout analysis.\n  * Can convert PDF into other formats (HTML/XML).\n  * Can extract an outline (TOC).\n  * Can extract tagged contents.\n  * Supports basic encryption (RC4 and AES).\n  * Supports various font types (Type1, TrueType, Type3, and CID).\n  * Supports CJK languages and vertical writing scripts.\n  * Has an extensible PDF parser that can be used for other purposes.\n\n\n## How to Use:\n\n  1. `\u003e pip install pdfminer`\n  1. `\u003e pdf2txt.py samples/simple1.pdf`\n\n\n## Command Line Syntax:\n\n### pdf2txt.py\n\npdf2txt.py extracts all the texts that are rendered programmatically.\nIt also extracts the corresponding locations, font names, font sizes,\nwriting direction (horizontal or vertical) for each text segment.  It\ndoes not recognize text in images. A password needs to be provided for\nrestricted PDF documents.\n\n    \u003e pdf2txt.py [-P password] [-o output] [-t text|html|xml|tag]\n                 [-O output_dir] [-c encoding] [-s scale] [-R rotation]\n                 [-Y normal|loose|exact] [-p pagenos] [-m maxpages]\n                 [-S] [-C] [-n] [-A] [-V]\n                 [-M char_margin] [-L line_margin] [-W word_margin]\n                 [-F boxes_flow] [-d]\n                 input.pdf ...\n\n  * `-P password` : PDF password.\n  * `-o output` : Output file name.\n  * `-t text|html|xml|tag` : Output type. (default: automatically inferred from the output file name.)\n  * `-O output_dir` : Output directory for extracted images.\n  * `-c encoding` : Output encoding. (default: utf-8)\n  * `-s scale` : Output scale.\n  * `-R rotation` : Rotates the page in degree.\n  * `-Y normal|loose|exact` : Specifies the layout mode. (only for HTML output.)\n  * `-p pagenos` : Processes certain pages only.\n  * `-m maxpages` : Limits the number of maximum pages to process.\n  * `-S` : Strips control characters.\n  * `-C` : Disables resource caching.\n  * `-n` : Disables layout analysis.\n  * `-A` : Applies layout analysis for all texts including figures.\n  * `-V` : Automatically detects vertical writing.\n  * `-M char_margin` : Speficies the char margin.\n  * `-W word_margin` : Speficies the word margin.\n  * `-L line_margin` : Speficies the line margin.\n  * `-F boxes_flow` : Speficies the box flow ratio.\n  * `-d` : Turns on Debug output.\n\n### dumppdf.py\n\ndumppdf.py is used for debugging PDFs.\nIt dumps all the internal contents in pseudo-XML format.\n\n    \u003e dumppdf.py [-P password] [-a] [-p pageid] [-i objid]\n                 [-o output] [-r|-b|-t] [-T] [-O directory] [-d]\n                 input.pdf ...\n\n  * `-P password` : PDF password.\n  * `-a` : Extracts all objects.\n  * `-p pageid` : Extracts a Page object.\n  * `-i objid` : Extracts a certain object.\n  * `-o output` : Output file name.\n  * `-r` : Raw mode. Dumps the raw compressed/encoded streams.\n  * `-b` : Binary mode. Dumps the uncompressed/decoded streams.\n  * `-t` : Text mode. Dumps the streams in text format.\n  * `-T` : Tagged mode. Dumps the tagged contents.\n  * `-O output_dir` : Output directory for extracted streams.\n\n## TODO\n\n  * Replace STRICT variable with something better.\n  * Improve the debugging functions.\n  * Use logging module instead of sys.stderr.\n  * Proper test cases.\n  * PEP-8 and PEP-257 conformance.\n  * Better documentation.\n  * Crypto stream filter support.\n\n\n## Related Projects\n\n  * \u003ca href=\"http://pybrary.net/pyPdf/\"\u003epyPdf\u003c/a\u003e\n  * \u003ca href=\"http://www.foolabs.com/xpdf/\"\u003expdf\u003c/a\u003e\n  * \u003ca href=\"http://pdfbox.apache.org/\"\u003epdfbox\u003c/a\u003e\n  * \u003ca href=\"http://mupdf.com/\"\u003emupdf\u003c/a\u003e\n","funding_links":[],"categories":["Python","Specific Formats Processing","资源列表","PYTHON","数据读写与提取","特殊文本格式处理","Text Processing","Specific Formats Processing [🔝](#readme)","📚 فهرست","Awesome Python"],"sub_categories":["特殊文本格式处理","کار با pdf","Specific Formats Processing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuske%2Fpdfminer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feuske%2Fpdfminer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuske%2Fpdfminer/lists"}