Package org.jpedal
Interface PdfDecoderInt
- All Known Implementing Classes:
PdfDecoder,PdfDecoderServer
public interface PdfDecoderInt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intflag to show extraction of clipped images at highest resstatic final intflag to show extraction mode is to include final scale/clipstatic final intprinting 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 settingstatic final intflag to tell code to flatten formsstatic final intflag to show extraction mode includes final scaled/clippedstatic final intflag to show extraction mode should includes original imagesstatic final intflag to stop forms on decodePagestatic final intflag to show render mode includes any imagesstatic final intflag to show render mode includes any imagesstatic final intflag to show render mode includes any textstatic final intprinting 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)static final intstatic final intstatic final intstatic final intstatic final intstatic final intflag to show extraction mode should include any textstatic final intflag to show extraction of clipped images at highest resstatic final intprinting 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)static final intprinting 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)static final intflag to show extraction of xforms metadata -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExternalHandler(Object newHandler, int type) not part of API used internallyvoidvoiddecodePage(int rawPage) voiddecodePageInBackground(int i) voiddispose()voiddrawAdditionalObjectsOverPage(int page, int[] type, Color[] colors, Object[] obj) voidflushAdditionalObjectsOnPage(int page) allow user to remove all additional grapical content from the page (only for display) ONLY works in SINGLE VIEW displaymodevoidflushObjectValues(boolean reinit) org.jpedal.grouping.PdfGroupingAlgorithmsreturns object containing grouped text from background grouping - Please see org.jpedal.examples.text for example codeorg.jpedal.parser.DecoderOptionsorg.jpedal.display.DisplayOffsetsintintorg.jpedal.utils.DPIFactoryorg.jpedal.render.DynamicVectorRendererorg.jpedal.render.DynamicVectorRenderergetDynamicRenderer(boolean reset) org.jpedal.external.ExternalHandlersgetExternalHandler(int type) org.jpedal.objects.PdfFileInformationorg.jpedal.objects.acroforms.AcroRendererorg.jpedal.grouping.PdfGroupingAlgorithmsreturns 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.floatgetInfo(int type) intReturn amount to inset the page rectangle height byintReturn amount to inset the page rectangle width byorg.jpedal.io.PdfObjectReadergetIO()allow access to PDF fileorg.jpedal.objects.JavascriptgetJPedalObject(int id) intgetMarkedContent(String imagesOutDir, String imagesOutFormat) Document[]Document[]getMarkedContentPerPage(String imagesOutDir, String imagesOutFormat) int[]org.jpedal.io.ObjectStoreorg.jpedal.objects.outlines.OutlineDataintgetPageAsHiRes(int pageIndex) getPageAsHiRes(int pageIndex, boolean isTransparent) getPageAsHiRes(int pageIndex, Map<Integer, Object> params) getPageAsHiRes(int pageIndex, Map<Integer, Object> params, boolean isTransparent) getPageAsImage(int pageIndex) getPageAsImage(int pageIndex, float scaling) getPageAsTransparentImage(int pageIndex) intbooleangetPageDecodeStatus(int status) getPageDecodeStatusReport(int status) intgetPageInfo(int type) intorg.jpedal.display.DisplaygetPages()int[]org.jpedal.objects.PdfDataintorg.jpedal.objects.PdfImageDataorg.jpedal.objects.PdfPageDataintfloatintReturn amount to scroll window by when scrolling (default is 10).getSelectedRectangleOnscreen(float t_x1, float t_y1, float t_x2, float t_y2, float scaling) intretusn a value defined in SpecialOptions used internally and in custom JPedal releasesaccess textlines objectintorg.jpedal.objects.raw.PdfObjectbooleanbooleanbooleanbooleanbooleanbooleanisForm()booleanbooleanisOpen()booleanisPageAvailable(int rawPage) booleanbooleanvoidmodifyNonstaticJPedalParameters(Map<Integer, Object> values) voidopenPdfArray(byte[] data) voidopenPdfArray(byte[] data, String password) voidopenPdfFile(String filename) voidopenPdfFile(String filename, String password) voidopenPdfFile(String filename, Certificate certificate, PrivateKey key) booleanopenPdfFileFromInputStream(InputStream is, boolean supportLinearized) booleanopenPdfFileFromInputStream(InputStream is, boolean supportLinearized, String password) voidopenPdfFileFromStream(Object filename, String password) booleanopenPdfFileFromURL(String pdfUrl, boolean supportLinearized) booleanopenPdfFileFromURL(String pdfUrl, boolean supportLinearized, String password) voidrepaint()voidvoidrepaintPane(int page) voidvoidresetForNonPDFPage(int pageCount) used for non-PDF files to reset pagevoidsetDisplayRotation(int newRotation) voidsetEncryptionPassword(String password) voidensure that files are always encrypted if cached to disk regardless of whether file has a password setvoidsetExtractionMode(int mode) voidsetExtractionMode(int mode, float scaling) voidsetHardwareAccelerationforScreen(boolean useAcceleration) default voidsetImageNameCollector(org.jpedal.external.ImageNameCollector imageNameCollector) voidsetInset(int width, int height) voidsetObjectStore(org.jpedal.io.ObjectStore newStore) voidsetPageMode(int mode) voidsetPageParameters(float scaleBy, int page) voidsetPageParameters(float scaling, int pageNumber, int newRotation) voidsetPDFBorder(Border newBorder) voidsetPreviewThumbnail(BufferedImage previewImage, String previewText) voidsetRenderMode(int mode) voidsetScaling(float x) voidsetScrollInterval(int scrollInterval) Sets the ammount to scroll the window by (default is 10).voidsetStatusBarObject(org.jpedal.io.StatusBar statusBar) voidsetStreamCacheSize(int size) voidsetUserOffsets(int x, int y, int mode) voidupdateCursorBoxOnScreen(int[] rectParams, int outlineColor) booleanvoiduseNewGraphicsMode(boolean b) voidvoidvoid
-
Field Details
-
TEXT
static final int TEXTflag to show extraction mode should include any text- See Also:
-
RAWIMAGES
static final int RAWIMAGESflag to show extraction mode should includes original images- See Also:
-
FINALIMAGES
static final int FINALIMAGESflag to show extraction mode is to include final scale/clip- See Also:
-
RAWCOMMANDS
static final int RAWCOMMANDSflag to show extraction mode includes final scaled/clipped- See Also:
-
CLIPPEDIMAGES
static final int CLIPPEDIMAGESflag to show extraction of clipped images at highest res- See Also:
-
TEXTCOLOR
static final int TEXTCOLORflag to show extraction of clipped images at highest res- See Also:
-
XFORMMETADATA
static final int XFORMMETADATAflag to show extraction of xforms metadata- See Also:
-
RASTERIZE_FORMS
static final int RASTERIZE_FORMSflag to tell code to flatten forms- See Also:
-
RENDERTEXT
static final int RENDERTEXTflag to show render mode includes any text- See Also:
-
RENDERIMAGES
static final int RENDERIMAGESflag to show render mode includes any images- See Also:
-
REMOVE_RENDERSHAPES
static final int REMOVE_RENDERSHAPESflag to show render mode includes any images- See Also:
-
REMOVE_NOFORMS
static final int REMOVE_NOFORMSflag to stop forms on decodePage- See Also:
-
NOTEXTPRINT
static final int NOTEXTPRINTprinting 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 TEXTGLYPHPRINTprinting 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 TEXTSTRINGPRINTprinting 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 STANDARDTEXTSTRINGPRINTprinting 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
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
not part of API used internallyallows external helper classes to be added to JPedal to alter default functionality -
- Parameters:
newHandler- handler to addtype- type of handler
-
getExternalHandler
-
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() -
getMarkedContentPerPage
Document[] getMarkedContentPerPage() -
getMarkedContent
- Throws:
IOException
-
getMarkedContentPerPage
- Throws:
IOException
-
isOpen
boolean isOpen() -
getDisplayRotation
int getDisplayRotation() -
getPageNumber
int getPageNumber() -
getlastPageDecoded
int getlastPageDecoded() -
getPageInfo
-
getOutlineData
org.jpedal.objects.outlines.OutlineData getOutlineData() -
isLoadingLinearizedPDF
boolean isLoadingLinearizedPDF() -
getPageAlignment
int getPageAlignment() -
dispose
void dispose() -
closePdfFile
void closePdfFile() -
getPdfData
- 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
- Throws:
PdfException
-
getPageAsImage
- Throws:
PdfException
-
getPageAsHiRes
- Throws:
PdfException
-
getPageAsHiRes
- Throws:
PdfException
-
getPageAsHiRes
BufferedImage getPageAsHiRes(int pageIndex, Map<Integer, Object> params, boolean isTransparent) throws PdfException- Throws:
PdfException
-
getPageAsHiRes
- Throws:
PdfException
-
getPageAsTransparentImage
- 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
-
flushObjectValues
void flushObjectValues(boolean reinit) -
getPdfImageData
org.jpedal.objects.PdfImageData getPdfImageData() -
setRenderMode
void setRenderMode(int mode) -
setExtractionMode
void setExtractionMode(int mode) -
modifyNonstaticJPedalParameters
- 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
- Throws:
PdfException
-
openPdfFile
- Throws:
PdfException
-
openPdfFile
- Throws:
PdfException
-
openPdfArray
- Throws:
PdfException
-
openPdfArray
- Throws:
PdfException
-
openPdfFile
- Throws:
PdfException
-
openPdfFileFromStream
- Throws:
PdfException
-
openPdfFileFromURL
- Throws:
PdfException
-
openPdfFileFromURL
boolean openPdfFileFromURL(String pdfUrl, boolean supportLinearized, String password) throws PdfException - Throws:
PdfException
-
openPdfFileFromInputStream
- Throws:
PdfException
-
openPdfFileFromInputStream
boolean openPdfFileFromInputStream(InputStream is, boolean supportLinearized, String password) throws PdfException - Throws:
PdfException
-
getJPedalObject
-
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
-
getInfo
-
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
-
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
-
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)
-