Sunday, 1 October 2023

paragraphbprder itext7

Paragraph signedByHeader = new Paragraph("Signed By")
                .setFontColor(new DeviceRgb(0, 0, 0)) // Text color
                .setFontSize(10f) // Font size
                .setBold()
                .setItalic();

        signedByHeader.getAccessibilityProperties().setRole("H3");

        // Create a Div element to encompass the paragraph and set the border on the Div
        Div signedDiv = new Div()
                .add(signedByHeader)
                .setWidth(UnitValue.createPointValue(fullWidth[0])) // Set the width of the Div
                .setBorder(new SolidBorder(new DeviceRgb(0,0,0), 2f))
                .setMarginTop(50f); // Solid border