{"id":16032785,"url":"https://github.com/threez/gpd","last_synced_at":"2025-10-24T22:02:12.547Z","repository":{"id":66444328,"uuid":"143008173","full_name":"threez/gpd","owner":"threez","description":"Ghostscript PDF Daemon","archived":false,"fork":false,"pushed_at":"2018-08-09T18:47:04.000Z","size":950,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T08:12:41.983Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/threez.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":"2018-07-31T11:58:36.000Z","updated_at":"2020-01-20T08:02:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"31d080a0-30a2-440e-9c7e-c264d7dc0f40","html_url":"https://github.com/threez/gpd","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/threez%2Fgpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fgpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fgpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fgpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threez","download_url":"https://codeload.github.com/threez/gpd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246644097,"owners_count":20810687,"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-08T21:40:35.335Z","updated_at":"2025-10-24T22:02:12.540Z","avatar_url":"https://github.com/threez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpd\n\nGhostscript PDF Daemon is a small minio companion application.\n[Minio](https://minio.io) supports bucket notifications e.g. a webhook.\nThis application is similar to the [thumbnailer](https://github.com/minio/thumbnailer) but applies only to PDF.\n\nPurpose of the Ghostscript PDF Daemon is to react on webhook bucket\nnotifications, download the file if it is a PDF, extract the text\ncontent into a JSON file and create thumbnails for all pages of the\ndocument.\n\n## Architecture\n\n                         +-----------+\n                  +------\u003e   minio   |\n                  |      +---+-------+\n                  |          |\n        2. down-  |          | 1. webhook\n        load      |          |\n                  |      +---v-------+    +-------------+\n        4. upload +------+    gpd    +----\u003e ghostscript |\n        json +           +-----------+    +-------------+\n        thumbnails\n                                    3. analyse\n\n## Created documents layout\n\nThe created documents have the following format.\n\nGiven the input PDF with 3 pages:\n\n    path/in/minio/XYZ.pdf\n\nThe following files will be produced:\n\n    path/in/minio/XYZ.json\n    path/in/minio/XYZ-1.jpeg\n    path/in/minio/XYZ-2.jpeg\n    path/in/minio/XYZ-3.jpeg\n\n## License\n\nThe 2-Clause BSD License.\n\n## Configuration and Setup\n\nThe token can be used to secure the connection between the minio server and the\ngpd. Only events that are done via the token URL are allowed and processed.\n\n### 1. Enable webhooks in minio\n\nThe URL needs to be the URL of the gpd server. Example:\n\n    \"webhook\": {\n        \"1\": {\n                \"enable\": true,\n                \"endpoint\": \"https://\u003chost\u003e:3443/gpd/events?token=\u003cSOME-RANDOM-TOKEN\u003e\"\n        }\n\n### 2. Create bucket and enable events on the bucket via minio command\n\n    $ minio-client mb \u003cserver\u003e/\u003cbucket\u003e --region=\u003cregion\u003e\n    $ minio-client events add \u003cserver\u003e/\u003cbucket\u003e arn:minio:sqs:\u003cregion\u003e:1:webhook --suffix .pdf\n\nFor example:\n\n    $ minio-client mb s3/test --region=\u003cus-east-1\u003e\n    $ minio-client events add s3/test arn:minio:sqs:us-east-1:1:webhook --suffix .pdf\n\nThe notifications can also be restricted to a certain prefix using `--prefix`.\n\n### 3. Start the gpd service\n\n    $ ./gpd -address :3443 -token \u003cSOME-RANDOM-TOKEN\u003e -cert cert.pem -key key.pem\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreez%2Fgpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreez%2Fgpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreez%2Fgpd/lists"}