Giter Club home page Giter Club logo

rpe-pdf-service's Introduction

PDF service

codecov

This is a PDF service which allows to generate read-only PDFs based on given template in HTML/Twig format and placeholder data in JSON format. The service provides a single RESTful endpoint that merges both template and placeholder data together and returns the PDF as a binary stream.

The template, besides containing ordinary HTML markup, can also contain inline CSS styling and embedded images.

Getting started

Prerequisites

diagram

Building

The project uses Gradle as a build tool but you don't have to install it locally since there is a ./gradlew wrapper script.

To build project please execute the following command:

    ./gradlew build

Running

First you need to create distribution by executing following command:

    ./gradlew installDist

When the distribution has been created in build/install/pdf-service directory, you can run the application by executing following command:

    docker-compose up

As a result the following container(s) will get created and started:

  • long living container for API application exposing port 5500

API documentation

API documentation is provided with Swagger:

  • http://localhost:5500/swagger-ui.html - UI to interact with the API resources

NOTE: Swagger scans classes in the uk.gov.hmcts.reform.pdfservice.controllers package.

Consuming

There is a client library provided for java https://github.com/hmcts/cmc-pdf-service-client

Docker

Image is available in the HMCTS azure container registry (currently private) @ hmcts.azurecr.io/hmcts/rpe/pdf-service. See usage example in: docker-compose.yml

Non ASCII Characters Support

To render PDF with non ASCII characters, please use the 'Open Sans' font-family.

font-family: 'Open Sans';

Example:

<head>
   <style>
      html {
      font-family: 'Open Sans';
      }
   </style>
</head>

Developing

Unit tests

To run all unit tests please execute following command:

    ./gradlew test

Coding style tests

To run all checks (including unit tests) please execute following command:

    ./gradlew check

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Standard API

We follow RESTful API standards.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

rpe-pdf-service's People

Contributors

adusumillipraveen avatar banderous avatar constantinpr avatar cpareek avatar damiandunajski avatar dependabot-preview[bot] avatar dependabot[bot] avatar doncem avatar endakelly avatar hannah38 avatar ieuanb74 avatar jacmurphy avatar jordanhoey96 avatar jordankainos avatar karoljastrzebski avatar klawani avatar lgonczar avatar louisehuyton avatar luigibk avatar mokainos avatar msl8r avatar naikajah avatar renovate[bot] avatar rhollins avatar rkondratowicz avatar rlewan avatar ruban72 avatar timja avatar timwebster9 avatar tomkimber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

uk-gov-mirror

rpe-pdf-service's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency com.github.hmcts.java-logging:logging to v6.1.6
  • Update dependency org.apache.pdfbox:pdfbox to v2.0.32
  • Update org.apache.tomcat.embed:10.1.25 to v10.1.28 (org.apache.tomcat.embed:tomcat-embed-core, org.apache.tomcat.embed:tomcat-embed-websocket)
  • Update plugin au.com.dius.pact to v4.6.13
  • Update plugin io.spring.dependency-management to v1.1.6
  • Update dependency com.google.guava:guava to v33.3.0-jre
  • Update dependency gradle to v8.10
  • Update junit5 monorepo to v5.11.0 (org.junit.jupiter:junit-jupiter-api, org.junit.jupiter:junit-jupiter-engine, org.junit.vintage:junit-vintage-engine, org.junit.jupiter:junit-jupiter-params)
  • Update plugin org.sonarqube to v5.1.0.4882
  • Update dependency org.hamcrest:hamcrest to v3
  • Update plugin org.owasp.dependencycheck to v10
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • hmctspublic.azurecr.io/base/java 21-distroless
gradle
settings.gradle
build.gradle
  • io.spring.dependency-management 1.1.5
  • org.springframework.boot 3.2.0
  • org.owasp.dependencycheck 9.2.0
  • com.github.ben-manes.versions 0.51.0
  • se.patrikerdes.use-latest-versions 0.2.18
  • org.sonarqube 5.0.0.4638
  • au.com.dius.pact 4.6.10
  • checkstyle 10.17.0
  • org.yaml:snakeyaml 2.2
  • org.apache.tomcat.embed:tomcat-embed-websocket 10.1.25
  • org.apache.tomcat.embed:tomcat-embed-core 10.1.25
  • org.xhtmlrenderer:flying-saucer-pdf 9.3.1
  • pmd 6.55.0
  • com.google.guava:guava 33.2.1-jre
  • org.springdoc:springdoc-openapi-ui 1.8.0
  • com.github.hmcts.java-logging:logging 6.1.5
  • com.microsoft.azure:applicationinsights-web 3.4.18
  • org.apache.logging.log4j:log4j-api 2.22.0
  • org.apache.logging.log4j:log4j-to-slf4j 2.22.0
  • org.junit.jupiter:junit-jupiter-api 5.10.3
  • org.junit.jupiter:junit-jupiter-params 5.10.3
  • org.junit.jupiter:junit-jupiter-engine 5.10.3
  • org.apache.pdfbox:pdfbox 2.0.31
  • au.com.dius.pact.provider:junit5 4.3.15
  • au.com.dius.pact.provider:spring 4.3.15
  • au.com.dius.pact.provider:junit5spring 4.3.15
  • org.junit.jupiter:junit-jupiter-api 5.10.3
  • org.junit.jupiter:junit-jupiter-engine 5.10.3
  • org.junit.jupiter:junit-jupiter-api 5.10.3
  • org.junit.vintage:junit-vintage-engine 5.10.3
pdf-generator/build.gradle
  • com.google.guava:guava 33.2.1-jre
  • com.mitchellbosecke:pebble 2.4.0
  • org.assertj:assertj-core 3.24.2
  • org.hamcrest:hamcrest 2.2
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.8
helm-values
charts/rpe-pdf-service/values.yaml
helmv3
charts/rpe-pdf-service/Chart.yaml
  • java 5.2.1
terraform
infrastructure/main.tf
infrastructure/state.tf
  • azurerm ~> 3.109.0
infrastructure/versions.tf
  • hashicorp/terraform >= 0.13
terraform-version
infrastructure/.terraform-version
  • hashicorp/terraform 1.9.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.