{"id":17923977,"url":"https://github.com/spageektti/pdf_tool","last_synced_at":"2025-04-03T09:22:13.788Z","repository":{"id":251664622,"uuid":"838069603","full_name":"spageektti/pdf_tool","owner":"spageektti","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-09T19:50:35.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T22:45:00.426Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/spageektti.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}},"created_at":"2024-08-04T21:10:05.000Z","updated_at":"2024-09-09T19:50:39.000Z","dependencies_parsed_at":"2024-08-04T22:44:28.500Z","dependency_job_id":"5f52d821-90ca-4acb-879b-1aba72907433","html_url":"https://github.com/spageektti/pdf_tool","commit_stats":null,"previous_names":["spageektti/pdf_tool"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spageektti%2Fpdf_tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spageektti%2Fpdf_tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spageektti%2Fpdf_tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spageektti%2Fpdf_tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spageektti","download_url":"https://codeload.github.com/spageektti/pdf_tool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246970479,"owners_count":20862563,"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-10-28T20:46:28.809Z","updated_at":"2025-04-03T09:22:13.762Z","avatar_url":"https://github.com/spageektti.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDF Tool\n\n![Zrzut ekranu_20240909_215018](https://github.com/user-attachments/assets/ddc90bb0-c63e-4655-b208-8b83a2c30b9a)\n\nA command-line tool for manipulating PDF files. This tool supports merging, splitting, extracting text, rotating, adding watermarks, and encrypting PDFs.\n\nThis `README.md` provides clear instructions for installation and usage of the PDF tool, ensuring that you can easily understand and leverage the tool's functionalities.\n\n### Summary of Provided Functionalities\n\n1. **Merge PDFs**: Combines multiple PDFs into a single file.\n2. **Split PDFs**: Splits a PDF into smaller files based on page count or parts.\n3. **Extract Text**: Extracts text from a PDF and saves it to a text file.\n4. **Rotate Pages**: Rotates specified pages of a PDF by a given angle.\n5. **Add Watermark**: Adds a watermark to each page of a PDF.\n6. **Encrypt PDF**: Encrypts a PDF with a password.\n\n## Installation\n\n1. Clone the repository:\n    ```sh\n    git clone https://github.com/spageektti/pdf_tool.git\n    cd pdf_tool\n    ```\n\n2. Install the required dependencies:\n    ```sh\n    pip install -r requirements.txt\n    ```\n\n## Usage\n\n### Merge PDFs\n\nMerge multiple PDF files into a single PDF.\n\n```sh\npython pdf_tool.py -m file1.pdf file2.pdf output.pdf\n```\n\n- `file1.pdf` and `file2.pdf` are the input PDFs.\n- `output.pdf` is the name of the resulting merged PDF.\n\n### Split PDFs\n\nSplit a PDF into smaller PDFs based on the specified criteria.\n\n#### Split every `i` pages:\n\n```sh\npython pdf_tool.py -s input.pdf output_dir every i\n```\n\n- `input.pdf` is the input PDF.\n- `output_dir` is the directory where the split PDFs will be saved.\n- `every` specifies the split type to split every `i` pages.\n- `i` is the number of pages per split.\n\n#### Split into `i` parts:\n\n```sh\npython pdf_tool.py -s input.pdf output_dir parts i\n```\n\n- `input.pdf` is the input PDF.\n- `output_dir` is the directory where the split PDFs will be saved.\n- `parts` specifies the split type to split the PDF into `i` parts.\n- `i` is the number of parts.\n\n### Extract Text from a PDF\n\nExtract text from a PDF and save it to a text file.\n\n```sh\npython pdf_tool.py -e input.pdf output.txt\n```\n\n- `input.pdf` is the input PDF.\n- `output.txt` is the text file where the extracted text will be saved.\n\n### Rotate Pages in a PDF\n\nRotate specified pages of a PDF by a given angle.\n\n```sh\npython pdf_tool.py -r input.pdf output.pdf rotation pages\n```\n\n- `input.pdf` is the input PDF.\n- `output.pdf` is the name of the resulting rotated PDF.\n- `rotation` is the rotation angle (90, 180, 270).\n- `pages` is a comma-separated list of page numbers or `'all'`.\n\n### Add Watermark to a PDF\n\nAdd a watermark to each page of the input PDF.\n\n```sh\npython pdf_tool.py -w input.pdf output.pdf watermark.pdf\n```\n\n- `input.pdf` is the input PDF.\n- `output.pdf` is the name of the resulting watermarked PDF.\n- `watermark.pdf` is the PDF containing the watermark.\n\n### Encrypt a PDF\n\nEncrypt a PDF with a given password.\n\n```sh\npython pdf_tool.py -p input.pdf output.pdf password\n```\n\n- `input.pdf` is the input PDF.\n- `output.pdf` is the name of the resulting encrypted PDF.\n- `password` is the password to encrypt the PDF.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspageektti%2Fpdf_tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspageektti%2Fpdf_tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspageektti%2Fpdf_tool/lists"}