Skip to content

Commit

Permalink
#788 restore compatibility with openpdf 1.3.11 and keep compatibility…
Browse files Browse the repository at this point in the history
… with itext 2.1.7
  • Loading branch information
evernat committed Oct 5, 2019
1 parent bf3dc2d commit 6532b4a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,17 @@ private void writeDetails(JavaInformations javaInformations)
final Image osImage = PdfDocumentFactory.getImage("servers/" + osIconName);
osImage.scalePercent(40);
osPhrase.add(new Chunk(osImage, 0, 0));
osPhrase.add(separator);
osPhrase.add(new Chunk(separator));
}
osPhrase.add(javaInformations.getOS() + " (" + javaInformations.getAvailableProcessors()
+ ' ' + getString("coeurs") + ')');
osPhrase.add(new Chunk(javaInformations.getOS() + " ("
+ javaInformations.getAvailableProcessors() + ' ' + getString("coeurs") + ')'));
currentTable.addCell(osPhrase);
addCell(getString("Java") + ':');
addCell(javaInformations.getJavaVersion());
addCell(getString("JVM") + ':');
final Phrase jvmVersionPhrase = new Phrase(javaInformations.getJvmVersion(), cellFont);
if (javaInformations.getJvmVersion().contains("Client")) {
jvmVersionPhrase.add(separator);
jvmVersionPhrase.add(new Chunk(separator));
final Image alertImage = PdfDocumentFactory.getImage("alert.png");
alertImage.scalePercent(50);
jvmVersionPhrase.add(new Chunk(alertImage, 0, -2));
Expand Down Expand Up @@ -220,9 +220,9 @@ private void writeServerInfo(String serverInfo) throws BadElementException, IOEx
.getImage("servers/" + applicationServerIconName);
applicationServerImage.scalePercent(40);
serverInfoPhrase.add(new Chunk(applicationServerImage, 0, 0));
serverInfoPhrase.add(" ");
serverInfoPhrase.add(new Chunk(" "));
}
serverInfoPhrase.add(serverInfo);
serverInfoPhrase.add(new Chunk(serverInfo));
currentTable.addCell(serverInfoPhrase);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ private void writeJndiBinding(JndiBinding jndiBinding) throws BadElementExceptio
final Image image = getFolderImage();
final Phrase phrase = new Phrase("", cellFont);
phrase.add(new Chunk(image, 0, 0));
phrase.add(" ");
phrase.add(name);
phrase.add(new Chunk(" " + name));
addCell(phrase);
} else {
addCell(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private void writeJobTimes(JobInformations jobInformations, CounterRequest count
final Image memoryImage = Image
.getInstance(Bar.toBar(100d * elapsedTime / counterRequest.getMean()), null);
memoryImage.scalePercent(47);
elapsedTimePhrase.add("\n");
elapsedTimePhrase.add(new Chunk("\n"));
elapsedTimePhrase.add(new Chunk(memoryImage, 0, 0));
addCell(elapsedTimePhrase);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ void toPdf() throws IOException, DocumentException {
meanSerializedSize = -1;
}
final Paragraph paragraph = new Paragraph("", cellFont);
paragraph.add(getFormattedString("nb_sessions", sessionsInformations.size()) + "\n\n"
+ getFormattedString("taille_moyenne_sessions", meanSerializedSize));
paragraph.add(new Chunk(getFormattedString("nb_sessions", sessionsInformations.size())
+ "\n\n" + getFormattedString("taille_moyenne_sessions", meanSerializedSize)));
paragraph.setAlignment(Element.ALIGN_RIGHT);
addToDocument(paragraph);
}
Expand Down

0 comments on commit 6532b4a

Please sign in to comment.