From 1b0903e29f4b8823ca125c34010db527c1723dd5 Mon Sep 17 00:00:00 2001 From: David Caudill <30702022+Kirboyyy@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:19:20 +0200 Subject: [PATCH] Fixed ParagraphPdfDocumentReader example --- .../src/main/antora/modules/ROOT/pages/api/etl-pipeline.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/etl-pipeline.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/etl-pipeline.adoc index 807d15f7b..55e33b50e 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/etl-pipeline.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/api/etl-pipeline.adoc @@ -162,7 +162,7 @@ public class MyPagePdfDocumentReader { List getDocsFromPdfwithCatalog() { - new ParagraphPdfDocumentReader("classpath:/sample1.pdf", + ParagraphPdfDocumentReader pdfReader = new ParagraphPdfDocumentReader("classpath:/sample1.pdf", PdfDocumentReaderConfig.builder() .withPageTopMargin(0) .withPageExtractedTextFormatter(ExtractedTextFormatter.builder() @@ -171,7 +171,7 @@ public class MyPagePdfDocumentReader { .withPagesPerDocument(1) .build()); - return pdfReader.read(); + return pdfReader.read(); } } ----