{"id":27019108,"url":"https://github.com/jabbalaci/pdfmanip","last_synced_at":"2025-09-12T07:33:08.009Z","repository":{"id":140437721,"uuid":"164313041","full_name":"jabbalaci/pdfmanip","owner":"jabbalaci","description":"Manipulate PDF files (e.g. remove given pages)","archived":false,"fork":false,"pushed_at":"2025-04-18T14:10:18.000Z","size":21,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T03:33:17.927Z","etag":null,"topics":["pdf","pdf-manipulation","python","python3","tool","util"],"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/jabbalaci.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-06T14:07:34.000Z","updated_at":"2025-04-18T14:10:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d086ab4-8208-4b7f-a07c-fdcbce9f086e","html_url":"https://github.com/jabbalaci/pdfmanip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jabbalaci/pdfmanip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabbalaci%2Fpdfmanip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabbalaci%2Fpdfmanip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabbalaci%2Fpdfmanip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabbalaci%2Fpdfmanip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jabbalaci","download_url":"https://codeload.github.com/jabbalaci/pdfmanip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jabbalaci%2Fpdfmanip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274776799,"owners_count":25347639,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["pdf","pdf-manipulation","python","python3","tool","util"],"created_at":"2025-04-04T17:19:05.980Z","updated_at":"2025-09-12T07:33:07.997Z","avatar_url":"https://github.com/jabbalaci.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pdfmanip\n========\n\nA simple tool to manipulate your PDF files.\n\nMotivation\n----------\n\nI prefer reading on paper, so I print a lot. Often, when\nI export for instance a blog post in PDF, there are\nsome pages that I don't want to print.\n\nThis little tool helps me removing the unwanted pages easily.\n\nDemo\n----\n\nYou must provide the input PDF and then it goes to interactive mode.\nThe output is written to `output.pdf`.\n\n```\n$ ./pdfmanip.py input.pdf\ntype 'h' for help\nNumber of pages: 8\n\u003e h\nh, help        - this help\nq, quit        - quit\ni, info        - info about the status of the output.pdf\nw              - write output.pdf (fails if the file exists)\nw!             - overwrite output.pdf\nd, ls          - directory list\noi             - open input.pdf with okular\noo             - open output.pdf with okular\ndel PAGES      - delete the given pages\n                 the format of PAGES is like printing pages\n                 example: del 1,2-4,8-\nreload, reset  - reload input.pdf\n                 useful if you deleted some wrong pages and you want to restart\n\u003e del 1,6-\nNumber of pages: 4\n# nothing was saved yet\n\u003e w!\n-rw-r--r--   1 jabba users 110024 Jan  6 15:15 output.pdf\n\u003e\n```\n\nHere, the input PDF had 8 pages. After removing pages 1, 6, 7 and 8, we\ngot a PDF with 4 remaining pages.\n\nDependency\n----------\n\nThe real PDF manipulation is done with the [pikepdf](https://github.com/pikepdf/pikepdf)\nlibrary.\n\nSupported platform\n------------------\n\nLinux only.\n\nReddit discussion\n-----------------\n\nSee [here](https://old.reddit.com/r/Python/comments/ad617g/a_cli_util_to_manipulate_pdf_files_eg_remove/).\n\nRelated work\n------------\n\n* [pikepdf](https://github.com/pikepdf/pikepdf) Python library (this is what I used)\n* [pdftk](https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/), a powerful PDF-manipulating command-line tool\n* [PDFsam](https://pdfsam.org/) ([wikipedia article](https://en.wikipedia.org/wiki/PDF_Split_and_Merge)), a more heavyweight solution for manipulating your PDFs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjabbalaci%2Fpdfmanip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjabbalaci%2Fpdfmanip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjabbalaci%2Fpdfmanip/lists"}