Make your PDF compliant with press-ready PDF/X-1a.
Pull vibranthq/press-ready
image from Docker Hub.
docker pull vibranthq/press-ready
then assign an alias for press-ready
:
alias press-ready="docker run --rm -it -v \$PWD:/workdir vibranthq/press-ready"
npm install -g press-ready # npm
yarn global add press-ready # yarn
and install system dependencies to run press-ready
.
brew install poppler ghostscript
apt-get install poppler-utils ghostscript
Download and install the Ghostscript for Windows at https://www.ghostscript.com/download/gsdnld.html. Then, add the installed Ghostscript's bin directory (e.g., "C:\Program Files\gs\gs9.52\bin") to the PATH environment variable.
Download and install the Xpdf command line tools for Windows at http://www.xpdfreader.com/download.html. Then, add the installed Xpdf's bin directory (e.g., "C:\xpdf-tools-win-4.02\bin64") to the PATH environment variable.
Run press-ready
with -i, --input
. If -o, --output
is missing, output.pdf
going to be used for default output path.
press-ready build -i <input.pdf> -o <output.pdf>
Run with --help
for the help.
❯ press-ready --help
press-ready <command>
Commands:
press-ready build build PDF
press-ready lint <input> lint PDF
Options:
--version Show version number [boolean]
--help Show help [boolean]
Press-ready will use CMYK by default. Give --gray-scale
option to let them use Grayscale instead.
pres-ready build \
--input ./input.pdf \
--output ./output.pdf \
--gray-scale
Option --boundary-boxes
will build TrimBox, CropBox and BleedBox on a generated PDF.
press-ready build \
--input ./input.pdf \
--output ./output.pdf \
--boundary-boxes
You might not want to use this option since press-ready automatically guess whether embedded fonts should be outlined.
However, you can still control this behavior by passing --enforce-outline
or --no-enforce-outline
.
press-ready bulid \
--input ./input.pdf \
--output ./output.pdf \
--enforce-outline
Currently, there is only support for Japan 2001 Coated. If you have any suggestions, please consider submitting an issue.
press-ready lint ./input.pdf
press-ready lint
command produces lint result on specified PDF.
==> Linting metadata for './cli/test/fixture/review.pdf'
==> Title Re:VIEWテンプレート
==> Page No. 8
==> PDF version 1.5
==> TrimBox 48.19,66.61,467.72,661.89
==> BleedBox 39.68,58.11,476.22,670.39
==> Listing fonts
name type embedded subset
ORFHCM+NimbusSanL-Regu Type 1C yes yes
JCEWND+NimbusSanL-Bold Type 1C yes yes
ASNLWJ+NotoSansCJKjp-Bold-Identity-H CID Type 0C yes yes
HPDDST+LMRoman9-Regular Type 1C yes yes
RJMBNU+NotoSerifCJKjp-Regular-Identity-H CID Type 0C yes yes
==> Every font is properly embedded or no fonts embedded
! This feature is not yet available in press-ready v2. If you need this feature, use press-ready v1 (
vibranthq/pdfx
) image instead.
Just run with S3 URL: docker run -t vibranthq/press-ready <input s3url> <output s3url>
.
For fetching and uploading AWS S3 resources, you need to set env var AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
.
docker run --rm -it \
-e AWS_ACCESS_KEY_ID=<aws_key_id> \
-e AWS_SECRET_ACCESS_KEY=<aws_secret> \
vibranthq/pdfx s3://bucket/input.pdf s3://bucket/output.pdf
To run press-ready
on Heroku, make sure you add heroku-buildpack-xpdf.
PRs are welcome. Make sure to do make test
before filing pull requests.
make build
make test
Thanks goes to these wonderful people (emoji key):
Yasuaki Uechi 💻 📖 |
Kenshi Muto 💻 |
Shinyu Murakami 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!