{"id":25948809,"url":"https://github.com/kazuyakuza/alpine-pdf-tools","last_synced_at":"2026-05-15T12:34:42.591Z","repository":{"id":280035283,"uuid":"940789532","full_name":"kazuyakuza/alpine-pdf-tools","owner":"kazuyakuza","description":"Docker image with Alpine Linux and the PDF tools qpdf and Ghostscript","archived":false,"fork":false,"pushed_at":"2025-03-06T22:10:46.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-16T00:49:43.273Z","etag":null,"topics":["alpine","docker","docker-image","ghostscript","pdf","qpdf"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/kazuyakuza.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}},"created_at":"2025-02-28T19:49:48.000Z","updated_at":"2025-03-06T22:10:49.000Z","dependencies_parsed_at":"2025-02-28T23:42:39.944Z","dependency_job_id":"bce8b608-55b1-4dbf-94ce-a4beb6308285","html_url":"https://github.com/kazuyakuza/alpine-pdf-tools","commit_stats":null,"previous_names":["kazuyakuza/alpine-pdf-tools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kazuyakuza/alpine-pdf-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuyakuza%2Falpine-pdf-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuyakuza%2Falpine-pdf-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuyakuza%2Falpine-pdf-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuyakuza%2Falpine-pdf-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kazuyakuza","download_url":"https://codeload.github.com/kazuyakuza/alpine-pdf-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazuyakuza%2Falpine-pdf-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["alpine","docker","docker-image","ghostscript","pdf","qpdf"],"created_at":"2025-03-04T11:22:59.079Z","updated_at":"2026-05-15T12:34:42.568Z","avatar_url":"https://github.com/kazuyakuza.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alpine PDF Tools Docker Image\n\nThis repository contains the files to build a Docker image with Alpine Linux, the PDF tools qpdf and Ghostscript, and Node.js. The image can be built with different versions of Node.js and specific versions of qpdf and Ghostscript using build arguments.\n\n## Links\n\n- **GitHub Repository:** \u003chttps://github.com/kazuyakuza/alpine-pdf-tools\u003e\n- **Docker Hub Image:** \u003chttps://hub.docker.com/r/kazuyakuza/alpine-pdf-tools\u003e\n\n## About\n\nThis Docker image provides a lightweight environment for working with PDF files. It includes:\n\n- **Alpine Linux:** A minimal and secure Linux distribution. [Official Website](https://alpinelinux.org/)\n- **qpdf:** A command-line tool for structural, content-preserving transformations on PDF files. [Official Website](https://qpdf.sourceforge.io/)\n- **Ghostscript:** An interpreter for the PostScript language and for PDF. [Official Website](https://ghostscript.com/)\n- **Node.js:** A JavaScript runtime environment. [Official Website](https://nodejs.org/)\n\n## Building the Image Manually\n\nYou can build the Docker image manually using the following command:\n\n```bash\ndocker build --target node-latest -t alpine-pdf-tools .\n```\n\nTo specify the Node.js, qpdf, and Ghostscript versions, use build arguments:\n\n```bash\ndocker build \\\n  --build-arg NODE_VERSION=18 \\\n  --build-arg QPDF_VERSION=11.6.2 \\\n  --build-arg GHOSTSCRIPT_VERSION=10.02.1 \\\n  -t alpine-pdf-tools .\n```\n\nTo use the latest versions, 'latest' to the arguments.\n\n```bash\ndocker build \\\n  --build-arg NODE_VERSION=18 \\\n  --build-arg QPDF_VERSION=latest \\\n  --build-arg GHOSTSCRIPT_VERSION=10.02.1 \\\n  -t alpine-pdf-tools .\n```\n\nWhen use `NODE_VERSION=latest` or not set the argument, add the `--target node-latest` argument.\n\n```bash\ndocker build \\\n  --target node-latest \\\n  --build-arg NODE_VERSION=latest \\\n  --build-arg QPDF_VERSION=11.6.2 \\\n  --build-arg GHOSTSCRIPT_VERSION=10.02.1 \\\n  -t alpine-pdf-tools .\n```\n\n## Running the Container\n\nAfter building the image, you can run a container using:\n\n```bash\ndocker run -it alpine-pdf-tools\n```\n\nThis will start a container, run the CMD, and show the versions of the installed tools.\n\nTo run \u0026 login to the container, while sharing a previously crated docker volume, use:\n\n```base\ndocker run --rm -it -v alpine-pdf-tools-volume:/data alpine-pdf-tools sh\n```\n\n## GitHub Actions\n\nThis repository includes a GitHub Actions workflow (`.github/workflows/docker-image.yml`) that automatically builds and pushes the Docker image to Docker Hub on pushes to the `main` branch.  The workflow requires the `DOCKERHUB_USERNAME` and `DOCKERHUB_PASSWORD` secrets to be configured in the repository settings.\n\n## PDF Tools Example CMDs\n\n### QPDF\n\n```bash\nqpdf --linearize --remove-info --remove-metadata --flatten-annotations=all --optimize-images --empty --pages input.pdf -- output-qpdf.pdf\n```\n\n### Ghostscript\n\n```bash\ngs -q -dNOPAUSE -dBATCH -dSAFER \\\n       -sDEVICE=pdfwrite \\\n       -dCompatibilityLevel=1.7 \\\n       -dColorImageDownsampleType=/Bicubic \\\n       -dColorImageResolution=72 \\\n       -dColorImageDownsampleThreshold=1.5 \\\n       -dGrayImageDownsampleType=/Bicubic \\\n       -dGrayImageResolution=72 \\\n       -dGrayImageDownsampleThreshold=1.5 \\\n       -dMonoImageDownsampleType=/Subsample \\\n       -sOutputFile=\"output-gs.pdf\" \\\n       \"input.pdf\"\n```\n\nNote: read libs' official documentation for more info.\n\n## Tags\n\npdf, alpine, qpdf, ghostscript, docker, docker image, node, nodejs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazuyakuza%2Falpine-pdf-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkazuyakuza%2Falpine-pdf-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazuyakuza%2Falpine-pdf-tools/lists"}