diff --git a/src/main/java/com/iqser/red/pdftronlogic/commons/InvisibleElementRemovalService.java b/src/main/java/com/iqser/red/pdftronlogic/commons/InvisibleElementRemovalService.java index b9c3abb..13f66e8 100644 --- a/src/main/java/com/iqser/red/pdftronlogic/commons/InvisibleElementRemovalService.java +++ b/src/main/java/com/iqser/red/pdftronlogic/commons/InvisibleElementRemovalService.java @@ -37,6 +37,7 @@ import lombok.extern.slf4j.Slf4j; public class InvisibleElementRemovalService { static public final double TOLERANCE = 1; + public static final String KNECON_OCR = "KNECON_OCR"; /** @@ -86,12 +87,22 @@ public class InvisibleElementRemovalService { } + /** * This method is equal to {@link #removeInvisibleElements(InputStream, OutputStream, boolean, boolean, Set)}, with removePaths == true and markedContentsToIgnore = Set.of("KNECON_OCR"). */ public void removeInvisibleElementsButKeepOcrText(InputStream pdfFile, OutputStream out, boolean delta) { - removeInvisibleElements(pdfFile, out, delta, true, Set.of("KNECON_OCR")); + removeInvisibleElements(pdfFile, out, delta, true, Set.of(KNECON_OCR)); + } + + + /** + * This method is equal to {@link #removeInvisibleElements(InputStream, OutputStream, boolean, boolean, Set)}, with removePaths == true and markedContentsToIgnore = Set.of("KNECON_OCR"). + */ + public void removeInvisibleElementsButKeepOcrText(PDFDoc pdfFile, boolean delta) { + + removeInvisibleElements(pdfFile, delta, true, Set.of(KNECON_OCR)); }