From 11701190b70e4dda5b64ae38ff459e5ac397d9b9 Mon Sep 17 00:00:00 2001 From: dhairya05 Date: Sun, 15 Nov 2026 00:40:50 +0530 Subject: [PATCH 1/5] camel-pdf: deprecate CamelPdfDecryptionMaterial, which nothing reads The header is documented as the *Mandatory* header if the PDF document is encrypted, but the component never looks it up - PdfProducer reads CamelPdfDocument and CamelPdfProtectionPolicy by name and never this one, and the only other references to it are two tests that decrypt the document themselves with Loader.loadPDF(bytes, userPass) before sending it, so the header they set alongside is decoration. The one place it could be applied loads without a password: @Converter public PDDocument convertToPDF(byte[] bytes) throws Exception { return Loader.loadPDF(bytes); } so sending an encrypted PDF as bytes with the documented header fails in the type converter with InvalidPasswordException, before the producer runs. A PDDocument in the body is already decrypted by whatever loaded it, which is why the tests pass. It looks like a leftover of the PDFBox 1.x API, where the document was opened first and decrypted afterwards with document.openProtection(decryptionMaterial); PDFBox 2 and 3 take the password at load time instead. Deprecate it with a note saying so. --- .../resources/org/apache/camel/catalog/components/pdf.json | 2 +- .../META-INF/org/apache/camel/component/pdf/pdf.json | 2 +- .../org/apache/camel/component/pdf/PdfHeaderConstants.java | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json index b1c9c6e3869cc..a62566a57b4c1 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json @@ -30,7 +30,7 @@ "headers": { "CamelPdfProtectionPolicy": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy", "deprecated": false, "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/ProtectionPolicy.html[ProtectionPolicy]. If specified then PDF document will be encrypted with it.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PROTECTION_POLICY_HEADER_NAME" }, "CamelPdfDocument": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.PDDocument", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for append operation and ignored in all other operations. Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/PDDocument.html[PDDocument]. Stores PDF document which will be used for append operation.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PDF_DOCUMENT_HEADER_NAME" }, - "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": false, "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Mandatory* header if PDF document is encrypted.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, + "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Mandatory* header if PDF document is encrypted. Deprecation note: Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, "CamelPdfFilesToMerge": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for merge operation and ignored in all other operations. The list of pdf files that will be merged, each given as a java.io.File or a java.nio.file.Path.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#FILES_TO_MERGE_HEADER_NAME" } }, "bodyTypes": { diff --git a/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json b/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json index b1c9c6e3869cc..a62566a57b4c1 100644 --- a/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json +++ b/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json @@ -30,7 +30,7 @@ "headers": { "CamelPdfProtectionPolicy": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy", "deprecated": false, "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/ProtectionPolicy.html[ProtectionPolicy]. If specified then PDF document will be encrypted with it.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PROTECTION_POLICY_HEADER_NAME" }, "CamelPdfDocument": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.PDDocument", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for append operation and ignored in all other operations. Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/PDDocument.html[PDDocument]. Stores PDF document which will be used for append operation.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PDF_DOCUMENT_HEADER_NAME" }, - "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": false, "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Mandatory* header if PDF document is encrypted.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, + "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Mandatory* header if PDF document is encrypted. Deprecation note: Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, "CamelPdfFilesToMerge": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for merge operation and ignored in all other operations. The list of pdf files that will be merged, each given as a java.io.File or a java.nio.file.Path.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#FILES_TO_MERGE_HEADER_NAME" } }, "bodyTypes": { diff --git a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java index 51c4c6d9dbbff..7751e780cf1f6 100644 --- a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java +++ b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java @@ -36,7 +36,10 @@ public final class PdfHeaderConstants { Expected type is https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial]. *Mandatory* header if PDF document is encrypted.""", - javaType = "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial") + javaType = "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", + deprecationNote = "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[]" + + " converter loads it without a password") + @Deprecated public static final String DECRYPTION_MATERIAL_HEADER_NAME = "CamelPdfDecryptionMaterial"; @Metadata(description = """ From bcc1f26867edb005e3b6d136dcf31bc1081c20ef Mon Sep 17 00:00:00 2001 From: dhairya05 <83921853+Dhairya-007@users.noreply.github.com> Date: Sun, 15 Nov 2026 00:46:15 +0530 Subject: [PATCH 2/5] Update components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java Co-authored-by: Guillaume Nodet - AI Bot --- .../org/apache/camel/component/pdf/PdfHeaderConstants.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java index 7751e780cf1f6..aa67db6b9fb0a 100644 --- a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java +++ b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java @@ -35,7 +35,10 @@ public final class PdfHeaderConstants { @Metadata(description = """ Expected type is https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial]. - *Mandatory* header if PDF document is encrypted.""", + *Deprecated.* This header has never been read by the component. + PDFBox 2+ decrypts documents at load time (via the password argument to `Loader.loadPDF`); + by the time the producer receives a `PDDocument`, decryption has already occurred or failed. + Use `Loader.loadPDF(bytes, password)` in a type converter or a `Processor` before the PDF endpoint instead.""", javaType = "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", deprecationNote = "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[]" + " converter loads it without a password") From 0b33003535fe08779d3f46fbe71547eae4ccfad7 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Sat, 14 Nov 2026 19:55:50 +0000 Subject: [PATCH 3/5] Regen --- .../resources/org/apache/camel/catalog/components/pdf.json | 2 +- .../resources/META-INF/org/apache/camel/component/pdf/pdf.json | 2 +- .../camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json index a62566a57b4c1..48b006ccb0d97 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json @@ -30,7 +30,7 @@ "headers": { "CamelPdfProtectionPolicy": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy", "deprecated": false, "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/ProtectionPolicy.html[ProtectionPolicy]. If specified then PDF document will be encrypted with it.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PROTECTION_POLICY_HEADER_NAME" }, "CamelPdfDocument": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.PDDocument", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for append operation and ignored in all other operations. Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/PDDocument.html[PDDocument]. Stores PDF document which will be used for append operation.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PDF_DOCUMENT_HEADER_NAME" }, - "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Mandatory* header if PDF document is encrypted. Deprecation note: Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, + "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Deprecated.* This header has never been read by the component. PDFBox 2+ decrypts documents at load time (via the password argument to Loader.loadPDF); by the time the producer receives a PDDocument, decryption has already occurred or failed. Use Loader.loadPDF(bytes, password) in a type converter or a Processor before the PDF endpoint instead. Deprecation note: Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, "CamelPdfFilesToMerge": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for merge operation and ignored in all other operations. The list of pdf files that will be merged, each given as a java.io.File or a java.nio.file.Path.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#FILES_TO_MERGE_HEADER_NAME" } }, "bodyTypes": { diff --git a/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json b/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json index a62566a57b4c1..48b006ccb0d97 100644 --- a/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json +++ b/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json @@ -30,7 +30,7 @@ "headers": { "CamelPdfProtectionPolicy": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy", "deprecated": false, "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/ProtectionPolicy.html[ProtectionPolicy]. If specified then PDF document will be encrypted with it.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PROTECTION_POLICY_HEADER_NAME" }, "CamelPdfDocument": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.PDDocument", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for append operation and ignored in all other operations. Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/PDDocument.html[PDDocument]. Stores PDF document which will be used for append operation.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PDF_DOCUMENT_HEADER_NAME" }, - "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Mandatory* header if PDF document is encrypted. Deprecation note: Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, + "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Deprecated.* This header has never been read by the component. PDFBox 2+ decrypts documents at load time (via the password argument to Loader.loadPDF); by the time the producer receives a PDDocument, decryption has already occurred or failed. Use Loader.loadPDF(bytes, password) in a type converter or a Processor before the PDF endpoint instead. Deprecation note: Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, "CamelPdfFilesToMerge": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for merge operation and ignored in all other operations. The list of pdf files that will be merged, each given as a java.io.File or a java.nio.file.Path.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#FILES_TO_MERGE_HEADER_NAME" } }, "bodyTypes": { diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java index e497c3c563c78..9b9bc82632a5c 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java @@ -431,7 +431,7 @@ public String pdfDocument() { } /** * Expected type is - * https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial]. Mandatory* header if PDF document is encrypted. + * https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial]. Deprecated.* This header has never been read by the component. PDFBox 2+ decrypts documents at load time (via the password argument to Loader.loadPDF); by the time the producer receives a PDDocument, decryption has already occurred or failed. Use Loader.loadPDF(bytes, password) in a type converter or a Processor before the PDF endpoint instead. Deprecation note: Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password. * * The option is a: {@code * org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial} type. @@ -440,6 +440,7 @@ public String pdfDocument() { * * @return the name of the header {@code PdfDecryptionMaterial}. */ + @Deprecated public String pdfDecryptionMaterial() { return "CamelPdfDecryptionMaterial"; } From 053ffcb49fea861584cc7d10b4a7cba51d119859 Mon Sep 17 00:00:00 2001 From: dhairya05 Date: Sun, 15 Nov 2026 15:10:04 +0530 Subject: [PATCH 4/5] camel-pdf: correct the deprecation wording, drop the duplicated reason, add an upgrade note Four things from review: 1. "never been read" was wrong. PdfProducer did read the header and call PDDocument.openProtection(decryptionMaterial) up to Camel 2.20; the read went away with CAMEL-11976, which aligned the component on PDFBox 2.0.6. So it is "no longer read", with no effect since 2.21. 2. The description carried the whole deprecation paragraph, and the generator appends "Deprecation note: ..." to it, so the catalog gave the reason twice; the leading asterisk of *Deprecated.* was also stripped, leaving "Deprecated.*" mid-sentence. The description is now one short sentence and the reason lives only in deprecationNote. 3. Added a section to the 4.24 upgrade guide, with the Processor that loads an encrypted document with its password. 4. PdfAppendTest and PdfTextExtractionTest no longer set the header, which did nothing there and now warns. Co-Authored-By: Claude Opus 5 --- .../apache/camel/catalog/components/pdf.json | 2 +- .../org/apache/camel/component/pdf/pdf.json | 2 +- .../component/pdf/PdfHeaderConstants.java | 10 ++++----- .../camel/component/pdf/PdfAppendTest.java | 2 -- .../component/pdf/PdfTextExtractionTest.java | 6 +----- .../pages/camel-4x-upgrade-guide-4_24.adoc | 21 +++++++++++++++++++ .../dsl/PdfEndpointBuilderFactory.java | 2 +- 7 files changed, 29 insertions(+), 16 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json index 48b006ccb0d97..2925f33fe5bd5 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json @@ -30,7 +30,7 @@ "headers": { "CamelPdfProtectionPolicy": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy", "deprecated": false, "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/ProtectionPolicy.html[ProtectionPolicy]. If specified then PDF document will be encrypted with it.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PROTECTION_POLICY_HEADER_NAME" }, "CamelPdfDocument": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.PDDocument", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for append operation and ignored in all other operations. Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/PDDocument.html[PDDocument]. Stores PDF document which will be used for append operation.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PDF_DOCUMENT_HEADER_NAME" }, - "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Deprecated.* This header has never been read by the component. PDFBox 2+ decrypts documents at load time (via the password argument to Loader.loadPDF); by the time the producer receives a PDDocument, decryption has already occurred or failed. Use Loader.loadPDF(bytes, password) in a type converter or a Processor before the PDF endpoint instead. Deprecation note: Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, + "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. No longer read by the component (no effect since Camel 2.21). Deprecation note: No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, "CamelPdfFilesToMerge": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for merge operation and ignored in all other operations. The list of pdf files that will be merged, each given as a java.io.File or a java.nio.file.Path.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#FILES_TO_MERGE_HEADER_NAME" } }, "bodyTypes": { diff --git a/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json b/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json index 48b006ccb0d97..2925f33fe5bd5 100644 --- a/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json +++ b/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json @@ -30,7 +30,7 @@ "headers": { "CamelPdfProtectionPolicy": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy", "deprecated": false, "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/ProtectionPolicy.html[ProtectionPolicy]. If specified then PDF document will be encrypted with it.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PROTECTION_POLICY_HEADER_NAME" }, "CamelPdfDocument": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.PDDocument", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for append operation and ignored in all other operations. Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/PDDocument.html[PDDocument]. Stores PDF document which will be used for append operation.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PDF_DOCUMENT_HEADER_NAME" }, - "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Deprecated.* This header has never been read by the component. PDFBox 2+ decrypts documents at load time (via the password argument to Loader.loadPDF); by the time the producer receives a PDDocument, decryption has already occurred or failed. Use Loader.loadPDF(bytes, password) in a type converter or a Processor before the PDF endpoint instead. Deprecation note: Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, + "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. No longer read by the component (no effect since Camel 2.21). Deprecation note: No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, "CamelPdfFilesToMerge": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for merge operation and ignored in all other operations. The list of pdf files that will be merged, each given as a java.io.File or a java.nio.file.Path.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#FILES_TO_MERGE_HEADER_NAME" } }, "bodyTypes": { diff --git a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java index aa67db6b9fb0a..e729e7515f2a1 100644 --- a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java +++ b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java @@ -35,13 +35,11 @@ public final class PdfHeaderConstants { @Metadata(description = """ Expected type is https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial]. - *Deprecated.* This header has never been read by the component. - PDFBox 2+ decrypts documents at load time (via the password argument to `Loader.loadPDF`); - by the time the producer receives a `PDDocument`, decryption has already occurred or failed. - Use `Loader.loadPDF(bytes, password)` in a type converter or a `Processor` before the PDF endpoint instead.""", + No longer read by the component (no effect since Camel 2.21).""", javaType = "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", - deprecationNote = "Never read by the component: PDDocument is decrypted when it is loaded, and the byte[]" - + " converter loads it without a password") + deprecationNote = "No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time" + + " via Loader.loadPDF(bytes, password). The byte[] converter loads without a password." + + " Decrypt in a Processor before the PDF endpoint instead.") @Deprecated public static final String DECRYPTION_MATERIAL_HEADER_NAME = "CamelPdfDecryptionMaterial"; diff --git a/components/camel-pdf/src/test/java/org/apache/camel/component/pdf/PdfAppendTest.java b/components/camel-pdf/src/test/java/org/apache/camel/component/pdf/PdfAppendTest.java index d5f0b76d17839..d1347fc078f0d 100644 --- a/components/camel-pdf/src/test/java/org/apache/camel/component/pdf/PdfAppendTest.java +++ b/components/camel-pdf/src/test/java/org/apache/camel/component/pdf/PdfAppendTest.java @@ -33,7 +33,6 @@ import org.apache.pdfbox.io.RandomAccessReadBuffer; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.encryption.AccessPermission; -import org.apache.pdfbox.pdmodel.encryption.StandardDecryptionMaterial; import org.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy; import org.apache.pdfbox.text.PDFTextStripper; import org.junit.jupiter.api.Test; @@ -104,7 +103,6 @@ public void testAppendEncrypted() throws Exception { Map headers = new HashMap<>(); headers.put(PdfHeaderConstants.PDF_DOCUMENT_HEADER_NAME, encryptedDocument); - headers.put(PdfHeaderConstants.DECRYPTION_MATERIAL_HEADER_NAME, new StandardDecryptionMaterial(userPass)); resultEndpoint.setExpectedMessageCount(1); resultEndpoint.expectedMessagesMatches(new Predicate() { diff --git a/components/camel-pdf/src/test/java/org/apache/camel/component/pdf/PdfTextExtractionTest.java b/components/camel-pdf/src/test/java/org/apache/camel/component/pdf/PdfTextExtractionTest.java index 040bc75aabf6c..7daaa99278a80 100644 --- a/components/camel-pdf/src/test/java/org/apache/camel/component/pdf/PdfTextExtractionTest.java +++ b/components/camel-pdf/src/test/java/org/apache/camel/component/pdf/PdfTextExtractionTest.java @@ -29,7 +29,6 @@ import org.apache.pdfbox.Loader; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.encryption.AccessPermission; -import org.apache.pdfbox.pdmodel.encryption.StandardDecryptionMaterial; import org.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -79,10 +78,7 @@ public void testExtractTextFromEncrypted() throws Exception { PDDocument encryptedDocument = Loader.loadPDF(output.toByteArray(), userPass); expectText(); - template.sendBodyAndHeader("direct:start", - encryptedDocument, - PdfHeaderConstants.DECRYPTION_MATERIAL_HEADER_NAME, - new StandardDecryptionMaterial(userPass)); + template.sendBody("direct:start", encryptedDocument); resultEndpoint.assertIsSatisfied(); } diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc index 028422a474ff9..2b5360e9bdb55 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc @@ -8743,3 +8743,24 @@ if it configured the proxy. It is now deprecated, with a `deprecationNote` that says so, and its description no longer claims to configure a proxy. Remove `protocol` from the endpoint URI or the configuration. To send the client's traffic through a proxy, use `proxyProtocol` together with `proxyHost` and `proxyPort`, which the shared client builder does apply. + +=== camel-pdf - the CamelPdfDecryptionMaterial header is deprecated + +The `CamelPdfDecryptionMaterial` header has had no effect since Camel 2.21. PDFBox 2 decrypts a document when it is +loaded, from the password argument of `Loader.loadPDF`, so the producer was changed to stop calling the removed +`PDDocument.openProtection(DecryptionMaterial)` and has not read the header since. A route that sets it gets no error +and no decryption. + +It is now deprecated, with a `deprecationNote` that says so. Remove the header and load the document with its password +before it reaches the endpoint, in a `Processor`: + +[source,java] +---- +from("direct:start") + .process(e -> e.getMessage().setBody( + Loader.loadPDF(e.getMessage().getBody(byte[].class), "secret"))) + .to("pdf:extractText"); +---- + +The `byte[]` type converter of the component loads without a password, so an encrypted PDF sent as bytes still has to be +loaded this way. diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java index 9b9bc82632a5c..e205d6fdc3007 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/PdfEndpointBuilderFactory.java @@ -431,7 +431,7 @@ public String pdfDocument() { } /** * Expected type is - * https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial]. Deprecated.* This header has never been read by the component. PDFBox 2+ decrypts documents at load time (via the password argument to Loader.loadPDF); by the time the producer receives a PDDocument, decryption has already occurred or failed. Use Loader.loadPDF(bytes, password) in a type converter or a Processor before the PDF endpoint instead. Deprecation note: Never read by the component: PDDocument is decrypted when it is loaded, and the byte[] converter loads it without a password. + * https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial]. No longer read by the component (no effect since Camel 2.21). Deprecation note: No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead. * * The option is a: {@code * org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial} type. From ba3d143266a4d71a8da829bfc19da779c7b0d1c3 Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Mon, 16 Nov 2026 11:22:31 +0100 Subject: [PATCH 5/5] camel-pdf: the CamelPdfDecryptionMaterial description no longer repeats its deprecation note Co-Authored-By: Claude Opus 5.5 Signed-off-by: Claus Ibsen --- .../resources/org/apache/camel/catalog/components/pdf.json | 2 +- .../resources/META-INF/org/apache/camel/component/pdf/pdf.json | 2 +- .../org/apache/camel/component/pdf/PdfHeaderConstants.java | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json index 2925f33fe5bd5..349dc587262bc 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/pdf.json @@ -30,7 +30,7 @@ "headers": { "CamelPdfProtectionPolicy": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy", "deprecated": false, "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/ProtectionPolicy.html[ProtectionPolicy]. If specified then PDF document will be encrypted with it.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PROTECTION_POLICY_HEADER_NAME" }, "CamelPdfDocument": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.PDDocument", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for append operation and ignored in all other operations. Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/PDDocument.html[PDDocument]. Stores PDF document which will be used for append operation.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PDF_DOCUMENT_HEADER_NAME" }, - "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. No longer read by the component (no effect since Camel 2.21). Deprecation note: No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, + "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Deprecation note: No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, "CamelPdfFilesToMerge": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for merge operation and ignored in all other operations. The list of pdf files that will be merged, each given as a java.io.File or a java.nio.file.Path.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#FILES_TO_MERGE_HEADER_NAME" } }, "bodyTypes": { diff --git a/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json b/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json index 2925f33fe5bd5..349dc587262bc 100644 --- a/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json +++ b/components/camel-pdf/src/generated/resources/META-INF/org/apache/camel/component/pdf/pdf.json @@ -30,7 +30,7 @@ "headers": { "CamelPdfProtectionPolicy": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy", "deprecated": false, "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/ProtectionPolicy.html[ProtectionPolicy]. If specified then PDF document will be encrypted with it.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PROTECTION_POLICY_HEADER_NAME" }, "CamelPdfDocument": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.PDDocument", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for append operation and ignored in all other operations. Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/PDDocument.html[PDDocument]. Stores PDF document which will be used for append operation.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#PDF_DOCUMENT_HEADER_NAME" }, - "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. No longer read by the component (no effect since Camel 2.21). Deprecation note: No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, + "CamelPdfDecryptionMaterial": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", "deprecated": true, "deprecationNote": "No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "autowired": false, "secret": false, "description": "Expected type is https:\/\/pdfbox.apache.org\/docs\/2.0.13\/javadocs\/org\/apache\/pdfbox\/pdmodel\/encryption\/DecryptionMaterial.html[DecryptionMaterial]. Deprecation note: No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time via Loader.loadPDF(bytes, password). The byte[] converter loads without a password. Decrypt in a Processor before the PDF endpoint instead.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#DECRYPTION_MATERIAL_HEADER_NAME" }, "CamelPdfFilesToMerge": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "Mandatory* header for merge operation and ignored in all other operations. The list of pdf files that will be merged, each given as a java.io.File or a java.nio.file.Path.", "constantName": "org.apache.camel.component.pdf.PdfHeaderConstants#FILES_TO_MERGE_HEADER_NAME" } }, "bodyTypes": { diff --git a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java index e729e7515f2a1..68e3cc7ba2e00 100644 --- a/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java +++ b/components/camel-pdf/src/main/java/org/apache/camel/component/pdf/PdfHeaderConstants.java @@ -34,8 +34,7 @@ public final class PdfHeaderConstants { public static final String PDF_DOCUMENT_HEADER_NAME = "CamelPdfDocument"; @Metadata(description = """ Expected type is - https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial]. - No longer read by the component (no effect since Camel 2.21).""", + https://pdfbox.apache.org/docs/2.0.13/javadocs/org/apache/pdfbox/pdmodel/encryption/DecryptionMaterial.html[DecryptionMaterial].""", javaType = "org.apache.pdfbox.pdmodel.encryption.DecryptionMaterial", deprecationNote = "No longer read by the component since Camel 2.21: PDFBox 2 decrypts at load time" + " via Loader.loadPDF(bytes, password). The byte[] converter loads without a password."