This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new e1b1a8970e4 Fixes #9087. Native PDF parsing support in 
camel-quarkus-tika
e1b1a8970e4 is described below

commit e1b1a8970e465d4a253feea2ee42d9a5271c210e
Author: Jiří Ondrušek <[email protected]>
AuthorDate: Tue Oct 20 08:08:39 2026 +0200

    Fixes #9087. Native PDF parsing support in camel-quarkus-tika
    
    Move the PDFBox/Tika PDF native configuration from langchain4j-ingest to
    camel-quarkus-tika, active when tika-parser-pdf-module is present.
    
    - Embed FontBox CMaps, PDFs with Identity-H fonts failed in native mode
    - Depend on support-commons-logging: PDFBox logs via commons-logging,
      which the BOM excludes from tika-parser-pdf-module
    - Drop the org.apache.tika.parser.pdf runtime init, not needed by Tika 4.1
    - Test PDFs with an Identity-H font, a non-embedded standard 14 font and
      encryption; document the parser modules
    
    Co-authored-by: jiriOndrusek-agent <[email protected]>
    Co-authored-by: Claude Opus 5.5 <[email protected]>
---
 .../ROOT/pages/reference/extensions/tika.adoc      | 22 +++++++
 .../deployment/Langchain4jIngestProcessor.java     | 71 ---------------------
 extensions/tika/deployment/pom.xml                 |  4 ++
 .../component/tika/deployment/TikaProcessor.java   | 52 +++++++++++++++
 extensions/tika/runtime/pom.xml                    |  5 ++
 extensions/tika/runtime/src/main/doc/usage.adoc    | 17 +++++
 integration-tests/tika/pom.xml                     |  4 ++
 .../quarkus/component/tika/it/TikaResource.java    |  3 +
 .../camel/quarkus/component/tika/it/TikaTest.java  | 74 ++++++++++++++++++++++
 poms/bom/pom.xml                                   |  5 +-
 10 files changed, 183 insertions(+), 74 deletions(-)

diff --git a/docs/modules/ROOT/pages/reference/extensions/tika.adoc 
b/docs/modules/ROOT/pages/reference/extensions/tika.adoc
index 3a0c3c1408a..bcd09a59c34 100644
--- a/docs/modules/ROOT/pages/reference/extensions/tika.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/tika.adoc
@@ -44,3 +44,25 @@ Or add the coordinates to your existing project:
 ifeval::[{doc-show-user-guide-link} == true]
 Check the xref:user-guide/index.adoc[User guide] for more information about 
writing Camel Quarkus applications.
 endif::[]
+
+[id="extensions-tika-usage"]
+== Usage
+[id="extensions-tika-usage-parser-modules"]
+=== Parser modules
+
+Tika parses only the formats whose parser module is on the classpath.
+`camel-tika` brings the HTML and plain text modules. For any other format, add 
its module to your application, e.g. for PDF:
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.tika</groupId>
+    <artifactId>tika-parser-pdf-module</artifactId>
+</dependency>
+----
+
+The Camel Quarkus BOM manages the version of `tika-parser-pdf-module` only.
+For other modules, use the version of `org.apache.tika:tika-core` that 
`camel-tika` brings.
+
+In native mode, the HTML, plain text and PDF modules are supported.
+
diff --git 
a/extensions/langchain4j-ingest/deployment/src/main/java/org/apache/camel/quarkus/component/langchain4j/ingest/deployment/Langchain4jIngestProcessor.java
 
b/extensions/langchain4j-ingest/deployment/src/main/java/org/apache/camel/quarkus/component/langchain4j/ingest/deployment/Langchain4jIngestProcessor.java
index 51bded43594..25f6554f7c6 100644
--- 
a/extensions/langchain4j-ingest/deployment/src/main/java/org/apache/camel/quarkus/component/langchain4j/ingest/deployment/Langchain4jIngestProcessor.java
+++ 
b/extensions/langchain4j-ingest/deployment/src/main/java/org/apache/camel/quarkus/component/langchain4j/ingest/deployment/Langchain4jIngestProcessor.java
@@ -28,7 +28,6 @@ import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
 import io.quarkus.arc.deployment.SyntheticBeanBuildItem;
 import io.quarkus.arc.deployment.SyntheticBeansRuntimeInitBuildItem;
 import 
