Package org.apache.tika.parser.pdf.image
Class ImageGraphicsEngine
java.lang.Object
org.apache.pdfbox.contentstream.PDFStreamEngine
org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
org.apache.tika.parser.pdf.image.ImageGraphicsEngine
public class ImageGraphicsEngine
extends org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
Copied nearly verbatim from PDFBox
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final EmbeddedDocumentExtractorprotected final booleanprotected final AtomicIntegerprotected static final longprotected final intprotected final Metadataprotected final ParseContextprotected final PDFParserConfigprotected booleanprotected final XHTMLContentHandler
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedImageGraphicsEngine(org.apache.pdfbox.pdmodel.PDPage page, int pageNumber, EmbeddedDocumentExtractor embeddedDocumentExtractor, PDFParserConfig pdfParserConfig, Map<org.apache.pdfbox.cos.COSStream, Integer> processedInlineImages, AtomicInteger imageCounter, XHTMLContentHandler xhtml, Metadata parentMetadata, ParseContext parseContext) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidappendRectangle(Point2D p0, Point2D p1, Point2D p2, Point2D p3) voidclip(int windingRule) voidprotected static voidcopyUpToMaxLength(InputStream is, OutputStream os) voidcurveTo(float x1, float y1, float x2, float y2, float x3, float y3) voiddrawImage(org.apache.pdfbox.pdmodel.graphics.image.PDImage pdImage) voidendPath()protected voidextractInlineImageMetadataOnly(org.apache.pdfbox.pdmodel.graphics.image.PDImage pdImage, Metadata metadata) voidfillAndStrokePath(int windingRule) voidfillPath(int windingRule) protected Stringprotected voidprotected static booleanhasMasks(org.apache.pdfbox.pdmodel.graphics.image.PDImage pdImage) voidlineTo(float x, float y) voidmoveTo(float x, float y) protected voidprocessImage(org.apache.pdfbox.pdmodel.graphics.image.PDImage pdImage, int imageNumber) voidrun()voidshadingFill(org.apache.pdfbox.cos.COSName shadingName) protected voidshowGlyph(org.apache.pdfbox.util.Matrix textRenderingMatrix, org.apache.pdfbox.pdmodel.font.PDFont font, int code, org.apache.pdfbox.util.Vector displacement) voidprotected BufferedImagewriteToBuffer(org.apache.pdfbox.pdmodel.graphics.image.PDImage pdImage, String suffix, boolean directJPEG, OutputStream out) Methods inherited from class org.apache.pdfbox.contentstream.PDFGraphicsStreamEnginegetPageMethods inherited from class org.apache.pdfbox.contentstream.PDFStreamEngineaddOperator, applyTextAdjustment, beginMarkedContentSequence, beginText, decreaseLevel, endMarkedContentSequence, endText, getAppearance, getCurrentPage, getGraphicsStackSize, getGraphicsState, getInitialMatrix, getLevel, getResources, getTextLineMatrix, getTextMatrix, increaseLevel, operatorException, processAnnotation, processChildStream, processOperator, processOperator, processPage, processSoftMask, processTilingPattern, processTilingPattern, processTransparencyGroup, processType3Stream, registerOperatorProcessor, restoreGraphicsStack, restoreGraphicsState, saveGraphicsStack, saveGraphicsState, setLineDashPattern, setTextLineMatrix, setTextMatrix, showAnnotation, showFontGlyph, showFontGlyph, showForm, showGlyph, showText, showTextString, showTextStrings, showTransparencyGroup, showType3Glyph, showType3Glyph, transformedPoint, transformWidth, unsupportedOperator
- 
Field Details- 
MAX_IMAGE_LENGTH_BYTESprotected static final long MAX_IMAGE_LENGTH_BYTES- See Also:
 
- 
JPEG
- 
JP2
- 
JB2
- 
pageNumberprotected final int pageNumber
- 
embeddedDocumentExtractor
- 
pdfParserConfig
- 
processedInlineImages
- 
imageCounter
- 
parentMetadata
- 
xhtml
- 
parseContext
- 
extractInlineImageMetadataOnlyprotected final boolean extractInlineImageMetadataOnly
- 
useDirectJPEGprotected boolean useDirectJPEG
 
- 
- 
Constructor Details- 
ImageGraphicsEngineprotected ImageGraphicsEngine(org.apache.pdfbox.pdmodel.PDPage page, int pageNumber, EmbeddedDocumentExtractor embeddedDocumentExtractor, PDFParserConfig pdfParserConfig, Map<org.apache.pdfbox.cos.COSStream, Integer> processedInlineImages, AtomicInteger imageCounter, XHTMLContentHandler xhtml, Metadata parentMetadata, ParseContext parseContext) 
 
- 
- 
Method Details- 
writeToBufferprotected BufferedImage writeToBuffer(org.apache.pdfbox.pdmodel.graphics.image.PDImage pdImage, String suffix, boolean directJPEG, OutputStream out) throws IOException, TikaException - Throws:
- IOException
- TikaException
 
- 
copyUpToMaxLengthprotected static void copyUpToMaxLength(InputStream is, OutputStream os) throws IOException, TikaException - Throws:
- IOException
- TikaException
 
- 
hasMasksprotected static boolean hasMasks(org.apache.pdfbox.pdmodel.graphics.image.PDImage pdImage) throws IOException - Throws:
- IOException
 
- 
run- Throws:
- IOException
 
- 
drawImage- Specified by:
- drawImagein class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
appendRectangle- Specified by:
- appendRectanglein class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
clip- Specified by:
- clipin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
moveTo- Specified by:
- moveToin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
lineTo- Specified by:
- lineToin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
curveTo- Specified by:
- curveToin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
getCurrentPoint- Specified by:
- getCurrentPointin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
closePath- Specified by:
- closePathin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
endPath- Specified by:
- endPathin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
showGlyphprotected void showGlyph(org.apache.pdfbox.util.Matrix textRenderingMatrix, org.apache.pdfbox.pdmodel.font.PDFont font, int code, org.apache.pdfbox.util.Vector displacement) throws IOException - Overrides:
- showGlyphin class- org.apache.pdfbox.contentstream.PDFStreamEngine
- Throws:
- IOException
 
- 
strokePath- Specified by:
- strokePathin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
fillPath- Specified by:
- fillPathin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
fillAndStrokePath- Specified by:
- fillAndStrokePathin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
shadingFill- Specified by:
- shadingFillin class- org.apache.pdfbox.contentstream.PDFGraphicsStreamEngine
- Throws:
- IOException
 
- 
processImageprotected void processImage(org.apache.pdfbox.pdmodel.graphics.image.PDImage pdImage, int imageNumber) throws IOException, TikaException, SAXException - Throws:
- IOException
- TikaException
- SAXException
 
- 
extractInlineImageMetadataOnlyprotected void extractInlineImageMetadataOnly(org.apache.pdfbox.pdmodel.graphics.image.PDImage pdImage, Metadata metadata) throws IOException, SAXException - Throws:
- IOException
- SAXException
 
- 
getSuffixprotected String getSuffix(org.apache.pdfbox.pdmodel.graphics.image.PDImage pdImage, Metadata metadata) throws IOException - Throws:
- IOException
 
- 
handleCatchableIOE- Throws:
- IOException
 
- 
getExceptions
 
-