{"id":22562238,"url":"https://github.com/preciz/pdf_info","last_synced_at":"2025-04-10T10:33:04.998Z","repository":{"id":40562501,"uuid":"278722398","full_name":"preciz/pdf_info","owner":"preciz","description":"Extract all metadata from a PDF binary","archived":false,"fork":false,"pushed_at":"2025-03-08T23:04:06.000Z","size":94,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T02:52:42.299Z","etag":null,"topics":["elixir","pdf"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/pdf_info","language":"Elixir","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/preciz.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}},"created_at":"2020-07-10T19:58:51.000Z","updated_at":"2025-03-30T13:10:25.000Z","dependencies_parsed_at":"2023-01-23T02:31:09.217Z","dependency_job_id":"b0993cd8-dc6c-4559-81d1-344833475e28","html_url":"https://github.com/preciz/pdf_info","commit_stats":{"total_commits":100,"total_committers":3,"mean_commits":"33.333333333333336","dds":"0.17000000000000004","last_synced_commit":"be54c03fa3c1ed236ea71f0c789aaee050b53415"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preciz%2Fpdf_info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preciz%2Fpdf_info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preciz%2Fpdf_info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preciz%2Fpdf_info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preciz","download_url":"https://codeload.github.com/preciz/pdf_info/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"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":["elixir","pdf"],"created_at":"2024-12-07T22:12:09.964Z","updated_at":"2025-04-10T10:33:04.980Z","avatar_url":"https://github.com/preciz.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDFInfo\n\n![Actions Status](https://github.com/preciz/pdf_info/workflows/test/badge.svg)\n\nExtracts all /Info and /Metadata objects from a PDF binary using Regex\nand with zero dependencies.\n\nLimitations:\nIf the PDF is encrypted or the metadata is compressed you have to first decrypt and uncompress:\n```\nqpdf --stream-data=uncompress --compress-streams=n --decrypt --password='' myfile.pdf myfile_out.pdf\n```\n\n## Installation\n\nAdd `pdf_info` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:pdf_info, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\n## Usage\n\n```elixir\niex(1)\u003e pdf = File.read!(\"/Downloads/sample.pdf\")\n\u003c\u003c37, 80, 68, 70, 45, ...\u003e\u003e\niex(2)\u003e PDFInfo.is_pdf?(pdf)\ntrue # looks like it's a PDF!\niex(3)\u003e PDFInfo.is_encrypted?(pdf)\nfalse # it's not encrypted (this lib can't decrypt, if it's encrypted then decrypt first)\niex(4)\u003e PDFInfo.info_objects(pdf)\n# a map with info objects\n%{\"/Info 6 0 R\" =\u003e [\n  %{\n  \"Author\" =\u003e \"Barna Kovacs\",\n  \"CreationDate\" =\u003e \"D:20200212212756Z\",\n  \"Title\" =\u003e \"Can't come up with a title\"\n  }\n]}\niex(5)\u003e PDFInfo.metadata_objects(pdf)\n# list of maps with metadata\n[\n  %{\n    {\"dc\", \"creator\"} =\u003e \"Barna Kovacs\",\n    {\"dc\", \"format\"} =\u003e \"application/pdf\",\n    {\"dc\", \"title\"} =\u003e \"Can't come up with a title\",\n    ...\n  }\n]\n\n```\n\n## Documentation\n\nDocumentation can be found at [https://hexdocs.pm/pdf_info](https://hexdocs.pm/pdf_info).\n\n## License\n\nPDFInfo is [MIT licensed](LICENSE).\n\n## Credit\n\nInspired by [https://gitlab.com/nxl4/pdf-metadata](https://gitlab.com/nxl4/pdf-metadata)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreciz%2Fpdf_info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreciz%2Fpdf_info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreciz%2Fpdf_info/lists"}