io.quarkus.arc.deployment.ValidationPhaseBuildItem.ValidationErrorBuildItem;
-import io.quarkus.bootstrap.classloading.QuarkusClassLoader;
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.annotations.Consume;
@@ -37,11 +36,7 @@ import io.quarkus.deployment.annotations.Record;
 import io.quarkus.deployment.builditem.ApplicationArchivesBuildItem;
 import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
-import io.quarkus.deployment.builditem.nativeimage.ExcludeConfigBuildItem;
-import 
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceDirectoryBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
-import 
io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
-import 
io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedPackageBuildItem;
 import io.quarkus.runtime.configuration.ConfigurationException;
 import jakarta.inject.Singleton;
 import org.apache.camel.quarkus.component.langchain4j.ingest.Ingest;
@@ -78,72 +73,6 @@ class Langchain4jIngestProcessor {
                 .build();
     }
 
-    /**
-     * The documented PDF recipe adds {@code tika-parser-pdf-module}, which 
drags
-     * {@code jaxb-runtime} → {@code angus-activation} into the image. Angus' 
own GraalVM
-     * feature then reflects over every registered data-content handler and 
crashes on
-     * BouncyCastle's S/MIME handlers ({@code bcjmail}'s mailcap references
-     * {@code jakarta.mail.Part}, and jakarta.mail is not on the classpath). 
The feature only
-     * registers mailcap handlers, which nothing on the ingest path uses, so 
its registration
-     * is excluded — but only in the constellation that crashes: PDFBox 
present (the recipe) and
-     * jakarta.mail absent. An application that uses mail and angus for real 
keeps its feature.
-     *
-     * TODO: move to camel-quarkus-tika, see #9087.
-     */
-    @BuildStep
-    void excludeAngusActivationFeature(BuildProducer<ExcludeConfigBuildItem> 
excludeConfig) {
-        if 
(!QuarkusClassLoader.isClassPresentAtRuntime("org.apache.pdfbox.pdmodel.PDDocument")
-                || 
QuarkusClassLoader.isClassPresentAtRuntime("jakarta.mail.Part")) {
-            return;
-        }
-        excludeConfig.produce(new 
ExcludeConfigBuildItem("org\\.eclipse\\.angus\\.angus-activation-.*\\.jar",
-                
"/META-INF/native-image/org.eclipse.angus/angus-activation/native-image.properties"));
-    }
-
-    /**
-     * The same recipe brings PDFBox itself. Native image needs its 
AWT-touching classes
-     * initialized at run time and its resource tree — font metrics, glyph 
lists, ICC profile —
-     * embedded. The camel-quarkus-pdf extension embeds the same files as a 
hand-listed constant;
-     * this registers the {@code org/apache/pdfbox/resources} directory 
wholesale instead, so the
-     * set cannot drift when a PDFBox upgrade adds or renames a resource. The 
runtime-init side is
-     * widened past camel-pdf to the rendering and graphics packages Tika's 
text extraction
-     * reaches. Produced only when PDFBox is on the classpath.
-     *
-     * TODO: move to camel-quarkus-tika (#9087) and align camel-quarkus-pdf 
with it (#9091).
-     */
-    @BuildStep
-    void pdfboxInNative(
-            BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitialized,
-            BuildProducer<RuntimeInitializedPackageBuildItem> 
runtimeInitializedPackages,
-            BuildProducer<NativeImageResourceDirectoryBuildItem> 
nativeResourceDirectories,
-            BuildProducer<ReflectiveClassBuildItem> reflectiveClasses) {
-        if 
(!QuarkusClassLoader.isClassPresentAtRuntime("org.apache.pdfbox.pdmodel.PDDocument"))
 {
-            return;
-        }
-        for (String className : new String[] {
-                "org.apache.pdfbox.pdmodel.font.PDType1Font",
-                "org.apache.pdfbox.pdmodel.PDDocument",
-                "org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler" 
}) {
-            runtimeInitialized.produce(new 
RuntimeInitializedClassBuildItem(className));
-        }
-        // text extraction reaches AWT-holding statics across the rendering 
and graphics trees
-        // (SoftMask's DirectColorModel, the CIE color spaces' 
ICC_ColorSpace), and Tika's own
-        // PDF classes embed them in enum constants 
(PDFParserConfig$TikaImageType wraps
-        // rendering.ImageType), so the packages are deferred wholesale rather 
than chasing one
-        // class at a time
-        for (String packageName : new String[] {
-                "org.apache.pdfbox.rendering",
-                "org.apache.pdfbox.pdmodel.graphics",
-                "org.apache.tika.parser.pdf" }) {
-            runtimeInitializedPackages.produce(new 
RuntimeInitializedPackageBuildItem(packageName));
-        }
-        reflectiveClasses.produce(ReflectiveClassBuildItem
-                
.builder("org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler",
-                        
"org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDParentTreeValue")
-                .constructors().methods().build());
-        nativeResourceDirectories.produce(new 
NativeImageResourceDirectoryBuildItem("org/apache/pdfbox/resources"));
-    }
-
     /**
      * {@code #class:} beans are instantiated reflectively, which native mode 
allows only for
      * registered classes: the two camel-core repositories the documentation 
recommends, plus
diff --git a/extensions/tika/deployment/pom.xml 
b/extensions/tika/deployment/pom.xml
index 619b5e221a1..81e73f6c611 100644
--- a/extensions/tika/deployment/pom.xml
+++ b/extensions/tika/deployment/pom.xml
@@ -46,6 +46,10 @@
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-tika</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            
<artifactId>camel-quarkus-support-commons-logging-deployment</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
diff --git 
a/extensions/tika/deployment/src/main/java/org/apache/camel/quarkus/component/tika/deployment/TikaProcessor.java
 
b/extensions/tika/deployment/src/main/java/org/apache/camel/quarkus/component/tika/deployment/TikaProcessor.java
index 39654ce2eba..ef7a3b2cc60 100644
--- 
a/extensions/tika/deployment/src/main/java/org/apache/camel/quarkus/component/tika/deployment/TikaProcessor.java
+++ 
b/extensions/tika/deployment/src/main/java/org/apache/camel/quarkus/component/tika/deployment/TikaProcessor.java
@@ -18,10 +18,16 @@ package org.apache.camel.quarkus.component.tika.deployment;
 
 import java.util.Set;
 
+import io.quarkus.bootstrap.classloading.QuarkusClassLoader;
 import io.quarkus.deployment.annotations.BuildProducer;
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ExcludeConfigBuildItem;
 import 
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
+import 
io.quarkus.deployment.builditem.nativeimage.NativeImageResourceDirectoryBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import 
io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
+import 
io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedPackageBuildItem;
 import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
 import io.quarkus.deployment.util.ServiceUtil;
 import org.apache.tika.detect.EncodingDetector;
@@ -48,6 +54,52 @@ class TikaProcessor {
         serviceProvider.produce(new 
ServiceProviderBuildItem(Parser.class.getName(), 
getProviderNames(Parser.class.getName())));
     }
 
+    /**
+     * Native support for {@code tika-parser-pdf-module} and the PDFBox it 
brings, when the application adds it. The
+     * PDFBox part is similar to {@code PdfProcessor} of camel-quarkus-pdf, 
keep them aligned.
+     */
+    @BuildStep
+    void pdfParserModule(
+            BuildProducer<NativeImageResourceDirectoryBuildItem> 
resourceDirectory,
+            BuildProducer<RuntimeInitializedClassBuildItem> 
runtimeInitializedClass,
+            BuildProducer<RuntimeInitializedPackageBuildItem> 
runtimeInitializedPackage,
+            BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
+            BuildProducer<ExcludeConfigBuildItem> excludeConfig) {
+        if 
(!QuarkusClassLoader.isClassPresentAtRuntime("org.apache.tika.parser.pdf.PDFParser"))
 {
+            return;
+        }
+        // Font metrics, glyph lists, the ICC profile etc. The whole 
directory, so PDFBox upgrades need no list updates
+        resourceDirectory.produce(new 
NativeImageResourceDirectoryBuildItem("org/apache/pdfbox/resources"));
+        // FontBox loads predefined CMaps (e.g. Identity-H) by names computed 
at runtime
+        resourceDirectory.produce(new 
NativeImageResourceDirectoryBuildItem("org/apache/fontbox/cmap"));
+
+        for (String className : new String[] {
+                "org.apache.pdfbox.pdmodel.font.PDType1Font",
+                "org.apache.pdfbox.pdmodel.PDDocument",
+                "org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler" 
}) {
+            runtimeInitializedClass.produce(new 
RuntimeInitializedClassBuildItem(className));
+        }
+        // Text extraction reaches AWT-holding statics in PDFBox's rendering 
and graphics packages (SoftMask's
+        // ColorModel, the CIE color spaces' ColorSpace), so the packages are 
deferred wholesale
+        for (String packageName : new String[] {
+                "org.apache.pdfbox.rendering",
+                "org.apache.pdfbox.pdmodel.graphics" }) {
+            runtimeInitializedPackage.produce(new 
RuntimeInitializedPackageBuildItem(packageName));
+        }
+        reflectiveClass.produce(ReflectiveClassBuildItem.builder(
+                "org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler",
+                
"org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDParentTreeValue")
+                .constructors().methods().build());
+
+        // The module brings BouncyCastle's bcjmail, whose mailcap S/MIME 
handlers need jakarta.mail. Without it, the
+        // GraalVM feature of angus-activation (e.g. brought by RESTEasy) 
fails reflecting over them. Nothing here
+        // needs the mailcap handlers, so the feature is skipped in that case
+        if (!QuarkusClassLoader.isClassPresentAtRuntime("jakarta.mail.Part")) {
+            excludeConfig.produce(new 
ExcludeConfigBuildItem("org\\.eclipse\\.angus\\.angus-activation-.*\\.jar",
+                    
"/META-INF/native-image/org.eclipse.angus/angus-activation/native-image.properties"));
+        }
+    }
+
     private Set<String> getProviderNames(String serviceProviderName) throws 
Exception {
         return 
ServiceUtil.classNamesNamedIn(Thread.currentThread().getContextClassLoader(),
                 "META-INF/services/" + serviceProviderName);
diff --git a/extensions/tika/runtime/pom.xml b/extensions/tika/runtime/pom.xml
index 0b4204e42b6..873e5d77913 100644
--- a/extensions/tika/runtime/pom.xml
+++ b/extensions/tika/runtime/pom.xml
@@ -52,6 +52,11 @@
             <groupId>org.apache.camel</groupId>
             <artifactId>camel-tika</artifactId>
         </dependency>
+        <!-- PDFBox, brought by tika-parser-pdf-module, logs via 
commons-logging -->
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-support-commons-logging</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/extensions/tika/runtime/src/main/doc/usage.adoc 
b/extensions/tika/runtime/src/main/doc/usage.adoc
new file mode 100644
index 00000000000..abb0973b281
--- /dev/null
+++ b/extensions/tika/runtime/src/main/doc/usage.adoc
@@ -0,0 +1,17 @@
+=== Parser modules
+
+Tika parses only the formats whose parser module is on the classpath.
+`camel-tika` brings the HTML and plain text modules. For any other format, add 
its module to your application, e.g. for PDF:
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.tika</groupId>
+    <artifactId>tika-parser-pdf-module</artifactId>
+</dependency>
+----
+
+The Camel Quarkus BOM manages the version of `tika-parser-pdf-module` only.
+For other modules, use the version of `org.apache.tika:tika-core` that 
`camel-tika` brings.
+
+In native mode, the HTML, plain text and PDF modules are supported.
diff --git a/integration-tests/tika/pom.xml b/integration-tests/tika/pom.xml
index 2099891b831..2343e1065b0 100644
--- a/integration-tests/tika/pom.xml
+++ b/integration-tests/tika/pom.xml
@@ -35,6 +35,10 @@
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-tika</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.tika</groupId>
+            <artifactId>tika-parser-pdf-module</artifactId>
+        </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-resteasy</artifactId>
diff --git 
a/integration-tests/tika/src/main/java/org/apache/camel/quarkus/component/tika/it/TikaResource.java
 
b/integration-tests/tika/src/main/java/org/apache/camel/quarkus/component/tika/it/TikaResource.java
index 4b8ef5d87cf..d312e443dde 100644
--- 
a/integration-tests/tika/src/main/java/org/apache/camel/quarkus/component/tika/it/TikaResource.java
+++ 
b/integration-tests/tika/src/main/java/org/apache/camel/quarkus/component/tika/it/TikaResource.java
@@ -41,6 +41,9 @@ public class TikaResource {
     @Produces(MediaType.TEXT_PLAIN)
     public Response parse(byte[] message) throws Exception {
         final Exchange response = producerTemplate.request("tika:parse", 
exchange -> exchange.getMessage().setBody(message));
+        if (response.getException() != null) {
+            throw response.getException();
+        }
         return Response
                 .created(new URI("https://camel.apache.org/";))
                 .header("Parsed-Content-Type", 
response.getMessage().getHeader(Exchange.CONTENT_TYPE))
diff --git 
a/integration-tests/tika/src/test/java/org/apache/camel/quarkus/component/tika/it/TikaTest.java
 
b/integration-tests/tika/src/test/java/org/apache/camel/quarkus/component/tika/it/TikaTest.java
index 91033308b15..9420aa5eddf 100644
--- 
a/integration-tests/tika/src/test/java/org/apache/camel/quarkus/component/tika/it/TikaTest.java
+++ 
b/integration-tests/tika/src/test/java/org/apache/camel/quarkus/component/tika/it/TikaTest.java
@@ -16,14 +16,26 @@
  */
 package org.apache.camel.quarkus.component.tika.it;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
 
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
 import io.restassured.http.ContentType;
 import io.restassured.response.ValidatableResponse;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdmodel.PDPage;
+import org.apache.pdfbox.pdmodel.PDPageContentStream;
+import org.apache.pdfbox.pdmodel.encryption.AccessPermission;
+import org.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy;
+import org.apache.pdfbox.pdmodel.font.PDFont;
+import org.apache.pdfbox.pdmodel.font.PDType0Font;
+import org.apache.pdfbox.pdmodel.font.PDType1Font;
+import org.apache.pdfbox.pdmodel.font.Standard14Fonts;
 import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.containsStringIgnoringCase;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.startsWith;
@@ -45,6 +57,42 @@ class TikaTest {
         testParse("quarkus.xml", "application/xml", "Hello Quarkus");
     }
 
+    @Test
+    public void testPdf() throws Exception {
+        testParse("quarkus.pdf", "application/pdf", "Hello Quarkus");
+    }
+
+    @Test
+    public void testPdfWithIdentityHFont() throws Exception {
+        // PDType0Font embeds the font with the Identity-H encoding, a 
predefined CMap which FontBox loads by name
+        try (PDDocument doc = new PDDocument();
+                InputStream font = TikaTest.class
+                        
.getResourceAsStream("/org/apache/pdfbox/resources/ttf/LiberationSans-Regular.ttf"))
 {
+            testParsePdf(createPdf(doc, PDType0Font.load(doc, font), "Hello 
Identity-H"), "Hello Identity-H");
+        }
+    }
+
+    @Test
+    public void testPdfWithNonEmbeddedFont() throws Exception {
+        // A standard 14 font is not embedded, PDFBox reads its metrics from 
the AFM files in its resources
+        try (PDDocument doc = new PDDocument()) {
+            PDFont helvetica = new 
PDType1Font(Standard14Fonts.FontName.HELVETICA);
+            testParsePdf(createPdf(doc, helvetica, "Hello Helvetica"), "Hello 
Helvetica");
+        }
+    }
+
+    @Test
+    public void testEncryptedPdf() throws Exception {
+        // Only an owner password, so Tika opens the document with the empty 
user password
+        try (PDDocument doc = new PDDocument()) {
+            StandardProtectionPolicy policy = new 
StandardProtectionPolicy("owner", "", new AccessPermission());
+            policy.setEncryptionKeyLength(256);
+            doc.protect(policy);
+            PDFont helvetica = new 
PDType1Font(Standard14Fonts.FontName.HELVETICA);
+            testParsePdf(createPdf(doc, helvetica, "Hello encrypted"), "Hello 
encrypted");
+        }
+    }
+
     @Test
     public void testDetectDoc() throws Exception {
         testDetect("test.doc", "application/x-tika-msoffice");
@@ -68,6 +116,17 @@ class TikaTest {
                 .body(containsStringIgnoringCase(expectedBody == null ? 
"<body/>" : expectedBody));
     }
 
+    private void testParsePdf(byte[] pdf, String expectedText) {
+        RestAssured.given()
+                .contentType(ContentType.BINARY)
+                .body(pdf)
+                .post("/tika/parse")
+                .then()
+                .statusCode(201)
+                .header("Parsed-Content-Type", startsWith("application/pdf"))
+                .body(containsString(expectedText));
+    }
+
     private void testDetect(String fileName, String expectedContentType) 
throws Exception {
         post(fileName, "/tika/detect")
                 .body(is(expectedContentType));
@@ -82,6 +141,21 @@ class TikaTest {
                 .statusCode(201);
     }
 
+    private static byte[] createPdf(PDDocument doc, PDFont font, String text) 
throws IOException {
+        PDPage page = new PDPage();
+        doc.addPage(page);
+        try (PDPageContentStream content = new PDPageContentStream(doc, page)) 
{
+            content.beginText();
+            content.setFont(font, 12);
+            content.newLineAtOffset(50, 700);
+            content.showText(text);
+            content.endText();
+        }
+        ByteArrayOutputStream pdf = new ByteArrayOutputStream();
+        doc.save(pdf);
+        return pdf.toByteArray();
+    }
+
     private byte[] readQuarkusFile(String fileName) throws Exception {
         try (InputStream is = 
getClass().getClassLoader().getResourceAsStream("assets/" + fileName)) {
             if (is == null) {
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 5bab737c159..417f981d6cf 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -8638,9 +8638,8 @@
                                 
<resolutionEntryPointInclude>com.ibm.icu:icu4j</resolutionEntryPointInclude>
                                 
<resolutionEntryPointInclude>com.sun.xml.fastinfoset:FastInfoset</resolutionEntryPointInclude>
                                 
<resolutionEntryPointInclude>org.mapstruct:mapstruct-processor</resolutionEntryPointInclude>
-                                <!-- Tika parses only the formats whose parser 
modules are present; applications
-                                     using the langchain4j-ingest tika parser 
add the modules for their formats;
-                                     moves to camel-quarkus-tika together with 
the native build steps, see #9087 -->
+                                <!-- Tika parses only the formats whose parser 
modules are present; camel-quarkus-tika
+                                     applications add the modules for their 
formats -->
                                 
<resolutionEntryPointInclude>org.apache.tika:tika-parser-pdf-module</resolutionEntryPointInclude>
                             </resolutionEntryPointIncludes>
                             <resolutionExcludes>

Reply via email to