Merge pull request #81 from Kitzanos/fixed-pdf-issue
Fixed PDF Textbox Content Visibility Issue
This commit is contained in:
@@ -230,10 +230,10 @@ public class PdfDao {
|
||||
|
||||
// PdfPCell valueCell = new PdfPCell(new Phrase(item, valueFont));
|
||||
PdfPCell valueCell = PdfUtils.htmlToPdfPCell(item, valueFont);
|
||||
valueCell.setFixedHeight(30f); // Set a fixed height for the cell
|
||||
valueCell.setPaddingLeft(10f); // Adjust left padding as needed
|
||||
valueCell.setPaddingTop(0f); // Remove padding from top to allow vertical centering
|
||||
valueCell.setPaddingBottom(6f);
|
||||
valueCell.setMinimumHeight(30f); // Set a fixed height for the cell
|
||||
valueCell.setPaddingLeft(leftMargin); // Increase left margin for value
|
||||
valueCell.setBorder(Rectangle.NO_BORDER); // Remove border for value cell
|
||||
valueCell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
||||
@@ -306,7 +306,7 @@ public class PdfDao {
|
||||
}
|
||||
// PdfPCell valueCell = new PdfPCell(new Phrase(fieldValue1, valueFont));
|
||||
PdfPCell valueCell = PdfUtils.htmlToPdfPCell(fieldValue1, valueFont);
|
||||
valueCell.setFixedHeight(30f); // Set a fixed height for the cell
|
||||
valueCell.setMinimumHeight(30f); // Set a fixed height for the cell
|
||||
valueCell.setPaddingLeft(10f); // Adjust left padding as needed
|
||||
valueCell.setPaddingTop(0f); // Remove padding from top to allow vertical centering
|
||||
valueCell.setPaddingBottom(6f);
|
||||
@@ -393,7 +393,7 @@ public class PdfDao {
|
||||
headerCell.setHorizontalAlignment(Element.ALIGN_CENTER); // Center align
|
||||
headerCell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
||||
headerCell.setBackgroundColor(new BaseColor(178, 190, 181)); // Light gray background for header
|
||||
headerCell.setFixedHeight(30f); // Set a fixed height for the cell
|
||||
headerCell.setMinimumHeight(30f); // Set a fixed height for the cell
|
||||
headerCell.setPaddingLeft(10f); // Adjust left padding as needed
|
||||
headerCell.setPaddingTop(0f); // Remove padding from top to allow vertical centering
|
||||
headerCell.setPaddingBottom(6f);
|
||||
@@ -415,6 +415,7 @@ public class PdfDao {
|
||||
// PdfPCell dataCell = new PdfPCell(new Phrase(fieldValue != null ?fieldValue: "", textFont));
|
||||
PdfPCell dataCell = PdfUtils.htmlToPdfPCell(fieldValue != null ? fieldValue : "", textFont);
|
||||
dataCell.setBackgroundColor(new BaseColor(239, 243, 248)); // Light blue for the cell
|
||||
dataCell.setMinimumHeight(30f);
|
||||
dataCell.setPaddingLeft(10f); // Adjust left padding as needed
|
||||
dataCell.setPaddingTop(0f); // Remove padding from top to allow vertical centering
|
||||
dataCell.setPaddingBottom(6f);
|
||||
|
||||
Reference in New Issue
Block a user