mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-13 10:52:15 +01:00
docs: more succint [skip ci]
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
# Adding PDF Engine Features
|
||||
|
||||
Each new PDF engine capability (e.g., bookmarks, watermark, stamp, embed) requires a matching Makefile entry. The Makefile variables control which engines are passed to Gotenberg at `make run` and `make test-integration` time (via `compose.yaml`). If you skip this step, the flag still works when set manually, but `make run` falls back to the default defined in `pdfengines.go`, which may not include the new engine.
|
||||
Each new PDF engine capability (bookmarks, watermark, stamp, embed, etc.) requires a matching Makefile entry. The Makefile variables control which engines are passed to Gotenberg at `make run` and `make test-integration` time via `compose.yaml`. Skip this step and `make run` falls back to the default defined in `pdfengines.go`, which may not include the new engine.
|
||||
|
||||
Every `--pdfengines-*-engines` flag registered in `pkg/modules/pdfengines/pdfengines.go` must have a corresponding variable and flag in the Makefile:
|
||||
Every `--pdfengines-*-engines` flag registered in `pdfengines.go` needs two additions:
|
||||
|
||||
1. A variable in the Makefile's variable block (around line 60-70):
|
||||
|
||||
1. **Add a variable** in the Makefile's variable block (around line 60 to 70):
|
||||
```makefile
|
||||
PDFENGINES_<FEATURE>_ENGINES=<default engines>
|
||||
```
|
||||
2. **Add the flag** in `compose.yaml`'s command args:
|
||||
|
||||
2. A flag in `compose.yaml`'s command args:
|
||||
|
||||
```yaml
|
||||
- "--pdfengines-<feature>-engines=${PDFENGINES_<FEATURE>_ENGINES}"
|
||||
```
|
||||
@@ -17,7 +20,7 @@ The default value must match the `fs.StringSlice(...)` call for that flag in `pd
|
||||
|
||||
## Example: Rotate
|
||||
|
||||
The rotate feature was added with two engines (`pdfcpu` and `pdftk`). Here is what the additions look like:
|
||||
Rotate was added with two engines (`pdfcpu` and `pdftk`):
|
||||
|
||||
**Makefile** (variable block):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user