added basic imageContent support

This commit is contained in:
jomu
2016-06-07 11:54:37 +00:00
parent 90ef289d50
commit d33ff848cf
8 changed files with 88 additions and 26 deletions

View File

@ -28,12 +28,15 @@ public class PDFDocumentTest {
doc.addFont("helv12", new Font("Helvetica", 12, 2));
doc.setPaperSize(PaperSize.A4);
TextContent addressContent = new TextContent(doc, 40, 692, "Max Mustermann")
TextContent addressContent = new TextContent(doc, 40F, 692F, "Max Mustermann")
.addLine("Musterstraße 123")
.addLine("12345 Musterhausen");
doc.addContent(addressContent);
ImageContent logoContent = new ImageContent (doc, 400F,700F, 0.6F);
doc.addContent (logoContent);
TextContent informationContent = new TextContent(doc, 400, 662);
TextContent informationContent = new TextContent(doc, 400F, 662F);
informationContent.addLine("Anzeigenabrechnung", "bold");
informationContent.addLine("Veronika Mühlencord", "helv12");
informationContent.addLine("Telefon: 05257/940154", "helv12");
@ -51,7 +54,7 @@ public class PDFDocumentTest {
informationContent2.addLine("Rechnungsdatum:", "${invoiceDate?date}");
doc.addContent(informationContent2);
TextContent invoiceInfoInformation = new TextContent(doc, 40, 442, "Sehr geehrter Anzeigenkunde, ")
TextContent invoiceInfoInformation = new TextContent(doc, 40F, 442F, "Sehr geehrter Anzeigenkunde, ")
.addLine()
.addLine()
.addLine("Wir danken für den Auftrag und bitten um Erledigung der folgenden Anzeigenabrechnung")