Package org.jpedal

Interface PdfDecoderInt

All Known Implementing Classes:
PdfDecoder, PdfDecoderServer

public interface PdfDecoderInt
  • Field Details

    • TEXT

      static final int TEXT
      flag to show extraction mode should include any text
      See Also:
    • RAWIMAGES

      static final int RAWIMAGES
      flag to show extraction mode should includes original images
      See Also:
    • FINALIMAGES

      static final int FINALIMAGES
      flag to show extraction mode is to include final scale/clip
      See Also:
    • RAWCOMMANDS

      static final int RAWCOMMANDS
      flag to show extraction mode includes final scaled/clipped
      See Also:
    • CLIPPEDIMAGES

      static final int CLIPPEDIMAGES
      flag to show extraction of clipped images at highest res
      See Also:
    • TEXTCOLOR

      static final int TEXTCOLOR
      flag to show extraction of clipped images at highest res
      See Also:
    • XFORMMETADATA

      static final int XFORMMETADATA
      flag to show extraction of xforms metadata
      See Also:
    • RASTERIZE_FORMS

      static final int RASTERIZE_FORMS
      flag to tell code to flatten forms
      See Also:
    • RENDERTEXT

      static final int RENDERTEXT
      flag to show render mode includes any text
      See Also:
    • RENDERIMAGES

      static final int RENDERIMAGES
      flag to show render mode includes any images
      See Also:
    • REMOVE_RENDERSHAPES

      static final int REMOVE_RENDERSHAPES
      flag to show render mode includes any images
      See Also:
    • REMOVE_NOFORMS

      static final int REMOVE_NOFORMS
      flag to stop forms on decodePage
      See Also:
    • NOTEXTPRINT

      static final int NOTEXTPRINT
      printing mode using inbuilt java fonts and getting java to rasterize fonts using Java font if match found (added to get around limitations in PCL printing via JPS) - this is the default off setting
      See Also:
    • TEXTGLYPHPRINT

      static final int TEXTGLYPHPRINT
      printing mode using inbuilt java fonts and getting java to rasterize fonts using Java font if match found (added to get around limitations in PCL printing via JPS)
      See Also:
    • TEXTSTRINGPRINT

      static final int TEXTSTRINGPRINT
      printing mode using inbuilt java fonts and getting java to rasterize fonts using Java font if match found (added to get around limitations in PCL printing via JPS)
      See Also:
    • STANDARDTEXTSTRINGPRINT

      static final int STANDARDTEXTSTRINGPRINT
      printing mode using inbuilt java fonts and getting java to rasterize fonts using Java font if match found (added to get around limitations in PCL printing via JPS) - overrides embedded fonts for standard fonts (ie Arial)
      See Also:
    • SUBSTITUTE_FONT_USING_FILE_NAME

      static final int SUBSTITUTE_FONT_USING_FILE_NAME
      See Also:
    • SUBSTITUTE_FONT_USING_POSTSCRIPT_NAME

      static final int SUBSTITUTE_FONT_USING_POSTSCRIPT_NAME
      See Also:
    • SUBSTITUTE_FONT_USING_FAMILY_NAME

      static final int SUBSTITUTE_FONT_USING_FAMILY_NAME
      See Also:
    • SUBSTITUTE_FONT_USING_FULL_FONT_NAME

      static final int SUBSTITUTE_FONT_USING_FULL_FONT_NAME
      See Also:
    • SUBSTITUTE_FONT_USING_POSTSCRIPT_NAME_USE_FAMILY_NAME_IF_DUPLICATES

      static final int SUBSTITUTE_FONT_USING_POSTSCRIPT_NAME_USE_FAMILY_NAME_IF_DUPLICATES
      See Also:
  • Method Details

    • getGroupingObject

      org.jpedal.grouping.PdfGroupingAlgorithms getGroupingObject() throws PdfException
      returns object containing grouped text of last decoded page - if no page decoded, a Runtime exception is thrown to warn user Please see org.jpedal.examples.text for example code.
      Returns:
      object containing grouped text of last decoded page
      Throws:
      PdfException - if no page has been decoded
    • addExternalHandler

      void addExternalHandler(Object newHandler, int type)
      not part of API used internally

      allows external helper classes to be added to JPedal to alter default functionality -

      Parameters:
      newHandler - handler to add
      type - type of handler
    • getExternalHandler

      Object getExternalHandler(int type)
    • getIO

      org.jpedal.io.PdfObjectReader getIO()
      allow access to PDF file
      Returns:
      PdfObjectReader
    • setEncryptTempFiles

      void setEncryptTempFiles()
      ensure that files are always encrypted if cached to disk regardless of whether file has a password set
    • getTextLines

      TextLines getTextLines()
      access textlines object
      Returns:
      an object containing text lines
    • getBackgroundGroupingObject

      org.jpedal.grouping.PdfGroupingAlgorithms getBackgroundGroupingObject()
      returns object containing grouped text from background grouping - Please see org.jpedal.examples.text for example code
      Returns:
      an object containing grouped text from background grouping
    • getMarkedContent

      Document getMarkedContent()
    • isOpen

      boolean isOpen()
    • getDisplayRotation

      int getDisplayRotation()
    • getPageNumber

      int getPageNumber()
    • getlastPageDecoded

      int getlastPageDecoded()
    • getPageInfo

      Iterator<Integer> getPageInfo(int type)
    • getOutlineData

      org.jpedal.objects.outlines.OutlineData getOutlineData()
    • isLoadingLinearizedPDF

      boolean isLoadingLinearizedPDF()
    • getPageAlignment

      int getPageAlignment()
    • dispose

      void dispose()
    • closePdfFile

      void closePdfFile()
    • getPdfData

      org.jpedal.objects.PdfData getPdfData() throws PdfException
      Throws:
      PdfException
    • hasOutline

      boolean hasOutline()
    • getOutlineAsXML

      Document getOutlineAsXML()
    • getViewerPreferences

      org.jpedal.objects.raw.PdfObject getViewerPreferences()
    • getPdfPageData

      org.jpedal.objects.PdfPageData getPdfPageData()
    • getPDFWidth

      int getPDFWidth()
    • getPDFHeight

      int getPDFHeight()
    • getPageAsImage

      BufferedImage getPageAsImage(int pageIndex) throws PdfException
      Throws:
      PdfException
    • getPageAsImage

      BufferedImage getPageAsImage(int pageIndex, float scaling) throws PdfException
      Throws:
      PdfException
    • getPageAsHiRes

      BufferedImage getPageAsHiRes(int pageIndex) throws PdfException
      Throws:
      PdfException
    • getPageAsHiRes

      BufferedImage getPageAsHiRes(int pageIndex, Map<Integer,Object> params) throws PdfException
      Throws:
      PdfException
    • getPageAsHiRes

      BufferedImage getPageAsHiRes(int pageIndex, Map<Integer,Object> params, boolean isTransparent) throws PdfException
      Throws:
      PdfException
    • getPageAsHiRes

      BufferedImage getPageAsHiRes(int pageIndex, boolean isTransparent) throws PdfException
      Throws:
      PdfException
    • getPageAsTransparentImage

      BufferedImage getPageAsTransparentImage(int pageIndex) throws PdfException
      Throws:
      PdfException
    • getHiResUpscaleFactor

      float getHiResUpscaleFactor()
    • getInsetH

      int getInsetH()
      Return amount to inset the page rectangle height by
      Returns:
      int
    • getInsetW

      int getInsetW()
      Return amount to inset the page rectangle width by
      Returns:
      int
    • getScrollInterval

      int getScrollInterval()
      Return amount to scroll window by when scrolling (default is 10).
      Returns:
      int
    • setScrollInterval

      void setScrollInterval(int scrollInterval)
      Sets the ammount to scroll the window by (default is 10).
      Parameters:
      scrollInterval - scroll interval
    • resetForNonPDFPage

      void resetForNonPDFPage(int pageCount)
      used for non-PDF files to reset page
      Parameters:
      pageCount - the new page count
    • setPDFBorder

      void setPDFBorder(Border newBorder)
    • flushObjectValues

      void flushObjectValues(boolean reinit)
    • getPdfImageData

      org.jpedal.objects.PdfImageData getPdfImageData()
    • setRenderMode

      void setRenderMode(int mode)
    • setExtractionMode

      void setExtractionMode(int mode)
    • modifyNonstaticJPedalParameters

      void modifyNonstaticJPedalParameters(Map<Integer,Object> values) throws PdfException
      Throws:
      PdfException
    • getFileInformationData

      org.jpedal.objects.PdfFileInformation getFileInformationData()
    • setExtractionMode

      void setExtractionMode(int mode, float scaling)
    • setHardwareAccelerationforScreen

      void setHardwareAccelerationforScreen(boolean useAcceleration)
    • getDPIFactory

      org.jpedal.utils.DPIFactory getDPIFactory()
    • waitForDecodingToFinish

      void waitForDecodingToFinish()
    • getDynamicRenderer

      org.jpedal.render.DynamicVectorRenderer getDynamicRenderer()
    • getDynamicRenderer

      org.jpedal.render.DynamicVectorRenderer getDynamicRenderer(boolean reset)
    • decodePage

      void decodePage(int rawPage)
    • isPageAvailable

      boolean isPageAvailable(int rawPage)
    • updateCursorBoxOnScreen

      void updateCursorBoxOnScreen(int[] rectParams, int outlineColor)
    • decodePageInBackground

      void decodePageInBackground(int i)
    • getPageCount

      int getPageCount()
    • isEncrypted

      boolean isEncrypted()
    • isPasswordSupplied

      boolean isPasswordSupplied()
    • isForm

      boolean isForm()
    • isFileViewable

      boolean isFileViewable()
    • isExtractionAllowed

      boolean isExtractionAllowed()
    • setEncryptionPassword

      void setEncryptionPassword(String password) throws PdfException
      Throws:
      PdfException
    • openPdfFile

      void openPdfFile(String filename) throws PdfException
      Throws:
      PdfException
    • openPdfFile

      void openPdfFile(String filename, String password) throws PdfException
      Throws:
      PdfException
    • openPdfArray

      void openPdfArray(byte[] data) throws PdfException
      Throws:
      PdfException
    • openPdfArray

      void openPdfArray(byte[] data, String password) throws PdfException
      Throws:
      PdfException
    • openPdfFile

      void openPdfFile(String filename, Certificate certificate, PrivateKey key) throws PdfException
      Throws:
      PdfException
    • openPdfFileFromStream

      void openPdfFileFromStream(Object filename, String password) throws PdfException
      Throws:
      PdfException
    • openPdfFileFromURL

      boolean openPdfFileFromURL(String pdfUrl, boolean supportLinearized) throws PdfException
      Throws:
      PdfException
    • openPdfFileFromURL

      boolean openPdfFileFromURL(String pdfUrl, boolean supportLinearized, String password) throws PdfException
      Throws:
      PdfException
    • openPdfFileFromInputStream

      boolean openPdfFileFromInputStream(InputStream is, boolean supportLinearized) throws PdfException
      Throws:
      PdfException
    • openPdfFileFromInputStream

      boolean openPdfFileFromInputStream(InputStream is, boolean supportLinearized, String password) throws PdfException
      Throws:
      PdfException
    • getJPedalObject

      Object getJPedalObject(int id)
    • setPageMode

      void setPageMode(int mode)
    • isXMLExtraction

      boolean isXMLExtraction()
    • useTextExtraction

      void useTextExtraction()
    • useXMLExtraction

      void useXMLExtraction()
    • setStreamCacheSize

      void setStreamCacheSize(int size)
    • setUserOffsets

      void setUserOffsets(int x, int y, int mode)
    • hasEmbeddedFonts

      boolean hasEmbeddedFonts()
    • getPageFromObjectRef

      int getPageFromObjectRef(String ref)
    • getInfo

      String getInfo(int type)
    • getFormRenderer

      org.jpedal.objects.acroforms.AcroRenderer getFormRenderer()
    • getJavaScript

      org.jpedal.objects.Javascript getJavaScript()
    • getPageDecodeReport

      String getPageDecodeReport()
    • getObjectStore

      org.jpedal.io.ObjectStore getObjectStore()
    • setObjectStore

      void setObjectStore(org.jpedal.io.ObjectStore newStore)
    • getDisplayView

      int getDisplayView()
    • getSelectedRectangleOnscreen

      BufferedImage getSelectedRectangleOnscreen(float t_x1, float t_y1, float t_x2, float t_y2, float scaling)
    • getScaling

      float getScaling()
    • setScaling

      void setScaling(float x)
    • setDisplayRotation

      void setDisplayRotation(int newRotation)
    • getPages

      org.jpedal.display.Display getPages()
    • setPageParameters

      void setPageParameters(float scaleBy, int page)
    • drawAdditionalObjectsOverPage

      void drawAdditionalObjectsOverPage(int page, int[] type, Color[] colors, Object[] obj) throws PdfException
      Throws:
      PdfException
    • flushAdditionalObjectsOnPage

      void flushAdditionalObjectsOnPage(int page)
      allow user to remove all additional grapical content from the page (only for display) ONLY works in SINGLE VIEW displaymode
      Parameters:
      page - the page number to flush objects from
    • getFileName

      String getFileName()
    • getPageDecodeStatus

      boolean getPageDecodeStatus(int status)
    • getPageDecodeStatusReport

      String getPageDecodeStatusReport(int status)
    • getPDFVersion

      String getPDFVersion()
    • getExternalHandler

      org.jpedal.external.ExternalHandlers getExternalHandler()
    • getSpecialMode

      int getSpecialMode()
      retusn a value defined in SpecialOptions used internally and in custom JPedal releases
      Returns:
      int
    • useNewGraphicsMode

      boolean useNewGraphicsMode()
    • useNewGraphicsMode

      void useNewGraphicsMode(boolean b)
    • setPageParameters

      void setPageParameters(float scaling, int pageNumber, int newRotation)
    • setStatusBarObject

      void setStatusBarObject(org.jpedal.io.StatusBar statusBar)
    • setInset

      void setInset(int width, int height)
    • getDecoderOptions

      org.jpedal.parser.DecoderOptions getDecoderOptions()
    • getMaxSizeWH

      int[] getMaxSizeWH()
    • getPaneBounds

      int[] getPaneBounds()
    • repaintPane

      void repaintPane(int page)
    • requestFocus

      void requestFocus()
    • setPreviewThumbnail

      void setPreviewThumbnail(BufferedImage previewImage, String previewText)
    • getVisibleRect

      Rectangle getVisibleRect()
    • getDisplayOffsets

      org.jpedal.display.DisplayOffsets getDisplayOffsets()
    • getTextPrint

      int getTextPrint()
    • repaint

      void repaint()
    • repaintOffscreenImage

      void repaintOffscreenImage()
    • setImageNameCollector

      default void setImageNameCollector(org.jpedal.external.ImageNameCollector imageNameCollector)