Updated code for pdf updation
This commit is contained in:
@@ -278,7 +278,7 @@ public class PdfDao {
|
||||
fieldValue1=Utils.formatDateString(String.valueOf(value));
|
||||
}
|
||||
if(Boolean.TRUE.equals(Utils.isItalianFormattedAmount(fieldValue)) ){
|
||||
fieldValue= String.valueOf(Utils.convertItalianAmountToDouble(fieldValue));
|
||||
fieldValue= String.valueOf(Utils.convertToItalianFormat(fieldValue));
|
||||
}
|
||||
PdfPCell valueCell = new PdfPCell(new Phrase(fieldValue1, valueFont));
|
||||
valueCell.setPadding(5f); // Increase padding for better spacing
|
||||
@@ -362,7 +362,6 @@ public class PdfDao {
|
||||
PdfPCell headerCell = new PdfPCell(new Phrase(headerValue)); // Create a new PdfPCell for the header
|
||||
headerCell.setHorizontalAlignment(Element.ALIGN_CENTER); // Center align
|
||||
headerCell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
||||
headerCell.setFixedHeight(rowHeight);
|
||||
headerCell.setBackgroundColor(new BaseColor(178, 190, 181)); // Light gray background for header
|
||||
|
||||
table.addCell(headerCell); // Add the header cell to the table
|
||||
@@ -378,7 +377,7 @@ public class PdfDao {
|
||||
Object value = row.getOrDefault(key, ""); // Fetch value or use empty string if key not present
|
||||
String fieldValue= (String) value;
|
||||
if(Boolean.TRUE.equals(Utils.isItalianFormattedAmount(fieldValue)) ){
|
||||
fieldValue= String.valueOf(Utils.convertItalianAmountToDouble(fieldValue));
|
||||
fieldValue= String.valueOf(Utils.convertToItalianFormat(fieldValue));
|
||||
}
|
||||
PdfPCell dataCell = new PdfPCell(new Phrase(fieldValue != null ?fieldValue: "", textFont));
|
||||
dataCell.setBackgroundColor(new BaseColor(239, 243, 248)); // Light blue for the cell
|
||||
@@ -498,7 +497,7 @@ public class PdfDao {
|
||||
}
|
||||
fieldValue = matchedLabels;
|
||||
}
|
||||
|
||||
|
||||
// Further processing of field value (e.g., finding labels in options)
|
||||
fieldValue = findLabelInOptions(content.getSettings(), fieldValue);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user