Skip to content

Commit 8802829

Browse files
committed
Rename PdfAcroForm#flatFields to PdfAcroForm#flattenFields
1 parent 58afb62 commit 8802829

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

forms/src/main/java/com/itextpdf/forms/PdfAcroForm.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ public PdfFormField getField(String fieldName) {
513513
}
514514

515515
/**
516-
* Gets the attribute generateAppearance, which tells {@link #flatFields()}
516+
* Gets the attribute generateAppearance, which tells {@link #flattenFields()}
517517
* to generate an appearance Stream for all {@link PdfFormField form field}s
518518
* that don't have one.
519519
*
@@ -524,7 +524,7 @@ public boolean isGenerateAppearance() {
524524
}
525525

526526
/**
527-
* Sets the attribute generateAppearance, which tells {@link #flatFields()}
527+
* Sets the attribute generateAppearance, which tells {@link #flattenFields()}
528528
* to generate an appearance Stream for all {@link PdfFormField form field}s
529529
* that don't have one.
530530
*
@@ -551,7 +551,7 @@ public void setGenerateAppearance(boolean generateAppearance) {
551551
* then all fields are flattened. Otherwise only the included fields are
552552
* flattened.
553553
*/
554-
public void flatFields() {
554+
public void flattenFields() {
555555
if (document.isAppendMode()) {
556556
throw new PdfException(PdfException.FieldFlatteningIsNotSupportedInAppendMode);
557557
}

forms/src/test/java/com/itextpdf/forms/FormFieldFlatteningTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void formFlatteningTest01() throws IOException, InterruptedException {
3535
PdfDocument doc = new PdfDocument(new PdfReader(new FileInputStream(srcFilename)), new PdfWriter(new FileOutputStream(filename)));
3636

3737
PdfAcroForm form = PdfAcroForm.getAcroForm(doc, true);
38-
form.flatFields();
38+
form.flattenFields();
3939

4040
doc.close();
4141

0 commit comments

Comments
 (0)