com.atomicleopard:thundr-contrib-docraptor

A parent pom for thundr projects for common project setup

License

License

GroupId

GroupId

com.atomicleopard
ArtifactId

ArtifactId

thundr-contrib-docraptor
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

A parent pom for thundr projects for common project setup
Project Organization

Project Organization

Atomic Leopard
Source Code Management

Source Code Management

https://github.com/atomicleopard/thundr-contrib-docraptor

Download thundr-contrib-docraptor

How to add to project

<!-- https://jarcasting.com/artifacts/com.atomicleopard/thundr-contrib-docraptor/ -->
<dependency>
    <groupId>com.atomicleopard</groupId>
    <artifactId>thundr-contrib-docraptor</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.atomicleopard/thundr-contrib-docraptor/
implementation 'com.atomicleopard:thundr-contrib-docraptor:1.0.0'
// https://jarcasting.com/artifacts/com.atomicleopard/thundr-contrib-docraptor/
implementation ("com.atomicleopard:thundr-contrib-docraptor:1.0.0")
'com.atomicleopard:thundr-contrib-docraptor:jar:1.0.0'
<dependency org="com.atomicleopard" name="thundr-contrib-docraptor" rev="1.0.0">
  <artifact name="thundr-contrib-docraptor" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.atomicleopard', module='thundr-contrib-docraptor', version='1.0.0')
)
libraryDependencies += "com.atomicleopard" % "thundr-contrib-docraptor" % "1.0.0"
[com.atomicleopard/thundr-contrib-docraptor "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
com.threewks.thundr : thundr-http jar 2.0.0

test (4)

Group / Artifact Type Version
javax.servlet : servlet-api jar 2.5
junit : junit jar 4.11
org.hamcrest : hamcrest-all jar 1.3
org.mockito : mockito-all jar 1.9.5

Project Modules

There are no modules declared in this project.

thundr-contrib-docraptor Build Status

A thundr module for rendering documents using Docraptor.

You can read more about thundr here

Include the thundr-contrib-docraptor dependency using maven or your favourite dependency management tool.

<dependency>
	<groupId>com.atomicleopard</groupId>
	<artifactId>thundr-contrib-docraptor</artifactId>
	<version>1.0.0</version>
	<scope>compile</scope>
</dependency>

Include your docraptor api key in application.properties

docraptorApiKey=YOUR_KEY_HERE

Add a dependency on the docraptor module in your ApplicationModule file:

@Override
public void requires(DependencyRegistry dependencyRegistry) {
	super.requires(dependencyRegistry);
	...
	dependencyRegistry.addDependency(DocraptorModule.class);
}

The Docraptor interface will then be available for injection into services and controllers. Draw a PDF by making a render call passing in a DocraptorRequest with the appropriate fields.

private Docraptor docraptor;
...
DocraptorRequest request = DocraptorRequest.ForUrl("filename.pdf", absoluteUrl)
										   .withJavascript(true)
										   .withTestMode(testMode);
byte[] pdfData = docraptor.render(request);

thundr-contrib-docraptor - Copyright (C) 2015 Atomic Leopard

Versions

Version
1.0.0