diff --git a/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfUtils.java b/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfUtils.java index 790bcc019cbe7b9903704d11e9965e6966917564..c78f67f467f1162bca1ec8d986664207421a030f 100644 --- a/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfUtils.java +++ b/CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfUtils.java @@ -80,10 +80,12 @@ public class PdfUtils { val2Rect.setAttribute("height", "30"); Element val2Text = new Element("text", svgNs); svgElement.addContent(val2Text); - val2Text.setAttribute("x", "" + (WIDTH - 30)); + String val2String = "" + val2; + val2Text.setAttribute("x", "" + (WIDTH - val2String.length() * 10)); val2Text.setAttribute("y", "20"); val2Text.setAttribute("font-size", "18pt"); - val2Text.addContent("" + val2); + + val2Text.addContent(val2String); } return svgElement;