From 8e2fa5d6bb07ce9800f019e1c1e996c552c83a70 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Thu, 23 Oct 2014 08:54:28 +0200
Subject: [PATCH] OO-1270: the first x must be pushed with the calculated size
 of the first column

---
 .../java/org/olat/course/nodes/cl/ui/CheckboxPDFExport.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/olat/course/nodes/cl/ui/CheckboxPDFExport.java b/src/main/java/org/olat/course/nodes/cl/ui/CheckboxPDFExport.java
index b3e192f181f..5f329558748 100644
--- a/src/main/java/org/olat/course/nodes/cl/ui/CheckboxPDFExport.java
+++ b/src/main/java/org/olat/course/nodes/cl/ui/CheckboxPDFExport.java
@@ -257,7 +257,8 @@ public class CheckboxPDFExport extends PdfDocument implements MediaResource {
     	return headers;
 	}
     
-	public int drawTable(String[] headers, String[][] content, int offset, float maxHeaderSize, float nameMaxSize, float fontSize, float cellMargin)
+	public int drawTable(String[] headers, String[][] content, int offset,
+			float maxHeaderSize, float nameMaxSize, float fontSize, float cellMargin)
 	throws IOException {
 	
 		float tableWidth = width;
@@ -324,6 +325,7 @@ public class CheckboxPDFExport extends PdfDocument implements MediaResource {
 
 		currentY -= headerHeight;
 
+		//draw the content
 		textx = marginLeftRight + cellMargin;
 		texty = currentY - 15;
 		for (int i=offset; i<end; i++) {
@@ -339,7 +341,7 @@ public class CheckboxPDFExport extends PdfDocument implements MediaResource {
 					currentContentStream.drawString(text);
 					currentContentStream.endText();
 				}
-				textx += (j==0 ? 100 : colWidth);
+				textx += (j==0 ? nameMaxSize : colWidth);
 			}
 			texty -= rowHeight;
 			textx = marginLeftRight + cellMargin;
-- 
GitLab