forked from txn2/txpdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# ide | ||
.idea | ||
.DS_Store | ||
|
||
# output | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
 | ||
|
||
[](https://microbadger.com/images/txn2/txpdf "n2pdf") | ||
|
||
# txPDF | ||
|
||
txPDF is an HTML to PDF microservice by [txn2] | ||
|
||
## Docker Use | ||
|
||
Run the [txPDF Docker container] on your local workstation for testing. Forward port **8080** or any free port to txPDFs default service port **8080** on the container. | ||
|
||
```bash | ||
docker run --rm -p 8080:8080 -e DEBUG=true txn2/txpdf | ||
``` | ||
|
||
[txPDF] can be configured with the following environment variables: | ||
|
||
| Variable | Default | Purpose | | ||
| -------- | ------- | ------- | | ||
| PORT | 8080 | Server listen port | | ||
| DEBUG | false | Verbose logging | | ||
| BASE_PATH | | Base path for routes. Prepends onto web service routes **BASE_PATH**/getPdf and **BASE_PATH**/status | | ||
| TOC_XSL | | Path to XSL transformation script for Table of Contents (example **./toc.xsl**. Container holds a default **./toc.xsl** | | ||
|
||
## Test | ||
|
||
```bash | ||
curl -d "@examples/multi-site.json" -X POST http://localhost:8080/getPdf --output test.pdf | ||
``` | ||
|
||
[txn2]:https://github.com/txn2 | ||
[txPDF]:https://github.com/txn2/txpdf | ||
[txn2]:https://github.com/txn2 | ||
[txPDF Docker container]:https://hub.docker.com/r/txn2/txpdf/ |