Skip to content
/ pdfgen Public
forked from navikt/pdfgen

Simple application for generating PDFs

License

Notifications You must be signed in to change notification settings

dijjal/pdfgen

 
 

Repository files navigation

PdfGen

CircleCI

Repository for PdfGen, an application written in Kotlin used to create PDFs

Technologies & Tools

  • Kotlin
  • Gradle
  • Ktor
  • JUnit
  • Handlebars

Getting started

Build and run tests

./gradlew shadowJar

Running the application locally enables a GET endpoint at /api/v1/genpdf/<application>/<template> which looks for test data at data/<application>/<template>.json and outputs a PDF to your browser. Additionally, the template folder will be fetched on every request, and reflect any changes made since the last GET, 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

For NAV employees

We are also available on the slack channel #integrasjon for internal communication.

About

Simple application for generating PDFs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 69.1%
  • Kotlin 30.1%
  • Other 0.8%