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
as a command.
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 xpdf ghostscript
Run press-ready
with --input
. If --output
is missing, output.pdf
going to be used for default output path.
press-ready --input <input.pdf> --output <output.pdf>
Run with --help
for the help.
β press-ready --help
Options:
--version Show version number [boolean]
--input Input file path [required]
--output Output file path [default: "./output.pdf"]
--gray-scale Use gray scale color space instead of CMYK
[boolean] [default: false]
--enforce-outline Convert embedded fonts to outlined fonts [boolean]
--boundary-boxes Add boundary boxes on every page [boolean] [default: false]
--help Show help [boolean]
Press-ready will use CMYK by default. Give --gray-scale
option to let them use Grayscale instead.
pres-ready
--input ./input.pdf \
--output ./output.pdf \
--gray-scale
Option --boundary-boxes
will build TrimBox, CropBox and BleedBox on a generated PDF.
press-ready \
--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 \
--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 ./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 π» |
This project follows the all-contributors specification. Contributions of any kind welcome!