Skip to content

Commit e114c8c

Browse files
committed
Fetch justifation of formfield from parent
DEVSIX-1909
1 parent bc7a544 commit e114c8c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

forms/src/main/java/com/itextpdf/forms/fields/PdfFormField.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,11 @@ public PdfFormField setDefaultAppearance(String defaultAppearance) {
15321532
* @return the current justification attribute
15331533
*/
15341534
public Integer getJustification() {
1535-
return getPdfObject().getAsInt(PdfName.Q);
1535+
Integer justification = getPdfObject().getAsInt(PdfName.Q);
1536+
if (justification == null && getParent() != null) {
1537+
justification = getParent().getAsInt(PdfName.Q);
1538+
}
1539+
return justification;
15361540
}
15371541

15381542
/**

0 commit comments

Comments
 (0)