Skip to content

Commit

Permalink
Merge pull request #20 from Dyuko/Issue-18
Browse files Browse the repository at this point in the history
Actualiza dependencias
  • Loading branch information
alefq committed Sep 30, 2020
2 parents 431a882 + fd5ae68 commit 89c0fcf
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 21 deletions.
47 changes: 28 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>io.github.jokoframework</groupId>
<artifactId>joko-utils</artifactId>
<packaging>jar</packaging>
<version>0.6.2</version>
<version>0.6.3</version>
<name>joko-utils</name>
<url>http://maven.apache.org</url>

Expand All @@ -13,23 +13,25 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<commons-beanutils.version>1.9.3</commons-beanutils.version>
<commons-lang3.version>3.6</commons-lang3.version>
<commons-io.version>2.6</commons-io.version>
<joda-time.version>2.9.9</joda-time.version>
<pdfbox.version>2.0.16</pdfbox.version>
<orika-core.version>1.5.2</orika-core.version>
<dependency-check.version>5.2.0</dependency-check.version>
<junit.version>4.11</junit.version>
<spring-beans.version>5.1.6.RELEASE</spring-beans.version>
<commons-codec.version>1.11</commons-codec.version>
<boxable.version>1.5</boxable.version>
<poi-ooxml.version>4.1.0</poi-ooxml.version>
<opencsv.version>3.10</opencsv.version>
<spring-security-crypto.version>5.1.5.RELEASE</spring-security-crypto.version>
<slf4j-api.version>1.7.25</slf4j-api.version>
<guava.version>27.1-jre</guava.version>
<jaxb-api.version>2.3.1</jaxb-api.version>
<commons-beanutils.version>1.9.4</commons-beanutils.version>
<commons-lang3.version>3.11</commons-lang3.version>
<commons-io.version>2.8.0</commons-io.version>
<joda-time.version>2.10.6</joda-time.version>
<pdfbox.version>2.0.21</pdfbox.version>
<orika-core.version>1.5.4</orika-core.version>
<dependency-check.version>6.0.2</dependency-check.version>
<junit.version>4.13</junit.version>
<spring-beans.version>5.2.9.RELEASE</spring-beans.version>
<commons-codec.version>1.15</commons-codec.version>
<boxable.version>1.6</boxable.version>
<poi-ooxml.version>4.1.2</poi-ooxml.version>
<opencsv.version>5.2</opencsv.version>
<spring-security-crypto.version>5.4.0</spring-security-crypto.version>
<slf4j-api.version>1.7.30</slf4j-api.version>
<slf4j-simple.version>1.7.30</slf4j-simple.version>
<guava.version>29.0-jre</guava.version>
<jaxb-api.version>2.4.0-b180830.0359</jaxb-api.version>
<javax.xml.bind.version>2.4.0-b180830.0359</javax.xml.bind.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -126,6 +128,13 @@
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j-simple.version}</version>
</dependency>

<!-- Mapear DTO a Entities, y vice-versa -->
<dependency>
Expand All @@ -138,7 +147,7 @@
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<version>${javax.xml.bind.version}</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import be.quodlibet.boxable.BaseTable;
import be.quodlibet.boxable.datatable.DataTable;
import be.quodlibet.boxable.utils.PDStreamUtils;
import be.quodlibet.boxable.utils.PageContentStreamOptimized;
import io.github.jokoframework.utils.constants.JokoConstants;

public class PdfGenerator {
Expand Down Expand Up @@ -94,10 +95,11 @@ public static File fromList(List<List> data, String destination, String user) th

PDPageContentStream cos = new PDPageContentStream(doc, baseTable.getCurrentPage(),
PDPageContentStream.AppendMode.APPEND, true, true);
PDStreamUtils.write(cos, "Generated by " + user + " on " + dateFormat.format(date) + ". Total of records: "
PageContentStreamOptimized cosOptimized = new PageContentStreamOptimized(cos);
PDStreamUtils.write(cosOptimized, "Generated by " + user + " on " + dateFormat.format(date) + ". Total of records: "
+ total.toString(), font, titleFontSize, leftMargin, yPosition, Color.BLACK);

cos.close();
cosOptimized.close();

File result;
if (Objects.isNull(destination)) {
Expand Down

0 comments on commit 89c0fcf

Please sign in to comment.