You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-1Lines changed: 39 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,37 @@
2
2
3
3
This is a work in progress for a PDF generation micro-service.
4
4
5
-
## Getting started
5
+
## Getting started using this microservice in your project
6
+
7
+
If you use Docker Compose (hopefully with [`kool`](https://github.com/kool-dev/kool) to make things simpler) you can get PDF generation on your project with a few simple steps:
8
+
9
+
- Add the service to your `docker-compose.yml` file:
10
+
11
+
```yml
12
+
pdf:
13
+
image: "kooldev/pdf:latest"
14
+
expose:
15
+
- 3000
16
+
```
17
+
18
+
- After starting the service containers (with either `kool start` or `docker-compose up -d`), you can already start using the microservice to make PDFs! Example using PHP:
19
+
20
+
```php
21
+
use GuzzleHttp\Client;
22
+
23
+
$pdf = (new Client())->post('http://pdf/from-html', [
24
+
'form_params' => [
25
+
'html' => '<h1>This is my super kool HTML that I want to turn into an awesome PDF file!</h1> <p> This is a very silly example, but you get the idea of how powerful this is <b>:)</b> </p>',
* Important to notice, the code above assumes you are running it from within another container in the same Docker Compose application so the `pdf` domain resolves to our microservice.
33
+
34
+
## Getting started on developing locally this microservice
35
+
6
36
To get started with development locally (using [`kool`](https://github.com/kool-dev/kool), of course!):
7
37
8
38
- Fork the repo.
@@ -13,6 +43,14 @@ To get started with development locally (using [`kool`](https://github.com/kool-
13
43
14
44
In order to manage dependencies and run commands, please remind of using `kool run yarn` to stick with one single yarn version.
15
45
46
+
## Roadmap
47
+
48
+
Soon to be added wishes:
49
+
50
+
- Parameters to better control Javascript execution/wait condition.
51
+
- Conversion to images also.
52
+
- Got some _kool_ feature you are not seeing? Please open a ticket to suggest it!
53
+
16
54
## API
17
55
18
56
The API will provide endpoints for generating PDFs on the fly and returning them right away.
0 commit comments