-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update license, readme, and codeowners
- Loading branch information
Showing
5 changed files
with
47 additions
and
44 deletions.
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
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
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,2 +1,2 @@ | ||
* @navikt/integrasjon | ||
* @navikt/digisyfo | ||
# benevolent dictator until further notice? :) | ||
* @chinatsu |
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
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,8 +1,8 @@ | ||
# PdfGen | ||
# pdfgen | ||
|
||
 | ||
|
||
Repository for PdfGen, an application written in Kotlin used to create PDFs | ||
Repository for `pdfgen`, an application written in Kotlin used to create PDFs | ||
|
||
## Technologies & Tools | ||
|
||
|
@@ -11,8 +11,40 @@ Repository for PdfGen, an application written in Kotlin used to create PDFs | |
* Ktor | ||
* Spek | ||
* Handlebars | ||
* VeraPDF-validation | ||
|
||
## Getting started | ||
|
||
Most commonly, pdfgen is used as a base image alongside templates, fonts, additional resources, and potential test data to verify that valid PDFs get produced by the aforementioned templates. | ||
|
||
In your own repository, create a Dockerfile with the following contents | ||
|
||
```dockerfile | ||
# Dockerfile | ||
FROM ghcr.io/navikt/pdfgen/pdfgen:a155cdaac6fcfebe60f1a2b012c1943b5b8f7bc0 | ||
|
||
COPY templates /app/templates # handlebars templates | ||
COPY fonts /app/fonts # fonts to be embedded | ||
COPY resources /app/resources # additional resources | ||
``` | ||
|
||
Set up the basic folder structure | ||
```bash | ||
mkdir {templates,fonts,resources,data} | ||
``` | ||
|
||
Create subfolders in `templates` and `data` | ||
```bash | ||
mkdir {templates,data}/your_teamname # your_teamname can be anything, but it'll be a necessary part of the API later | ||
``` | ||
|
||
* `templates/your_teamname/` should then be populated with your .hbs-templates. the names of these templates will also decide parts of the API paths | ||
* `data/your_teamname/` should be populated with json files with names corresponding to a target .hbs-template, this can be used to test your PDFs during development of templates. | ||
|
||
[navikt/flex-sykepengesoknad-pdfgen](https://github.com/navikt/flex-sykepengesoknad-pdfgen) is a good example of how such a project can be set up. | ||
|
||
## Developing pdfgen | ||
|
||
### Build and run tests | ||
`./gradlew shadowJar` | ||
|
||
|
@@ -23,19 +55,10 @@ making this ideal for developing new templates for your application. | |
|
||
The template and data directory structure both follow the `<application>/<template>` structure. | ||
|
||
### Notes on developing templates on Windows | ||
It is a known issue that pdfgen's output documents look different depending on whether the template | ||
has `\r\n` or `\n` as line endings. Therefore, it is strongly recommended to configure Git to not convert newlines, as well as ensure that your editor ends its lines with LF (`\n`) and not CRLF (`\r\n`), as the former will accurately show what your | ||
templates will look like in production. | ||
|
||
## Contact us | ||
### Code/project related questions can be sent to | ||
* Kent Daleng, `[email protected]` | ||
* Kevin Sillerud, `[email protected]` | ||
* Andreas Nilsen, `[email protected]` | ||
* Sebastian Knudsen, `[email protected]` | ||
* Tia Firing, `[email protected]` | ||
* Jonas Henie, `[email protected]` | ||
* Mathias Hellevang, `[email protected]` | ||
|
||
|
||
### For NAV employees | ||
We are also available on the slack channel #integrasjon or #team-sykmelding for internal communication. | ||
We are also available on the slack channel #pdfgen for internal communication. |