}
- //calculate how much text goes in the column
- float text_widthCM = contentAreaWidthCM-(img_width*pixelWidthCM);
+ //calculate how much text goes in the column(use 8 pixels to pad the column)
+ float text_widthCM = contentAreaWidthCM-((img_width+8)*pixelWidthCM);
float number_of_lines = img_height*pixelWidthCM/lineHeightCM; //don't worry we will make it an int
- int text_amount= (new Float((text_widthCM/characterWidthCM)*number_of_lines)).intValue();
+ //add one line for image description
+ int text_amount= (new Float((text_widthCM/characterWidthCM)*(number_of_lines+1))).intValue();
row1.put("text_widthCM",Float.toString(text_widthCM));
-
-
+
+ row1.put("img_title",currentImage.getValue("title"));
row1.put("img_width",Float.toString(img_width));
row1.put("img_height",Float.toString(img_height));
aLogger.println("img_width " +Float.toString(img_width));
aLogger.println("img_height "+Float.toString(img_height));
- row1.put("img_src",currentImage.getValue("source"));
+ row1.put("img_src",currentImage.getValue("publish_path"));
row1.put("hasImage","1");
if (! outOfText){
try {