RED-9864: Ocr not working
This commit is contained in:
parent
1862355a01
commit
598ba5cf0c
@ -3,12 +3,10 @@ package com.iqser.red.pdftronlogic.commons;
|
||||
import java.util.Deque;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import com.pdftron.pdf.Element;
|
||||
import com.pdftron.pdf.PDFDoc;
|
||||
import com.pdftron.pdf.ocg.Group;
|
||||
import com.pdftron.sdf.Obj;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@ -15,6 +15,7 @@ import com.pdftron.pdf.Font;
|
||||
import com.pdftron.pdf.GState;
|
||||
import com.pdftron.pdf.Image;
|
||||
import com.pdftron.pdf.PathData;
|
||||
import com.pdftron.sdf.Obj;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.experimental.UtilityClass;
|
||||
@ -72,7 +73,7 @@ public class ElementFeatureFactory {
|
||||
boolean masked = false;
|
||||
if (element.getType() == Element.e_image) {
|
||||
Image image = new Image(element.getXObject());
|
||||
if (image.getMask() != null) {
|
||||
if (image.getMask() != null && image.getMask().getType() == Obj.e_stream) {
|
||||
Image imageMask = new Image(image.getMask());
|
||||
masked = imageMask.isImageMask();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user