Package com.inet.pdfc.results
Class ResultPage
java.lang.Object
com.inet.pdfc.results.ResultPage
- All Implemented Interfaces:
Serializable
A page result contains all information for a page in a compares document. Since the actual comparison result is not
bound to pages, the result itself is not part of a
ResultPage
.- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
Create uninitialized pageprotected
ResultPage
(com.inet.pdfc.generator.message.PageData data, com.inet.pdfc.generator.rendercache.PageImageCache renderSource, ResultModel model) Creates a page for theResultModel
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the unscaled height of the page in pixelReturns a list with all highlights for this page@Nullable BufferedImage
getPageImage
(double scale) Renders the page to aBufferedImage
.@Nullable BufferedImage
getPageImage
(double scaleX, double scaleY) Renders the page to aBufferedImage
.int
Returns the zero based page index of this pageint
Returns the page offset which is the absolute rendering position in side by side mode.getSize()
Returns the size of the page in pixels, unscaledReturns the text infos required to select and copy textint
getWidth()
Returns the unscaled width of the page in pixelboolean
Returns whether the page image cache contains an image for this pageboolean
isLeft()
Check whether this page is on the left side or on the right side.void
renderPage
(double scale, Graphics2D g2) Renders the page to aBufferedImage
.protected void
setData
(com.inet.pdfc.generator.message.PageData data) Copies the page data into theResultPage
void
setModel
(ResultModel model) Sets the model as well as the renderSource of this pageprotected void
setPageOffset
(int yOffset) Updates the page offset.
-
Constructor Details
-
ResultPage
protected ResultPage(com.inet.pdfc.generator.message.PageData data, com.inet.pdfc.generator.rendercache.PageImageCache renderSource, ResultModel model) Creates a page for theResultModel
- Parameters:
data
- the page data as passed by the comparer, must not benull
renderSource
- the render source to query for page images, must not benull
model
- the actual comparison model this page belongs to- Since:
- i-net PDFC 3.0
-
ResultPage
protected ResultPage()Create uninitialized page- Since:
- i-net PDFC 3.0
-
-
Method Details
-
setData
protected void setData(com.inet.pdfc.generator.message.PageData data) Copies the page data into theResultPage
- Parameters:
data
- the data to be copied, must not benull
- Since:
- i-net PDFC 3.0
-
getWidth
public int getWidth()Returns the unscaled width of the page in pixel- Returns:
- the unscaled width of the page in pixel
- Since:
- i-net PDFC 3.0
-
getHeight
public int getHeight()Returns the unscaled height of the page in pixel- Returns:
- the unscaled height of the page in pixel
- Since:
- i-net PDFC 3.0
-
getPageOffset
public int getPageOffset()Returns the page offset which is the absolute rendering position in side by side mode. It's the sum of the max-height of all page-pairs before this one- Returns:
- the page offset which is the absolute rendering position in side by side mode
- Since:
- i-net PDFC 3.0
-
setPageOffset
protected void setPageOffset(int yOffset) Updates the page offset. The page offset is the total distance from the top of the page to the start of the document in pixels (without page gaps).- Parameters:
yOffset
- the page offset of the page in pixels- Since:
- i-net PDFC 3.0
- See Also:
-
getPageIndex
public int getPageIndex()Returns the zero based page index of this page- Returns:
- the zero based page index of this page
- Since:
- i-net PDFC 3.0
-
getHighlights
Returns a list with all highlights for this page- Returns:
- a list with all highlights for this page or
null
if there are no highlights - Since:
- i-net PDFC 3.0
-
getPageImage
Renders the page to aBufferedImage
.- Parameters:
scale
- the scale factor- Returns:
- the rendered page as image or
null
if not found - Since:
- i-net PDFC 3.0
-
getPageImage
Renders the page to aBufferedImage
. This mehtod allowes a change in the aspect ratio of the returned image- Parameters:
scaleX
- the scale factor along the X axisscaleY
- the scale factor along the Y axis- Returns:
- the rendered page as image or
null
if not found - Since:
- i-net PDFC 3.2
-
renderPage
Renders the page to aBufferedImage
.- Parameters:
scale
- the scale factorg2
- the graphics instance which will be used for rendering- Since:
- i-net PDFC 3.0
-
getSize
Returns the size of the page in pixels, unscaled- Returns:
- the size of the page in pixels, unscaled
- Since:
- i-net PDFC 3.0
-
hasPageImage
public boolean hasPageImage()Returns whether the page image cache contains an image for this page- Returns:
- whether the page image cache contains an image for this page
- Since:
- i-net PDFC 3.0
-
getTextInfos
Returns the text infos required to select and copy text- Returns:
- the text infos required to select and copy text
- Since:
- 4.0
-
isLeft
public boolean isLeft()Check whether this page is on the left side or on the right side.- Returns:
- true if this page is on the left (first) side, false if it is on the right (second) side
- Since:
- i-net PDFC 3.2
-
setModel
Sets the model as well as the renderSource of this page- Parameters:
model
- the model to set- Since:
- i-net PDFC 4.0
-