Skip to content

Commit

Permalink
init pdf export demo (#11)
Browse files Browse the repository at this point in the history
* init pdf export demo

* Update pdf-export/README.md

Co-authored-by: Jeremie <[email protected]>

* fix

* doc

* doc

* fix missing logo

---------

Co-authored-by: Jeremie <[email protected]>
  • Loading branch information
samuelmartineau and JeremieDoctrine authored Aug 31, 2023
1 parent d0e6cdb commit 48e50a3
Show file tree
Hide file tree
Showing 11 changed files with 7,005 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ typings/

# next.js build output
.next

dist
Binary file added pdf-export/.DS_Store
Binary file not shown.
45 changes: 45 additions & 0 deletions pdf-export/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# PDF Export x Doctrine

## Demo

start the server

```sh
npm run serve
``````

You can find the 4 versions of the PDF export we had at Doctrine

### html2pdf
[code here](static/html2pdf.html)

Visit [http://localhost:8080/html2pdf.html](http://localhost:8080/html2pdf.html)

### phantomjs

run this command and check out the generated pdf in the dist folder

```sh
node phantomjs.mjs
```
[code here](phantomjs.mjs)

### wkhtmltopdf

run this command and check out the generated pdf in the dist folder

```sh
node wkhtmltopdf.mjs
```

[code here](wkhtmltopdf.mjs)
### puppeteer
The last and still used in production solution

run this command and check out the generated pdf in the dist folder

```sh
node puppeteer.mjs
```

[code here](puppeteer.mjs)
Loading

0 comments on commit 48e50a3

Please sign in to comment.