From 76bde3ff4648cc081a66ea5d07fe5152449dde81 Mon Sep 17 00:00:00 2001 From: anuragkumawat Date: Sun, 31 Dec 2023 08:37:40 -0800 Subject: [PATCH] JAVA-29281 Create new module Text Processing Libraries Modules (#15479) --- pom.xml | 12 +- text-processing-libraries-modules/README.md | 3 + .../antlr}/README.md | 0 .../antlr}/pom.xml | 2 +- .../main/antlr4/com/baeldung/antlr/Java8.g4 | 0 .../src/main/antlr4/com/baeldung/antlr/Log.g4 | 0 .../antlr/java/UppercaseMethodListener.java | 0 .../com/baeldung/antlr/log/LogListener.java | 0 .../baeldung/antlr/log/model/LogEntry.java | 0 .../baeldung/antlr/log/model/LogLevel.java | 0 .../antlr}/src/main/resources/logback.xml | 0 .../baeldung/antlr/JavaParserUnitTest.java | 0 .../com/baeldung/antlr/LogParserUnitTest.java | 0 .../apache-tika}/README.md | 0 .../apache-tika}/pom.xml | 2 +- .../java/com/baeldung/tika/TikaAnalysis.java | 0 .../src/main/resources/logback.xml | 0 .../java/com/baeldung/tika/TikaUnitTest.java | 0 .../apache-tika}/src/test/resources/tika.docx | Bin .../apache-tika}/src/test/resources/tika.txt | Bin .../apache-tika}/src/test/resources/tika.xlsx | Bin .../asciidoctor}/README.md | 0 .../asciidoctor}/log4j.properties | 0 .../asciidoctor}/pom.xml | 2 +- .../asciidoctor}/src/docs/asciidoc/test.adoc | 0 .../baeldung/asciidoctor/AsciidoctorDemo.java | 0 .../src/main/resources/logback.xml | 0 .../AsciidoctorDemoIntegrationTest.java | 0 .../asciidoctor}/src/themes/custom-theme.yml | 0 .../pdf-2}/README.md | 0 .../pdf-2}/pom.xml | 2 +- .../exceltopdf/ExcelToPDFConverter.java | 0 .../pdfedition/PdfContentRemover.java | 86 ++++----- .../com/baeldung/pdfedition/PdfEditor.java | 172 +++++++++--------- .../pdfedition/PdfTextReplacement.java | 90 ++++----- .../com/baeldung/pdfinfo/PdfInfoIText.java | 0 .../com/baeldung/pdfinfo/PdfInfoPdfBox.java | 0 .../src/main/resources/baeldung-cleaned.pdf | Bin .../src/main/resources/baeldung-fixed.pdf | Bin .../src/main/resources/baeldung-modified.pdf | Bin .../pdf-2}/src/main/resources/baeldung.pdf | Bin .../pdf-2}/src/main/resources/baeldung.png | Bin .../src/main/resources/excelsample.xlsx | Bin .../pdf-2}/src/main/resources/pdfsample.pdf | 0 .../pdfinfo/PdfInfoITextUnitTest.java | 0 .../pdfinfo/PdfInfoPdfBoxUnitTest.java | 0 .../pdf-2}/src/test/resources/input.pdf | Bin .../pdf}/.gitignore | 0 .../pdf}/README.md | 0 .../pdf}/input.docx | Bin .../pdf}/output.pdf | Bin .../pdf}/pom.xml | 2 +- .../pdf}/sample.pdf | Bin .../com/baeldung/pdf/DocxToPDFExample.java | 0 .../com/baeldung/pdf/PDF2HTMLExample.java | 0 .../com/baeldung/pdf/PDF2ImageExample.java | 0 .../com/baeldung/pdf/PDF2TextExample.java | 0 .../com/baeldung/pdf/PDF2WordExample.java | 0 .../java/com/baeldung/pdf/PDFSampleMain.java | 0 .../pdf/openpdf/CustomElementFactoryImpl.java | 0 .../openpdf/Html2PdfUsingFlyingSaucer.java | 0 .../pdf/openpdf/Html2PdfUsingOpenHtml.java | 0 .../pdfthymeleaf/PDFThymeleafExample.java | 0 .../pdf}/src/main/resources/Java_logo.png | Bin .../pdf}/src/main/resources/html.html | 0 .../pdf}/src/main/resources/html2pdf.pdf | Bin .../src/main/resources/htmlforopenpdf.html | 0 .../pdf}/src/main/resources/logback.xml | 0 .../pdf}/src/main/resources/pdf.pdf | Bin .../pdf}/src/main/resources/style.css | 0 .../main/resources/thymeleaf_template.html | 0 .../pdf}/src/main/resources/txt.txt | 0 .../pdf/base64/EncodeDecodeUnitTest.java | 0 .../pdfreadertest/ReadPdfFileUnitTest.java | 0 .../pdfthymeleaf/PDFThymeleafUnitTest.java | 0 .../pdf}/src/test/resources/input.pdf | Bin .../pdf}/src/test/resources/output.pdf | Bin text-processing-libraries-modules/pom.xml | 24 +++ 78 files changed, 208 insertions(+), 189 deletions(-) create mode 100644 text-processing-libraries-modules/README.md rename {antlr => text-processing-libraries-modules/antlr}/README.md (100%) rename {antlr => text-processing-libraries-modules/antlr}/pom.xml (96%) rename {antlr => text-processing-libraries-modules/antlr}/src/main/antlr4/com/baeldung/antlr/Java8.g4 (100%) rename {antlr => text-processing-libraries-modules/antlr}/src/main/antlr4/com/baeldung/antlr/Log.g4 (100%) rename {antlr => text-processing-libraries-modules/antlr}/src/main/java/com/baeldung/antlr/java/UppercaseMethodListener.java (100%) rename {antlr => text-processing-libraries-modules/antlr}/src/main/java/com/baeldung/antlr/log/LogListener.java (100%) rename {antlr => text-processing-libraries-modules/antlr}/src/main/java/com/baeldung/antlr/log/model/LogEntry.java (100%) rename {antlr => text-processing-libraries-modules/antlr}/src/main/java/com/baeldung/antlr/log/model/LogLevel.java (100%) rename {antlr => text-processing-libraries-modules/antlr}/src/main/resources/logback.xml (100%) rename {antlr => text-processing-libraries-modules/antlr}/src/test/java/com/baeldung/antlr/JavaParserUnitTest.java (100%) rename {antlr => text-processing-libraries-modules/antlr}/src/test/java/com/baeldung/antlr/LogParserUnitTest.java (100%) rename {apache-tika => text-processing-libraries-modules/apache-tika}/README.md (100%) rename {apache-tika => text-processing-libraries-modules/apache-tika}/pom.xml (92%) rename {apache-tika => text-processing-libraries-modules/apache-tika}/src/main/java/com/baeldung/tika/TikaAnalysis.java (100%) rename {apache-tika => text-processing-libraries-modules/apache-tika}/src/main/resources/logback.xml (100%) rename {apache-tika => text-processing-libraries-modules/apache-tika}/src/test/java/com/baeldung/tika/TikaUnitTest.java (100%) rename {apache-tika => text-processing-libraries-modules/apache-tika}/src/test/resources/tika.docx (100%) rename {apache-tika => text-processing-libraries-modules/apache-tika}/src/test/resources/tika.txt (100%) rename {apache-tika => text-processing-libraries-modules/apache-tika}/src/test/resources/tika.xlsx (100%) rename {asciidoctor => text-processing-libraries-modules/asciidoctor}/README.md (100%) rename {asciidoctor => text-processing-libraries-modules/asciidoctor}/log4j.properties (100%) rename {asciidoctor => text-processing-libraries-modules/asciidoctor}/pom.xml (97%) rename {asciidoctor => text-processing-libraries-modules/asciidoctor}/src/docs/asciidoc/test.adoc (100%) rename {asciidoctor => text-processing-libraries-modules/asciidoctor}/src/main/java/com/baeldung/asciidoctor/AsciidoctorDemo.java (100%) rename {asciidoctor => text-processing-libraries-modules/asciidoctor}/src/main/resources/logback.xml (100%) rename {asciidoctor => text-processing-libraries-modules/asciidoctor}/src/test/java/com/baeldung/asciidoctor/AsciidoctorDemoIntegrationTest.java (100%) rename {asciidoctor => text-processing-libraries-modules/asciidoctor}/src/themes/custom-theme.yml (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/README.md (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/pom.xml (97%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/java/com/baeldung/exceltopdf/ExcelToPDFConverter.java (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/java/com/baeldung/pdfedition/PdfContentRemover.java (97%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/java/com/baeldung/pdfedition/PdfEditor.java (97%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/java/com/baeldung/pdfedition/PdfTextReplacement.java (97%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/java/com/baeldung/pdfinfo/PdfInfoIText.java (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/java/com/baeldung/pdfinfo/PdfInfoPdfBox.java (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/resources/baeldung-cleaned.pdf (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/resources/baeldung-fixed.pdf (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/resources/baeldung-modified.pdf (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/resources/baeldung.pdf (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/resources/baeldung.png (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/resources/excelsample.xlsx (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/main/resources/pdfsample.pdf (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/test/java/com/baeldung/pdfinfo/PdfInfoITextUnitTest.java (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/test/java/com/baeldung/pdfinfo/PdfInfoPdfBoxUnitTest.java (100%) rename {pdf-2 => text-processing-libraries-modules/pdf-2}/src/test/resources/input.pdf (100%) rename {pdf => text-processing-libraries-modules/pdf}/.gitignore (100%) rename {pdf => text-processing-libraries-modules/pdf}/README.md (100%) rename {pdf => text-processing-libraries-modules/pdf}/input.docx (100%) rename {pdf => text-processing-libraries-modules/pdf}/output.pdf (100%) rename {pdf => text-processing-libraries-modules/pdf}/pom.xml (98%) rename {pdf => text-processing-libraries-modules/pdf}/sample.pdf (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/java/com/baeldung/pdf/DocxToPDFExample.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/java/com/baeldung/pdf/PDF2HTMLExample.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/java/com/baeldung/pdf/PDF2ImageExample.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/java/com/baeldung/pdf/PDF2TextExample.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/java/com/baeldung/pdf/PDF2WordExample.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/java/com/baeldung/pdf/PDFSampleMain.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/java/com/baeldung/pdf/openpdf/CustomElementFactoryImpl.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/java/com/baeldung/pdf/openpdf/Html2PdfUsingFlyingSaucer.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/java/com/baeldung/pdf/openpdf/Html2PdfUsingOpenHtml.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/java/com/baeldung/pdfthymeleaf/PDFThymeleafExample.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/resources/Java_logo.png (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/resources/html.html (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/resources/html2pdf.pdf (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/resources/htmlforopenpdf.html (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/resources/logback.xml (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/resources/pdf.pdf (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/resources/style.css (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/resources/thymeleaf_template.html (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/main/resources/txt.txt (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/test/java/com/baeldung/pdf/base64/EncodeDecodeUnitTest.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/test/java/com/baeldung/pdfreadertest/ReadPdfFileUnitTest.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/test/java/com/baeldung/pdfthymeleaf/PDFThymeleafUnitTest.java (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/test/resources/input.pdf (100%) rename {pdf => text-processing-libraries-modules/pdf}/src/test/resources/output.pdf (100%) create mode 100644 text-processing-libraries-modules/pom.xml diff --git a/pom.xml b/pom.xml index e8b8648cf9..69049d5402 100644 --- a/pom.xml +++ b/pom.xml @@ -686,7 +686,6 @@ akka-modules algorithms-modules - antlr apache-cxf-modules apache-httpclient-2 apache-httpclient4 @@ -700,9 +699,7 @@ apache-poi-3 apache-poi apache-thrift - apache-tika apache-velocity - asciidoctor atomix aws-modules azure @@ -813,8 +810,6 @@ osgi parent-boot-3 patterns-modules - pdf-2 - pdf performance-tests persistence-modules @@ -896,6 +891,7 @@ tensorflow-java testing-modules testing-modules/mockito-simple + text-processing-libraries-modules timefold-solver vaadin vavr-modules @@ -940,7 +936,6 @@ akka-modules algorithms-modules - antlr apache-cxf-modules apache-httpclient-2 apache-httpclient4 @@ -954,9 +949,7 @@ apache-poi-3 apache-poi apache-thrift - apache-tika apache-velocity - asciidoctor atomix aws-modules azure @@ -1067,8 +1060,6 @@ osgi parent-boot-3 patterns-modules - pdf-2 - pdf performance-tests persistence-modules persistence-modules/spring-data-neo4j @@ -1148,6 +1139,7 @@ tensorflow-java testing-modules testing-modules/mockito-simple + text-processing-libraries-modules timefold-solver vaadin vavr-modules diff --git a/text-processing-libraries-modules/README.md b/text-processing-libraries-modules/README.md new file mode 100644 index 0000000000..1b21f540a3 --- /dev/null +++ b/text-processing-libraries-modules/README.md @@ -0,0 +1,3 @@ +## Text Processing Libraries + +This module contains modules about Text Processing Libraries. \ No newline at end of file diff --git a/antlr/README.md b/text-processing-libraries-modules/antlr/README.md similarity index 100% rename from antlr/README.md rename to text-processing-libraries-modules/antlr/README.md diff --git a/antlr/pom.xml b/text-processing-libraries-modules/antlr/pom.xml similarity index 96% rename from antlr/pom.xml rename to text-processing-libraries-modules/antlr/pom.xml index f9d6fb1a08..a7cf39eb44 100644 --- a/antlr/pom.xml +++ b/text-processing-libraries-modules/antlr/pom.xml @@ -8,7 +8,7 @@ com.baeldung - parent-modules + text-processing-libraries-modules 1.0.0-SNAPSHOT diff --git a/antlr/src/main/antlr4/com/baeldung/antlr/Java8.g4 b/text-processing-libraries-modules/antlr/src/main/antlr4/com/baeldung/antlr/Java8.g4 similarity index 100% rename from antlr/src/main/antlr4/com/baeldung/antlr/Java8.g4 rename to text-processing-libraries-modules/antlr/src/main/antlr4/com/baeldung/antlr/Java8.g4 diff --git a/antlr/src/main/antlr4/com/baeldung/antlr/Log.g4 b/text-processing-libraries-modules/antlr/src/main/antlr4/com/baeldung/antlr/Log.g4 similarity index 100% rename from antlr/src/main/antlr4/com/baeldung/antlr/Log.g4 rename to text-processing-libraries-modules/antlr/src/main/antlr4/com/baeldung/antlr/Log.g4 diff --git a/antlr/src/main/java/com/baeldung/antlr/java/UppercaseMethodListener.java b/text-processing-libraries-modules/antlr/src/main/java/com/baeldung/antlr/java/UppercaseMethodListener.java similarity index 100% rename from antlr/src/main/java/com/baeldung/antlr/java/UppercaseMethodListener.java rename to text-processing-libraries-modules/antlr/src/main/java/com/baeldung/antlr/java/UppercaseMethodListener.java diff --git a/antlr/src/main/java/com/baeldung/antlr/log/LogListener.java b/text-processing-libraries-modules/antlr/src/main/java/com/baeldung/antlr/log/LogListener.java similarity index 100% rename from antlr/src/main/java/com/baeldung/antlr/log/LogListener.java rename to text-processing-libraries-modules/antlr/src/main/java/com/baeldung/antlr/log/LogListener.java diff --git a/antlr/src/main/java/com/baeldung/antlr/log/model/LogEntry.java b/text-processing-libraries-modules/antlr/src/main/java/com/baeldung/antlr/log/model/LogEntry.java similarity index 100% rename from antlr/src/main/java/com/baeldung/antlr/log/model/LogEntry.java rename to text-processing-libraries-modules/antlr/src/main/java/com/baeldung/antlr/log/model/LogEntry.java diff --git a/antlr/src/main/java/com/baeldung/antlr/log/model/LogLevel.java b/text-processing-libraries-modules/antlr/src/main/java/com/baeldung/antlr/log/model/LogLevel.java similarity index 100% rename from antlr/src/main/java/com/baeldung/antlr/log/model/LogLevel.java rename to text-processing-libraries-modules/antlr/src/main/java/com/baeldung/antlr/log/model/LogLevel.java diff --git a/antlr/src/main/resources/logback.xml b/text-processing-libraries-modules/antlr/src/main/resources/logback.xml similarity index 100% rename from antlr/src/main/resources/logback.xml rename to text-processing-libraries-modules/antlr/src/main/resources/logback.xml diff --git a/antlr/src/test/java/com/baeldung/antlr/JavaParserUnitTest.java b/text-processing-libraries-modules/antlr/src/test/java/com/baeldung/antlr/JavaParserUnitTest.java similarity index 100% rename from antlr/src/test/java/com/baeldung/antlr/JavaParserUnitTest.java rename to text-processing-libraries-modules/antlr/src/test/java/com/baeldung/antlr/JavaParserUnitTest.java diff --git a/antlr/src/test/java/com/baeldung/antlr/LogParserUnitTest.java b/text-processing-libraries-modules/antlr/src/test/java/com/baeldung/antlr/LogParserUnitTest.java similarity index 100% rename from antlr/src/test/java/com/baeldung/antlr/LogParserUnitTest.java rename to text-processing-libraries-modules/antlr/src/test/java/com/baeldung/antlr/LogParserUnitTest.java diff --git a/apache-tika/README.md b/text-processing-libraries-modules/apache-tika/README.md similarity index 100% rename from apache-tika/README.md rename to text-processing-libraries-modules/apache-tika/README.md diff --git a/apache-tika/pom.xml b/text-processing-libraries-modules/apache-tika/pom.xml similarity index 92% rename from apache-tika/pom.xml rename to text-processing-libraries-modules/apache-tika/pom.xml index 896b88ec4b..f48fe34e25 100644 --- a/apache-tika/pom.xml +++ b/text-processing-libraries-modules/apache-tika/pom.xml @@ -9,7 +9,7 @@ com.baeldung - parent-modules + text-processing-libraries-modules 1.0.0-SNAPSHOT diff --git a/apache-tika/src/main/java/com/baeldung/tika/TikaAnalysis.java b/text-processing-libraries-modules/apache-tika/src/main/java/com/baeldung/tika/TikaAnalysis.java similarity index 100% rename from apache-tika/src/main/java/com/baeldung/tika/TikaAnalysis.java rename to text-processing-libraries-modules/apache-tika/src/main/java/com/baeldung/tika/TikaAnalysis.java diff --git a/apache-tika/src/main/resources/logback.xml b/text-processing-libraries-modules/apache-tika/src/main/resources/logback.xml similarity index 100% rename from apache-tika/src/main/resources/logback.xml rename to text-processing-libraries-modules/apache-tika/src/main/resources/logback.xml diff --git a/apache-tika/src/test/java/com/baeldung/tika/TikaUnitTest.java b/text-processing-libraries-modules/apache-tika/src/test/java/com/baeldung/tika/TikaUnitTest.java similarity index 100% rename from apache-tika/src/test/java/com/baeldung/tika/TikaUnitTest.java rename to text-processing-libraries-modules/apache-tika/src/test/java/com/baeldung/tika/TikaUnitTest.java diff --git a/apache-tika/src/test/resources/tika.docx b/text-processing-libraries-modules/apache-tika/src/test/resources/tika.docx similarity index 100% rename from apache-tika/src/test/resources/tika.docx rename to text-processing-libraries-modules/apache-tika/src/test/resources/tika.docx diff --git a/apache-tika/src/test/resources/tika.txt b/text-processing-libraries-modules/apache-tika/src/test/resources/tika.txt similarity index 100% rename from apache-tika/src/test/resources/tika.txt rename to text-processing-libraries-modules/apache-tika/src/test/resources/tika.txt diff --git a/apache-tika/src/test/resources/tika.xlsx b/text-processing-libraries-modules/apache-tika/src/test/resources/tika.xlsx similarity index 100% rename from apache-tika/src/test/resources/tika.xlsx rename to text-processing-libraries-modules/apache-tika/src/test/resources/tika.xlsx diff --git a/asciidoctor/README.md b/text-processing-libraries-modules/asciidoctor/README.md similarity index 100% rename from asciidoctor/README.md rename to text-processing-libraries-modules/asciidoctor/README.md diff --git a/asciidoctor/log4j.properties b/text-processing-libraries-modules/asciidoctor/log4j.properties similarity index 100% rename from asciidoctor/log4j.properties rename to text-processing-libraries-modules/asciidoctor/log4j.properties diff --git a/asciidoctor/pom.xml b/text-processing-libraries-modules/asciidoctor/pom.xml similarity index 97% rename from asciidoctor/pom.xml rename to text-processing-libraries-modules/asciidoctor/pom.xml index b72f050379..2ebe9d2f0d 100644 --- a/asciidoctor/pom.xml +++ b/text-processing-libraries-modules/asciidoctor/pom.xml @@ -8,7 +8,7 @@ com.baeldung - parent-modules + text-processing-libraries-modules 1.0.0-SNAPSHOT diff --git a/asciidoctor/src/docs/asciidoc/test.adoc b/text-processing-libraries-modules/asciidoctor/src/docs/asciidoc/test.adoc similarity index 100% rename from asciidoctor/src/docs/asciidoc/test.adoc rename to text-processing-libraries-modules/asciidoctor/src/docs/asciidoc/test.adoc diff --git a/asciidoctor/src/main/java/com/baeldung/asciidoctor/AsciidoctorDemo.java b/text-processing-libraries-modules/asciidoctor/src/main/java/com/baeldung/asciidoctor/AsciidoctorDemo.java similarity index 100% rename from asciidoctor/src/main/java/com/baeldung/asciidoctor/AsciidoctorDemo.java rename to text-processing-libraries-modules/asciidoctor/src/main/java/com/baeldung/asciidoctor/AsciidoctorDemo.java diff --git a/asciidoctor/src/main/resources/logback.xml b/text-processing-libraries-modules/asciidoctor/src/main/resources/logback.xml similarity index 100% rename from asciidoctor/src/main/resources/logback.xml rename to text-processing-libraries-modules/asciidoctor/src/main/resources/logback.xml diff --git a/asciidoctor/src/test/java/com/baeldung/asciidoctor/AsciidoctorDemoIntegrationTest.java b/text-processing-libraries-modules/asciidoctor/src/test/java/com/baeldung/asciidoctor/AsciidoctorDemoIntegrationTest.java similarity index 100% rename from asciidoctor/src/test/java/com/baeldung/asciidoctor/AsciidoctorDemoIntegrationTest.java rename to text-processing-libraries-modules/asciidoctor/src/test/java/com/baeldung/asciidoctor/AsciidoctorDemoIntegrationTest.java diff --git a/asciidoctor/src/themes/custom-theme.yml b/text-processing-libraries-modules/asciidoctor/src/themes/custom-theme.yml similarity index 100% rename from asciidoctor/src/themes/custom-theme.yml rename to text-processing-libraries-modules/asciidoctor/src/themes/custom-theme.yml diff --git a/pdf-2/README.md b/text-processing-libraries-modules/pdf-2/README.md similarity index 100% rename from pdf-2/README.md rename to text-processing-libraries-modules/pdf-2/README.md diff --git a/pdf-2/pom.xml b/text-processing-libraries-modules/pdf-2/pom.xml similarity index 97% rename from pdf-2/pom.xml rename to text-processing-libraries-modules/pdf-2/pom.xml index 430cacbfca..9058e5e634 100644 --- a/pdf-2/pom.xml +++ b/text-processing-libraries-modules/pdf-2/pom.xml @@ -9,7 +9,7 @@ com.baeldung - parent-modules + text-processing-libraries-modules 1.0.0-SNAPSHOT diff --git a/pdf-2/src/main/java/com/baeldung/exceltopdf/ExcelToPDFConverter.java b/text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/exceltopdf/ExcelToPDFConverter.java similarity index 100% rename from pdf-2/src/main/java/com/baeldung/exceltopdf/ExcelToPDFConverter.java rename to text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/exceltopdf/ExcelToPDFConverter.java diff --git a/pdf-2/src/main/java/com/baeldung/pdfedition/PdfContentRemover.java b/text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfedition/PdfContentRemover.java similarity index 97% rename from pdf-2/src/main/java/com/baeldung/pdfedition/PdfContentRemover.java rename to text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfedition/PdfContentRemover.java index 62ccdcb51f..36fc498b6b 100644 --- a/pdf-2/src/main/java/com/baeldung/pdfedition/PdfContentRemover.java +++ b/text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfedition/PdfContentRemover.java @@ -1,43 +1,43 @@ -package com.baeldung.pdfedition; - -import java.io.IOException; -import java.util.Arrays; -import java.util.List; - -import com.itextpdf.kernel.geom.Rectangle; -import com.itextpdf.kernel.pdf.PdfDocument; -import com.itextpdf.kernel.pdf.PdfReader; -import com.itextpdf.kernel.pdf.PdfWriter; -import com.itextpdf.pdfcleanup.CleanUpProperties; -import com.itextpdf.pdfcleanup.PdfCleanUpLocation; -import com.itextpdf.pdfcleanup.PdfCleanUpTool; -import com.itextpdf.pdfcleanup.PdfCleaner; -import com.itextpdf.pdfcleanup.autosweep.CompositeCleanupStrategy; -import com.itextpdf.pdfcleanup.autosweep.RegexBasedCleanupStrategy; - -public class PdfContentRemover { - - private static final String SOURCE = "src/main/resources/baeldung-modified.pdf"; - private static final String DESTINATION = "src/main/resources/baeldung-cleaned.pdf"; - - public static void main(String[] args) throws IOException { - PdfReader reader = new PdfReader(SOURCE); - PdfWriter writer = new PdfWriter(DESTINATION); - PdfDocument pdfDocument = new PdfDocument(reader, writer); - removeContentFromDocument(pdfDocument); - pdfDocument.close(); - } - - private static void removeContentFromDocument(PdfDocument pdfDocument) throws IOException { - // 5.1. remove text - CompositeCleanupStrategy strategy = new CompositeCleanupStrategy(); - strategy.add(new RegexBasedCleanupStrategy("Baeldung")); - PdfCleaner.autoSweepCleanUp(pdfDocument, strategy); - - // 5.2. remove other areas - List cleanUpLocations = Arrays.asList(new PdfCleanUpLocation(1, new Rectangle(10, 50, 90, 70)), new PdfCleanUpLocation(2, new Rectangle(35, 400, 100, 35))); - PdfCleanUpTool cleaner = new PdfCleanUpTool(pdfDocument, cleanUpLocations, new CleanUpProperties()); - cleaner.cleanUp(); - } - -} +package com.baeldung.pdfedition; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; + +import com.itextpdf.kernel.geom.Rectangle; +import com.itextpdf.kernel.pdf.PdfDocument; +import com.itextpdf.kernel.pdf.PdfReader; +import com.itextpdf.kernel.pdf.PdfWriter; +import com.itextpdf.pdfcleanup.CleanUpProperties; +import com.itextpdf.pdfcleanup.PdfCleanUpLocation; +import com.itextpdf.pdfcleanup.PdfCleanUpTool; +import com.itextpdf.pdfcleanup.PdfCleaner; +import com.itextpdf.pdfcleanup.autosweep.CompositeCleanupStrategy; +import com.itextpdf.pdfcleanup.autosweep.RegexBasedCleanupStrategy; + +public class PdfContentRemover { + + private static final String SOURCE = "src/main/resources/baeldung-modified.pdf"; + private static final String DESTINATION = "src/main/resources/baeldung-cleaned.pdf"; + + public static void main(String[] args) throws IOException { + PdfReader reader = new PdfReader(SOURCE); + PdfWriter writer = new PdfWriter(DESTINATION); + PdfDocument pdfDocument = new PdfDocument(reader, writer); + removeContentFromDocument(pdfDocument); + pdfDocument.close(); + } + + private static void removeContentFromDocument(PdfDocument pdfDocument) throws IOException { + // 5.1. remove text + CompositeCleanupStrategy strategy = new CompositeCleanupStrategy(); + strategy.add(new RegexBasedCleanupStrategy("Baeldung")); + PdfCleaner.autoSweepCleanUp(pdfDocument, strategy); + + // 5.2. remove other areas + List cleanUpLocations = Arrays.asList(new PdfCleanUpLocation(1, new Rectangle(10, 50, 90, 70)), new PdfCleanUpLocation(2, new Rectangle(35, 400, 100, 35))); + PdfCleanUpTool cleaner = new PdfCleanUpTool(pdfDocument, cleanUpLocations, new CleanUpProperties()); + cleaner.cleanUp(); + } + +} diff --git a/pdf-2/src/main/java/com/baeldung/pdfedition/PdfEditor.java b/text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfedition/PdfEditor.java similarity index 97% rename from pdf-2/src/main/java/com/baeldung/pdfedition/PdfEditor.java rename to text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfedition/PdfEditor.java index cfdf5917b8..94bf6ae0d6 100644 --- a/pdf-2/src/main/java/com/baeldung/pdfedition/PdfEditor.java +++ b/text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfedition/PdfEditor.java @@ -1,86 +1,86 @@ -package com.baeldung.pdfedition; - -import java.io.IOException; -import java.net.MalformedURLException; - -import com.itextpdf.forms.PdfAcroForm; -import com.itextpdf.forms.fields.PdfFormField; -import com.itextpdf.forms.fields.PdfTextFormField; -import com.itextpdf.io.image.ImageData; -import com.itextpdf.io.image.ImageDataFactory; -import com.itextpdf.kernel.geom.Rectangle; -import com.itextpdf.kernel.pdf.PdfDocument; -import com.itextpdf.kernel.pdf.PdfReader; -import com.itextpdf.kernel.pdf.PdfString; -import com.itextpdf.kernel.pdf.PdfWriter; -import com.itextpdf.kernel.pdf.annot.PdfAnnotation; -import com.itextpdf.kernel.pdf.annot.PdfTextAnnotation; -import com.itextpdf.layout.Document; -import com.itextpdf.layout.element.Image; -import com.itextpdf.layout.element.Paragraph; -import com.itextpdf.layout.element.Table; -import com.itextpdf.layout.element.Text; -import com.itextpdf.layout.properties.UnitValue; - -public class PdfEditor { - - private static final String SOURCE = "src/main/resources/baeldung.pdf"; - private static final String DESTINATION = "src/main/resources/baeldung-modified.pdf"; - - public static void main(String[] args) throws IOException { - PdfReader reader = new PdfReader(SOURCE); - PdfWriter writer = new PdfWriter(DESTINATION); - PdfDocument pdfDocument = new PdfDocument(reader, writer); - addContentToDocument(pdfDocument); - } - - private static void addContentToDocument(PdfDocument pdfDocument) throws MalformedURLException { - // 4.1. add form - PdfFormField personal = PdfFormField.createEmptyField(pdfDocument); - personal.setFieldName("information"); - PdfTextFormField name = PdfFormField.createText(pdfDocument, new Rectangle(35, 400, 100, 30), "name", ""); - personal.addKid(name); - PdfAcroForm.getAcroForm(pdfDocument, true) - .addField(personal, pdfDocument.getFirstPage()); - - // 4.2. add new page - pdfDocument.addNewPage(1); - - // 4.3. add annotation - PdfAnnotation ann = new PdfTextAnnotation(new Rectangle(40, 435, 0, 0)).setTitle(new PdfString("name")) - .setContents("Your name"); - pdfDocument.getPage(2) - .addAnnotation(ann); - - // create document form pdf document - Document document = new Document(pdfDocument); - - // 4.4. add an image - ImageData imageData = ImageDataFactory.create("src/main/resources/baeldung.png"); - Image image = new Image(imageData).scaleAbsolute(550, 100) - .setFixedPosition(1, 10, 50); - document.add(image); - - // 4.5. add a paragraph - Text title = new Text("This is a demo").setFontSize(16); - Text author = new Text("Baeldung tutorials."); - Paragraph p = new Paragraph().setFontSize(8) - .add(title) - .add(" from ") - .add(author); - document.add(p); - - // 4.6. add a table - Table table = new Table(UnitValue.createPercentArray(2)); - table.addHeaderCell("#"); - table.addHeaderCell("company"); - table.addCell("name"); - table.addCell("baeldung"); - document.add(table); - - // close the document - // this automatically closes the pdfDocument, which then closes automatically the pdfReader and pdfWriter - document.close(); - } - -} +package com.baeldung.pdfedition; + +import java.io.IOException; +import java.net.MalformedURLException; + +import com.itextpdf.forms.PdfAcroForm; +import com.itextpdf.forms.fields.PdfFormField; +import com.itextpdf.forms.fields.PdfTextFormField; +import com.itextpdf.io.image.ImageData; +import com.itextpdf.io.image.ImageDataFactory; +import com.itextpdf.kernel.geom.Rectangle; +import com.itextpdf.kernel.pdf.PdfDocument; +import com.itextpdf.kernel.pdf.PdfReader; +import com.itextpdf.kernel.pdf.PdfString; +import com.itextpdf.kernel.pdf.PdfWriter; +import com.itextpdf.kernel.pdf.annot.PdfAnnotation; +import com.itextpdf.kernel.pdf.annot.PdfTextAnnotation; +import com.itextpdf.layout.Document; +import com.itextpdf.layout.element.Image; +import com.itextpdf.layout.element.Paragraph; +import com.itextpdf.layout.element.Table; +import com.itextpdf.layout.element.Text; +import com.itextpdf.layout.properties.UnitValue; + +public class PdfEditor { + + private static final String SOURCE = "src/main/resources/baeldung.pdf"; + private static final String DESTINATION = "src/main/resources/baeldung-modified.pdf"; + + public static void main(String[] args) throws IOException { + PdfReader reader = new PdfReader(SOURCE); + PdfWriter writer = new PdfWriter(DESTINATION); + PdfDocument pdfDocument = new PdfDocument(reader, writer); + addContentToDocument(pdfDocument); + } + + private static void addContentToDocument(PdfDocument pdfDocument) throws MalformedURLException { + // 4.1. add form + PdfFormField personal = PdfFormField.createEmptyField(pdfDocument); + personal.setFieldName("information"); + PdfTextFormField name = PdfFormField.createText(pdfDocument, new Rectangle(35, 400, 100, 30), "name", ""); + personal.addKid(name); + PdfAcroForm.getAcroForm(pdfDocument, true) + .addField(personal, pdfDocument.getFirstPage()); + + // 4.2. add new page + pdfDocument.addNewPage(1); + + // 4.3. add annotation + PdfAnnotation ann = new PdfTextAnnotation(new Rectangle(40, 435, 0, 0)).setTitle(new PdfString("name")) + .setContents("Your name"); + pdfDocument.getPage(2) + .addAnnotation(ann); + + // create document form pdf document + Document document = new Document(pdfDocument); + + // 4.4. add an image + ImageData imageData = ImageDataFactory.create("src/main/resources/baeldung.png"); + Image image = new Image(imageData).scaleAbsolute(550, 100) + .setFixedPosition(1, 10, 50); + document.add(image); + + // 4.5. add a paragraph + Text title = new Text("This is a demo").setFontSize(16); + Text author = new Text("Baeldung tutorials."); + Paragraph p = new Paragraph().setFontSize(8) + .add(title) + .add(" from ") + .add(author); + document.add(p); + + // 4.6. add a table + Table table = new Table(UnitValue.createPercentArray(2)); + table.addHeaderCell("#"); + table.addHeaderCell("company"); + table.addCell("name"); + table.addCell("baeldung"); + document.add(table); + + // close the document + // this automatically closes the pdfDocument, which then closes automatically the pdfReader and pdfWriter + document.close(); + } + +} diff --git a/pdf-2/src/main/java/com/baeldung/pdfedition/PdfTextReplacement.java b/text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfedition/PdfTextReplacement.java similarity index 97% rename from pdf-2/src/main/java/com/baeldung/pdfedition/PdfTextReplacement.java rename to text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfedition/PdfTextReplacement.java index e81adff1ec..a1ca449134 100644 --- a/pdf-2/src/main/java/com/baeldung/pdfedition/PdfTextReplacement.java +++ b/text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfedition/PdfTextReplacement.java @@ -1,45 +1,45 @@ -package com.baeldung.pdfedition; - -import java.io.IOException; - -import com.itextpdf.kernel.colors.ColorConstants; -import com.itextpdf.kernel.pdf.PdfDocument; -import com.itextpdf.kernel.pdf.PdfPage; -import com.itextpdf.kernel.pdf.PdfReader; -import com.itextpdf.kernel.pdf.PdfWriter; -import com.itextpdf.kernel.pdf.canvas.PdfCanvas; -import com.itextpdf.kernel.pdf.canvas.parser.listener.IPdfTextLocation; -import com.itextpdf.layout.Canvas; -import com.itextpdf.layout.element.Paragraph; -import com.itextpdf.pdfcleanup.PdfCleaner; -import com.itextpdf.pdfcleanup.autosweep.CompositeCleanupStrategy; -import com.itextpdf.pdfcleanup.autosweep.RegexBasedCleanupStrategy; - -public class PdfTextReplacement { - - private static final String SOURCE = "src/main/resources/baeldung-modified.pdf"; - private static final String DESTINATION = "src/main/resources/baeldung-fixed.pdf"; - - public static void main(String[] args) throws IOException { - PdfReader reader = new PdfReader(SOURCE); - PdfWriter writer = new PdfWriter(DESTINATION); - PdfDocument pdfDocument = new PdfDocument(reader, writer); - replaceTextContentFromDocument(pdfDocument); - pdfDocument.close(); - } - - private static void replaceTextContentFromDocument(PdfDocument pdfDocument) throws IOException { - CompositeCleanupStrategy strategy = new CompositeCleanupStrategy(); - strategy.add(new RegexBasedCleanupStrategy("Baeldung tutorials").setRedactionColor(ColorConstants.WHITE)); - PdfCleaner.autoSweepCleanUp(pdfDocument, strategy); - - for (IPdfTextLocation location : strategy.getResultantLocations()) { - PdfPage page = pdfDocument.getPage(location.getPageNumber() + 1); - PdfCanvas pdfCanvas = new PdfCanvas(page.newContentStreamAfter(), page.getResources(), page.getDocument()); - Canvas canvas = new Canvas(pdfCanvas, location.getRectangle()); - canvas.add(new Paragraph("HIDDEN").setFontSize(8) - .setMarginTop(0f)); - } - } - -} +package com.baeldung.pdfedition; + +import java.io.IOException; + +import com.itextpdf.kernel.colors.ColorConstants; +import com.itextpdf.kernel.pdf.PdfDocument; +import com.itextpdf.kernel.pdf.PdfPage; +import com.itextpdf.kernel.pdf.PdfReader; +import com.itextpdf.kernel.pdf.PdfWriter; +import com.itextpdf.kernel.pdf.canvas.PdfCanvas; +import com.itextpdf.kernel.pdf.canvas.parser.listener.IPdfTextLocation; +import com.itextpdf.layout.Canvas; +import com.itextpdf.layout.element.Paragraph; +import com.itextpdf.pdfcleanup.PdfCleaner; +import com.itextpdf.pdfcleanup.autosweep.CompositeCleanupStrategy; +import com.itextpdf.pdfcleanup.autosweep.RegexBasedCleanupStrategy; + +public class PdfTextReplacement { + + private static final String SOURCE = "src/main/resources/baeldung-modified.pdf"; + private static final String DESTINATION = "src/main/resources/baeldung-fixed.pdf"; + + public static void main(String[] args) throws IOException { + PdfReader reader = new PdfReader(SOURCE); + PdfWriter writer = new PdfWriter(DESTINATION); + PdfDocument pdfDocument = new PdfDocument(reader, writer); + replaceTextContentFromDocument(pdfDocument); + pdfDocument.close(); + } + + private static void replaceTextContentFromDocument(PdfDocument pdfDocument) throws IOException { + CompositeCleanupStrategy strategy = new CompositeCleanupStrategy(); + strategy.add(new RegexBasedCleanupStrategy("Baeldung tutorials").setRedactionColor(ColorConstants.WHITE)); + PdfCleaner.autoSweepCleanUp(pdfDocument, strategy); + + for (IPdfTextLocation location : strategy.getResultantLocations()) { + PdfPage page = pdfDocument.getPage(location.getPageNumber() + 1); + PdfCanvas pdfCanvas = new PdfCanvas(page.newContentStreamAfter(), page.getResources(), page.getDocument()); + Canvas canvas = new Canvas(pdfCanvas, location.getRectangle()); + canvas.add(new Paragraph("HIDDEN").setFontSize(8) + .setMarginTop(0f)); + } + } + +} diff --git a/pdf-2/src/main/java/com/baeldung/pdfinfo/PdfInfoIText.java b/text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfinfo/PdfInfoIText.java similarity index 100% rename from pdf-2/src/main/java/com/baeldung/pdfinfo/PdfInfoIText.java rename to text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfinfo/PdfInfoIText.java diff --git a/pdf-2/src/main/java/com/baeldung/pdfinfo/PdfInfoPdfBox.java b/text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfinfo/PdfInfoPdfBox.java similarity index 100% rename from pdf-2/src/main/java/com/baeldung/pdfinfo/PdfInfoPdfBox.java rename to text-processing-libraries-modules/pdf-2/src/main/java/com/baeldung/pdfinfo/PdfInfoPdfBox.java diff --git a/pdf-2/src/main/resources/baeldung-cleaned.pdf b/text-processing-libraries-modules/pdf-2/src/main/resources/baeldung-cleaned.pdf similarity index 100% rename from pdf-2/src/main/resources/baeldung-cleaned.pdf rename to text-processing-libraries-modules/pdf-2/src/main/resources/baeldung-cleaned.pdf diff --git a/pdf-2/src/main/resources/baeldung-fixed.pdf b/text-processing-libraries-modules/pdf-2/src/main/resources/baeldung-fixed.pdf similarity index 100% rename from pdf-2/src/main/resources/baeldung-fixed.pdf rename to text-processing-libraries-modules/pdf-2/src/main/resources/baeldung-fixed.pdf diff --git a/pdf-2/src/main/resources/baeldung-modified.pdf b/text-processing-libraries-modules/pdf-2/src/main/resources/baeldung-modified.pdf similarity index 100% rename from pdf-2/src/main/resources/baeldung-modified.pdf rename to text-processing-libraries-modules/pdf-2/src/main/resources/baeldung-modified.pdf diff --git a/pdf-2/src/main/resources/baeldung.pdf b/text-processing-libraries-modules/pdf-2/src/main/resources/baeldung.pdf similarity index 100% rename from pdf-2/src/main/resources/baeldung.pdf rename to text-processing-libraries-modules/pdf-2/src/main/resources/baeldung.pdf diff --git a/pdf-2/src/main/resources/baeldung.png b/text-processing-libraries-modules/pdf-2/src/main/resources/baeldung.png similarity index 100% rename from pdf-2/src/main/resources/baeldung.png rename to text-processing-libraries-modules/pdf-2/src/main/resources/baeldung.png diff --git a/pdf-2/src/main/resources/excelsample.xlsx b/text-processing-libraries-modules/pdf-2/src/main/resources/excelsample.xlsx similarity index 100% rename from pdf-2/src/main/resources/excelsample.xlsx rename to text-processing-libraries-modules/pdf-2/src/main/resources/excelsample.xlsx diff --git a/pdf-2/src/main/resources/pdfsample.pdf b/text-processing-libraries-modules/pdf-2/src/main/resources/pdfsample.pdf similarity index 100% rename from pdf-2/src/main/resources/pdfsample.pdf rename to text-processing-libraries-modules/pdf-2/src/main/resources/pdfsample.pdf diff --git a/pdf-2/src/test/java/com/baeldung/pdfinfo/PdfInfoITextUnitTest.java b/text-processing-libraries-modules/pdf-2/src/test/java/com/baeldung/pdfinfo/PdfInfoITextUnitTest.java similarity index 100% rename from pdf-2/src/test/java/com/baeldung/pdfinfo/PdfInfoITextUnitTest.java rename to text-processing-libraries-modules/pdf-2/src/test/java/com/baeldung/pdfinfo/PdfInfoITextUnitTest.java diff --git a/pdf-2/src/test/java/com/baeldung/pdfinfo/PdfInfoPdfBoxUnitTest.java b/text-processing-libraries-modules/pdf-2/src/test/java/com/baeldung/pdfinfo/PdfInfoPdfBoxUnitTest.java similarity index 100% rename from pdf-2/src/test/java/com/baeldung/pdfinfo/PdfInfoPdfBoxUnitTest.java rename to text-processing-libraries-modules/pdf-2/src/test/java/com/baeldung/pdfinfo/PdfInfoPdfBoxUnitTest.java diff --git a/pdf-2/src/test/resources/input.pdf b/text-processing-libraries-modules/pdf-2/src/test/resources/input.pdf similarity index 100% rename from pdf-2/src/test/resources/input.pdf rename to text-processing-libraries-modules/pdf-2/src/test/resources/input.pdf diff --git a/pdf/.gitignore b/text-processing-libraries-modules/pdf/.gitignore similarity index 100% rename from pdf/.gitignore rename to text-processing-libraries-modules/pdf/.gitignore diff --git a/pdf/README.md b/text-processing-libraries-modules/pdf/README.md similarity index 100% rename from pdf/README.md rename to text-processing-libraries-modules/pdf/README.md diff --git a/pdf/input.docx b/text-processing-libraries-modules/pdf/input.docx similarity index 100% rename from pdf/input.docx rename to text-processing-libraries-modules/pdf/input.docx diff --git a/pdf/output.pdf b/text-processing-libraries-modules/pdf/output.pdf similarity index 100% rename from pdf/output.pdf rename to text-processing-libraries-modules/pdf/output.pdf diff --git a/pdf/pom.xml b/text-processing-libraries-modules/pdf/pom.xml similarity index 98% rename from pdf/pom.xml rename to text-processing-libraries-modules/pdf/pom.xml index 041f356b9a..b5de19f815 100644 --- a/pdf/pom.xml +++ b/text-processing-libraries-modules/pdf/pom.xml @@ -9,7 +9,7 @@ com.baeldung - parent-modules + text-processing-libraries-modules 1.0.0-SNAPSHOT diff --git a/pdf/sample.pdf b/text-processing-libraries-modules/pdf/sample.pdf similarity index 100% rename from pdf/sample.pdf rename to text-processing-libraries-modules/pdf/sample.pdf diff --git a/pdf/src/main/java/com/baeldung/pdf/DocxToPDFExample.java b/text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/DocxToPDFExample.java similarity index 100% rename from pdf/src/main/java/com/baeldung/pdf/DocxToPDFExample.java rename to text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/DocxToPDFExample.java diff --git a/pdf/src/main/java/com/baeldung/pdf/PDF2HTMLExample.java b/text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/PDF2HTMLExample.java similarity index 100% rename from pdf/src/main/java/com/baeldung/pdf/PDF2HTMLExample.java rename to text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/PDF2HTMLExample.java diff --git a/pdf/src/main/java/com/baeldung/pdf/PDF2ImageExample.java b/text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/PDF2ImageExample.java similarity index 100% rename from pdf/src/main/java/com/baeldung/pdf/PDF2ImageExample.java rename to text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/PDF2ImageExample.java diff --git a/pdf/src/main/java/com/baeldung/pdf/PDF2TextExample.java b/text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/PDF2TextExample.java similarity index 100% rename from pdf/src/main/java/com/baeldung/pdf/PDF2TextExample.java rename to text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/PDF2TextExample.java diff --git a/pdf/src/main/java/com/baeldung/pdf/PDF2WordExample.java b/text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/PDF2WordExample.java similarity index 100% rename from pdf/src/main/java/com/baeldung/pdf/PDF2WordExample.java rename to text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/PDF2WordExample.java diff --git a/pdf/src/main/java/com/baeldung/pdf/PDFSampleMain.java b/text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/PDFSampleMain.java similarity index 100% rename from pdf/src/main/java/com/baeldung/pdf/PDFSampleMain.java rename to text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/PDFSampleMain.java diff --git a/pdf/src/main/java/com/baeldung/pdf/openpdf/CustomElementFactoryImpl.java b/text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/openpdf/CustomElementFactoryImpl.java similarity index 100% rename from pdf/src/main/java/com/baeldung/pdf/openpdf/CustomElementFactoryImpl.java rename to text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/openpdf/CustomElementFactoryImpl.java diff --git a/pdf/src/main/java/com/baeldung/pdf/openpdf/Html2PdfUsingFlyingSaucer.java b/text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/openpdf/Html2PdfUsingFlyingSaucer.java similarity index 100% rename from pdf/src/main/java/com/baeldung/pdf/openpdf/Html2PdfUsingFlyingSaucer.java rename to text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/openpdf/Html2PdfUsingFlyingSaucer.java diff --git a/pdf/src/main/java/com/baeldung/pdf/openpdf/Html2PdfUsingOpenHtml.java b/text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/openpdf/Html2PdfUsingOpenHtml.java similarity index 100% rename from pdf/src/main/java/com/baeldung/pdf/openpdf/Html2PdfUsingOpenHtml.java rename to text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdf/openpdf/Html2PdfUsingOpenHtml.java diff --git a/pdf/src/main/java/com/baeldung/pdfthymeleaf/PDFThymeleafExample.java b/text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdfthymeleaf/PDFThymeleafExample.java similarity index 100% rename from pdf/src/main/java/com/baeldung/pdfthymeleaf/PDFThymeleafExample.java rename to text-processing-libraries-modules/pdf/src/main/java/com/baeldung/pdfthymeleaf/PDFThymeleafExample.java diff --git a/pdf/src/main/resources/Java_logo.png b/text-processing-libraries-modules/pdf/src/main/resources/Java_logo.png similarity index 100% rename from pdf/src/main/resources/Java_logo.png rename to text-processing-libraries-modules/pdf/src/main/resources/Java_logo.png diff --git a/pdf/src/main/resources/html.html b/text-processing-libraries-modules/pdf/src/main/resources/html.html similarity index 100% rename from pdf/src/main/resources/html.html rename to text-processing-libraries-modules/pdf/src/main/resources/html.html diff --git a/pdf/src/main/resources/html2pdf.pdf b/text-processing-libraries-modules/pdf/src/main/resources/html2pdf.pdf similarity index 100% rename from pdf/src/main/resources/html2pdf.pdf rename to text-processing-libraries-modules/pdf/src/main/resources/html2pdf.pdf diff --git a/pdf/src/main/resources/htmlforopenpdf.html b/text-processing-libraries-modules/pdf/src/main/resources/htmlforopenpdf.html similarity index 100% rename from pdf/src/main/resources/htmlforopenpdf.html rename to text-processing-libraries-modules/pdf/src/main/resources/htmlforopenpdf.html diff --git a/pdf/src/main/resources/logback.xml b/text-processing-libraries-modules/pdf/src/main/resources/logback.xml similarity index 100% rename from pdf/src/main/resources/logback.xml rename to text-processing-libraries-modules/pdf/src/main/resources/logback.xml diff --git a/pdf/src/main/resources/pdf.pdf b/text-processing-libraries-modules/pdf/src/main/resources/pdf.pdf similarity index 100% rename from pdf/src/main/resources/pdf.pdf rename to text-processing-libraries-modules/pdf/src/main/resources/pdf.pdf diff --git a/pdf/src/main/resources/style.css b/text-processing-libraries-modules/pdf/src/main/resources/style.css similarity index 100% rename from pdf/src/main/resources/style.css rename to text-processing-libraries-modules/pdf/src/main/resources/style.css diff --git a/pdf/src/main/resources/thymeleaf_template.html b/text-processing-libraries-modules/pdf/src/main/resources/thymeleaf_template.html similarity index 100% rename from pdf/src/main/resources/thymeleaf_template.html rename to text-processing-libraries-modules/pdf/src/main/resources/thymeleaf_template.html diff --git a/pdf/src/main/resources/txt.txt b/text-processing-libraries-modules/pdf/src/main/resources/txt.txt similarity index 100% rename from pdf/src/main/resources/txt.txt rename to text-processing-libraries-modules/pdf/src/main/resources/txt.txt diff --git a/pdf/src/test/java/com/baeldung/pdf/base64/EncodeDecodeUnitTest.java b/text-processing-libraries-modules/pdf/src/test/java/com/baeldung/pdf/base64/EncodeDecodeUnitTest.java similarity index 100% rename from pdf/src/test/java/com/baeldung/pdf/base64/EncodeDecodeUnitTest.java rename to text-processing-libraries-modules/pdf/src/test/java/com/baeldung/pdf/base64/EncodeDecodeUnitTest.java diff --git a/pdf/src/test/java/com/baeldung/pdfreadertest/ReadPdfFileUnitTest.java b/text-processing-libraries-modules/pdf/src/test/java/com/baeldung/pdfreadertest/ReadPdfFileUnitTest.java similarity index 100% rename from pdf/src/test/java/com/baeldung/pdfreadertest/ReadPdfFileUnitTest.java rename to text-processing-libraries-modules/pdf/src/test/java/com/baeldung/pdfreadertest/ReadPdfFileUnitTest.java diff --git a/pdf/src/test/java/com/baeldung/pdfthymeleaf/PDFThymeleafUnitTest.java b/text-processing-libraries-modules/pdf/src/test/java/com/baeldung/pdfthymeleaf/PDFThymeleafUnitTest.java similarity index 100% rename from pdf/src/test/java/com/baeldung/pdfthymeleaf/PDFThymeleafUnitTest.java rename to text-processing-libraries-modules/pdf/src/test/java/com/baeldung/pdfthymeleaf/PDFThymeleafUnitTest.java diff --git a/pdf/src/test/resources/input.pdf b/text-processing-libraries-modules/pdf/src/test/resources/input.pdf similarity index 100% rename from pdf/src/test/resources/input.pdf rename to text-processing-libraries-modules/pdf/src/test/resources/input.pdf diff --git a/pdf/src/test/resources/output.pdf b/text-processing-libraries-modules/pdf/src/test/resources/output.pdf similarity index 100% rename from pdf/src/test/resources/output.pdf rename to text-processing-libraries-modules/pdf/src/test/resources/output.pdf diff --git a/text-processing-libraries-modules/pom.xml b/text-processing-libraries-modules/pom.xml new file mode 100644 index 0000000000..a7bb3675eb --- /dev/null +++ b/text-processing-libraries-modules/pom.xml @@ -0,0 +1,24 @@ + + + 4.0.0 + text-processing-libraries-modules + text-processing-libraries-modules + pom + + + parent-modules + com.baeldung + 1.0.0-SNAPSHOT + + + + antlr + apache-tika + asciidoctor + pdf + pdf-2 + + + \ No newline at end of file