public class DecoderOptions extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
altColorThreshold |
Color |
altDisplayBackground |
Color |
altPageColor
page colour for PDF background
|
Color |
altTextColor |
static Color |
backgroundColor
The colour of the text once highlighted
|
static boolean |
embedWidthData
flag to tell software to embed x point after each character so we can
merge any overlapping text together
|
boolean |
enhanceFractionalLines |
static JPedalHelper |
Helper |
static Color |
highlightColor
The colour of the highlighting box around the text
|
static float |
highlightComposite
The transparency of the highlighting box around the text stored as a
float
|
int |
insetH |
int |
insetW
allow for inset of display
|
static boolean |
isRunningOnAIX |
static boolean |
isRunningOnLinux |
static boolean |
isRunningOnMac
flag to show if on mac so we can code around certain bugs
|
static boolean |
isRunningOnWindows |
static float |
javaVersion
version number
|
int |
scrollInterval
amount we scroll screen to make visible
|
static boolean |
showErrorMessages
flag to enable popup of error messages in JPedal
|
static boolean |
showMouseBox |
| Constructor and Description |
|---|
DecoderOptions() |
| Modifier and Type | Method and Description |
|---|---|
PdfGroupingAlgorithms |
getBackgroundGroupingObject(PdfData pdfBackgroundData)
returns object containing grouped text from background grouping - Please
see org.jpedal.examples.text for example code
|
boolean |
getChangeTextAndLine()
Flag that shows if shapes should have colours changed when preferences
set to change document text colours
|
PageOffsets |
getCurrentOffsets()
Get the page offsets and sizes for the whole document for
various display modes
|
Color |
getDisplayBackgroundColor()
Gets the alternative colour for the display areas background when the
option is set.
|
int |
getDisplayView()
Get the current display view being used
|
static int[] |
getFormsNoPrint()
Get a list of Form types and subtypes that should not be printed
|
PdfGroupingAlgorithms |
getGroupingObject(int lastPageDecoded,
PdfData textData)
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.
|
float |
getImageDimensions(int pageIndex,
PdfPageData pageData)
Get the scaling values to be used when converting a page to an image
|
int |
getInsetH()
Vertical inset applied to page to move away from the displays edge
|
int |
getInsetW()
Horizontal inset applied to page to move away from the displays edge
|
Boolean |
getInstance_allowPagesSmallerThanPageSize()
Flag to control if image conversion can create pages smaller than the original
|
Integer |
getInstance_bestQualityMaxScaling()
Flag to control the maximum value the scaling for image conversion can be
|
int[] |
getInstance_FormsNoPrint()
Get a list of Form types and subtypes that should not be printed
|
Paint |
getNonDrawnPageColor()
Gets the Paint to be used when drawing a page that has not been drawn on yet
|
int |
getPageAlignment()
Get the alignment of the pages such as left aligned or centred - Please
see org.jpedal.display for display view flags
|
Color |
getPageColor()
Get the alternative page colour to be used when the option is set.
|
int |
getPageMode()
Get the current page mode being used
|
Boolean |
getPageSizeToUse()
Flag to check if we should override page size during image conversion
|
boolean |
getRenderPage()
Flag to show if pages are being rendered
|
int |
getReplacementColorThreshold()
Set the threshold to be used when replacing text and line colours with alternative.
|
int |
getScrollInterval()
The scroll interval to be used when scrolling in the viewer
|
Color |
getTextColor()
Get the alternative text colour to be used when the option is set.
|
boolean |
isEnhanceFractionalLines()
Flag used to control if we enhance thin lines (width of less than 1)
to ensure its width never drops below 1.
|
boolean |
isXMLExtraction()
Flag to control if text extraction should extract as XML
|
static void |
modifyJPedalParameters(Map values)
Allow the modification of various parameters to customise different aspects of rendering and / or extraction
|
void |
set(Map values)
Set options to be used in page rendering, printing and image conversion
|
void |
setCurrentOffsets(PageOffsets newOffset)
Set the offsets for the current document
|
void |
setDisplayView(int displayView)
Set the display view being used in the display
|
void |
setInset(int width,
int height)
Set an inset so page does not touch the display area edge
|
void |
setPageAlignment(int orientation)
Set the alignment of the pages such as left aligned or centred - Please
see org.jpedal.display for display view flags
|
void |
setPageMode(int mode)
Set the page mode being used
|
void |
setRenderPage(boolean newRender)
Controls if pages are being rendered or not
|
void |
setScrollInterval(int scrollInterval)
Set the scroll interval to be used when scrolling in the viewer
|
void |
setXMLExtraction(boolean XMLExtraction)
Set if future text extractions should output as XML or text
|
boolean |
useHardwareAcceleration()
Flag to specify if the viewer should use hardware acceleration when rendering pages
|
void |
useHardwareAcceleration(boolean newValue)
Specify if the viewer should use hardware acceleration when rendering pages
|
void |
useXMLExtraction()
Set extraction mode to XML extraction - pure text extraction is much faster
|
public static float javaVersion
public static float highlightComposite
public static boolean showMouseBox
public static boolean showErrorMessages
public static boolean isRunningOnMac
public static boolean isRunningOnWindows
public static boolean isRunningOnAIX
public static boolean isRunningOnLinux
public static boolean embedWidthData
public static JPedalHelper Helper
public int scrollInterval
public int insetW
public int insetH
public static Color highlightColor
public static Color backgroundColor
public Color altPageColor
public Color altTextColor
public Color altDisplayBackground
public int altColorThreshold
public boolean enhanceFractionalLines
public boolean isXMLExtraction()
public void setXMLExtraction(boolean XMLExtraction)
XMLExtraction - True if extraction should output XML, false otherwisepublic void setPageMode(int mode)
mode - int value representing the current display view - Please
see org.jpedal.display for display view flagspublic int getPageMode()
public int getInsetH()
public int getInsetW()
public int getScrollInterval()
public void setScrollInterval(int scrollInterval)
scrollInterval - int value presenting the interval to move per scroll unitpublic final void setInset(int width,
int height)
width - int value representing the horizontal insetheight - int value representing the vertical insetpublic void useXMLExtraction()
public PdfGroupingAlgorithms getGroupingObject(int lastPageDecoded, PdfData textData) throws PdfException
lastPageDecoded - int value of the last page decodedtextData - PdfData object holding the text data from the filePdfException - if no page has been decodedpublic PdfGroupingAlgorithms getBackgroundGroupingObject(PdfData pdfBackgroundData)
pdfBackgroundData - public void set(Map values) throws PdfException
values - Map Object containing various parameters to modifyPdfException - if key or value data type is not recognisedpublic static void modifyJPedalParameters(Map values) throws PdfException
values - Map Object containing various parameters to modifyPdfException - if key or value data type is not recognisedpublic Color getPageColor()
public Color getTextColor()
public int getReplacementColorThreshold()
The threshold sets a value all RGB components must be under in order to be replaced. 0 would only covert pure black, 255 would convert all colours.
public boolean isEnhanceFractionalLines()
public Color getDisplayBackgroundColor()
public boolean getChangeTextAndLine()
public Paint getNonDrawnPageColor()
public Boolean getInstance_allowPagesSmallerThanPageSize()
public Integer getInstance_bestQualityMaxScaling()
public static int[] getFormsNoPrint()
public int[] getInstance_FormsNoPrint()
public Boolean getPageSizeToUse()
public float getImageDimensions(int pageIndex,
PdfPageData pageData)
pageIndex - int value of a pagepageData - PdfPageData object holding page size data for the documentpublic boolean getRenderPage()
public void setRenderPage(boolean newRender)
newRender - flag to show if pages are being rendered (true) or only extraction taking place (false).public boolean useHardwareAcceleration()
public void useHardwareAcceleration(boolean newValue)
newValue - True if acceleration should be used, false otherwisepublic int getPageAlignment()
public void setPageAlignment(int orientation)
orientation - int value to use for page alignmentpublic void setDisplayView(int displayView)
displayView - int value for the display view - Please
see org.jpedal.display for display view flagspublic int getDisplayView()
public PageOffsets getCurrentOffsets()
public void setCurrentOffsets(PageOffsets newOffset)
newOffset - PageOffsets object containing offset information to be
used for the documentCopyright © 2017. All rights reserved.