diff options
author | Simon Steiner <ssteiner@apache.org> | 2023-06-13 08:25:22 +0100 |
---|---|---|
committer | Simon Steiner <ssteiner@apache.org> | 2023-07-21 11:10:41 +0100 |
commit | 3dd36e9bb26df83fa8677425f7f16e1d53001409 (patch) | |
tree | 76f855a1605d34df0dbdeca11fba54a91f9059fa /fop-core/src/test | |
parent | 05f8a2c9d2084b29b7ddf49a25d6a8e028243b7c (diff) | |
download | xmlgraphics-fop-3dd36e9bb26df83fa8677425f7f16e1d53001409.tar.gz xmlgraphics-fop-3dd36e9bb26df83fa8677425f7f16e1d53001409.zip |
FOP-3140: Merge form fields in external PDFs
Diffstat (limited to 'fop-core/src/test')
-rw-r--r-- | fop-core/src/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java | 6 | ||||
-rw-r--r-- | fop-core/src/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/fop-core/src/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java b/fop-core/src/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java index d21739476..273d97633 100644 --- a/fop-core/src/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java +++ b/fop-core/src/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java @@ -32,6 +32,7 @@ import static org.apache.fop.render.pdf.PDFEncryptionOption.USER_PASSWORD; import static org.apache.fop.render.pdf.PDFRendererOption.DISABLE_SRGB_COLORSPACE; import static org.apache.fop.render.pdf.PDFRendererOption.FILTER_LIST; import static org.apache.fop.render.pdf.PDFRendererOption.FORM_XOBJECT; +import static org.apache.fop.render.pdf.PDFRendererOption.MERGE_FORM_FIELDS; import static org.apache.fop.render.pdf.PDFRendererOption.OUTPUT_PROFILE; import static org.apache.fop.render.pdf.PDFRendererOption.PDF_A_MODE; import static org.apache.fop.render.pdf.PDFRendererOption.PDF_X_MODE; @@ -99,6 +100,11 @@ public final class PDFRendererConfBuilder extends RendererConfBuilder { return this; } + public PDFRendererConfBuilder setMergeFormFieldsEnabled(boolean b) { + createTextElement(MERGE_FORM_FIELDS, String.valueOf(b)); + return this; + } + public final class EncryptionParamsBuilder { private final Element el; diff --git a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java index 7b81b4db8..e7d7a5c59 100644 --- a/fop-core/src/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/render/pdf/PDFRendererConfigParserTestCase.java @@ -226,4 +226,10 @@ public class PDFRendererConfigParserTestCase public void testErroneousPDFVersionsNotSet() throws Exception { pdfVersionTester(""); } + + @Test + public void testMergeFormFields() throws Exception { + parseConfig(createRenderer().setMergeFormFieldsEnabled(true)); + assertTrue(conf.getConfigOptions().getMergeFormFieldsEnabled()); + } } |