Added image downsampling/compression
All checks were successful
Build PDF / make pdf (push) Successful in 6m1s
All checks were successful
Build PDF / make pdf (push) Successful in 6m1s
This commit is contained in:
7
Makefile
7
Makefile
@@ -27,6 +27,8 @@ serve: deps
|
||||
|
||||
PDF := $(OUT_DIR)/output.pdf
|
||||
PDF_2UP := $(OUT_DIR)/output-2up.pdf
|
||||
PDF_IMAGE_DPI ?= 144
|
||||
PDF_JPEG_QUALITY ?= 75
|
||||
|
||||
.PHONY: deps
|
||||
deps:
|
||||
@@ -35,13 +37,12 @@ deps:
|
||||
.PHONY: pdf
|
||||
pdf: build deps
|
||||
@echo "Generating PDF by rendering each page and merging..."
|
||||
@$(GO) run ./cmd/pdfbook --pages $(OUT_DIR) --order pages.yaml --out $(PDF)
|
||||
@$(GO) run ./cmd/pdfbook --pages $(OUT_DIR) --order pages.yaml --out $(PDF) --image-dpi $(PDF_IMAGE_DPI) --jpeg-quality $(PDF_JPEG_QUALITY)
|
||||
|
||||
.PHONY: pdf-2up
|
||||
pdf-2up: build deps
|
||||
@echo "Generating 2-up PDF with headless Chrome..."
|
||||
@$(GO) run ./cmd/pdf --in $(OUT_DIR)/print_2up.html --out $(PDF_2UP) --w 11 --h 8.5
|
||||
@$(GO) run ./cmd/pdf --in $(OUT_DIR)/print_2up.html --out $(PDF_2UP) --w 11 --h 8.5 --image-dpi $(PDF_IMAGE_DPI) --jpeg-quality $(PDF_JPEG_QUALITY)
|
||||
|
||||
clean:
|
||||
rm -rf $(OUT_DIR) index.html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user