public class PDFV
extends java.lang.Object
Constructor and Description |
---|
PDFV() |
Modifier and Type | Method and Description |
---|---|
void |
Close()
destroy and free memory.
|
int |
Draw(Bitmap bitmap)
invoke this draw view to Bitmap object
|
void |
EnableSel(boolean enable)
enable selecting?
|
int |
Find(int dir)
go find
|
boolean |
FindStart(java.lang.String pat,
boolean match_case,
boolean whole_word)
start find
|
void |
Fling(float dx,
float dy)
invoke this when do fling
|
int |
GetPage(int index)
get displayed page by index.
|
int |
GetPageCount()
count of displayed page
|
int |
GetPageFromPoint(float x,
float y,
float[] rect)
get displayed page by view point.
|
float |
GetPageRatio(int page)
get zoom scale level for page
|
boolean |
GetPageRect(int page,
float[] rect)
get page rect area.
|
int |
GetPos(float[] pt)
return pageNO and point of current page.
|
void |
Invalidate()
set redraw flag, redraw operation will applied when next draw invoked.
|
void |
lock(int mode)
set some locks
|
void |
OnDown(float x,
float y)
invoke this when press down
|
void |
OnMove(float x,
float y)
invoke this when touch moving
|
void |
OnUp(float x,
float y)
invoke this when touch up
|
void |
Open(int type,
Document doc,
int page_gap)
create a view object from Document object
|
boolean |
PageAddBitmap(int page,
Bitmap bitmap,
boolean has_alpha,
float[] rect)
this method mostly like PageAddBitmapAnnot, but this is not annotation.
it add bitmap to page content directly. this method can be only invoked in profession or premium license |
boolean |
PageAddBitmapAnnot(int page,
Bitmap bitmap,
boolean has_alpha,
float[] rect)
this method can be only invoked in profession or premium license
|
boolean |
PageAddEditboxAnnot(int page,
float[] rect,
float tsize,
int color)
add a free-text annotation on page.
this method can be only invoked in profession or premium license |
boolean |
PageAddGotoAnnot(int page,
float[] rect,
int pageno,
float top)
this method can be only invoked in profession or premium license
|
boolean |
PageAddInkAnnot(int page,
Ink ink)
this method can be only invoked in profession or premium license
|
boolean |
PageAddMarkupAnnot(int page,
int clr,
int type)
add text-markup annotation for current selection.
|
boolean |
PageAddRectAnnot(int page,
float[] rect,
float width,
int color)
this method can be only invoked in profession or premium license
|
boolean |
PageAddTextAnnot(int page,
float x,
float y)
add a sticky annotation on page.
this method can be only invoked in profession or premium license |
boolean |
PageAddUriAnnot(int page,
float[] rect,
java.lang.String uri)
this method can be only invoked in profession or premium license
|
int |
PageGetAnnot(int page,
int index)
get annotation object of the page by index.
this method can be only invoked in profession or premium license |
java.lang.String |
PageGetAnnot3D(int page,
int annot)
this method mostly like Page.GetAnnot3D
this method can be only invoked in profession or premium license
|
boolean |
PageGetAnnot3DData(int page,
int annot,
java.lang.String path)
this method can be only invoked in profession or premium license
|
java.lang.String |
PageGetAnnotAttach(int page,
int annot)
this method can be only invoked in profession or premium license
|
boolean |
PageGetAnnotAttachData(int page,
int annot,
java.lang.String path)
this method can be only invoked in profession or premium license
|
int |
PageGetAnnotCheckStatus(int page,
int annot)
this method can be only invoked in premium license
|
java.lang.String |
PageGetAnnotComboItem(int page,
int annot,
int item)
this method can be only invoked in premium license
|
int |
PageGetAnnotComboItemCount(int page,
int annot)
this method can be only invoked in premium license
|
int |
PageGetAnnotComboSel(int page,
int annot)
this method can be only invoked in premium license
|
int |
PageGetAnnotCount(int page)
get count of annotations in the page.
this method can be only invoked in profession or premium license |
int |
PageGetAnnotDest(int page,
int annot)
get page NO.
|
java.lang.String |
PageGetAnnotEditText(int page,
int annot)
this method can be only invoked in premium license
|
boolean |
PageGetAnnotEditTextRect(int page,
int annot,
float[] rect)
this method can be only invoked in premium license
|
float |
PageGetAnnotEditTextSize(int page,
int annot)
this method can be only invoked in premium license
|
int |
PageGetAnnotEditType(int page,
int annot)
this method can be only invoked in premium license
|
int |
PageGetAnnotFromPoint(int page,
float x,
float y)
get annotation object of the page by view point.
this method can be only invoked in profession or premium license |
java.lang.String |
PageGetAnnotMovie(int page,
int annot)
this method mostly like Page.GetAnnotMovie
this method can be only invoked in profession or premium license
|
boolean |
PageGetAnnotMovieData(int page,
int annot,
java.lang.String path)
this method can be only invoked in profession or premium license
|
boolean |
PageGetAnnotRect(int page,
int annot,
float[] rect)
get RECT of an annotation.
this method can be only invoked in profession or premium license |
boolean |
PageGetAnnotReset(int page,
int annot)
this method can be only invoked in premium license
|
java.lang.String |
PageGetAnnotSound(int page,
int annot)
this method can be only invoked in profession or premium license
|
boolean |
PageGetAnnotSoundData(int page,
int annot,
int[] paras,
java.lang.String path)
this method can be only invoked in profession or premium license
|
java.lang.String |
PageGetAnnotSubj(int page,
int annot)
get sticky annotation's subject(or title).
this method can be only invoked in profession or premium license |
java.lang.String |
PageGetAnnotSubmitPara(int page,
int annot)
this method can be only invoked in premium license
|
java.lang.String |
PageGetAnnotSubmitTarget(int page,
int annot)
this method can be only invoked in premium license
|
java.lang.String |
PageGetAnnotText(int page,
int annot)
get sticky annotation's text.
this method can be only invoked in profession or premium license |
int |
PageGetAnnotType(int page,
int annot)
get type of an annotation
this method can be only invoked in profession or premium license |
java.lang.String |
PageGetAnnotURI(int page,
int annot)
get uri of a web annotation.
this method can be only invoked in profession or premium license |
boolean |
PageRemoveAnnot(int page,
int annot)
remove annotation object in page.
this method can be only invoked in profession or premium license |
boolean |
PageRender(int page)
re-render page
|
boolean |
PageSetAnnotCheckValue(int page,
int annot,
boolean check)
this method can be only invoked in premium license
|
boolean |
PageSetAnnotComboSel(int page,
int annot,
int item)
this method can be only invoked in premium license
|
boolean |
PageSetAnnotEditText(int page,
int annot,
java.lang.String txt)
this method can be only invoked in premium license
|
boolean |
PageSetAnnotRadio(int page,
int annot)
this method can be only invoked in premium license
|
boolean |
PageSetAnnotReset(int page,
int annot)
this method can be only invoked in premium license
|
boolean |
PageSetAnnotSubj(int page,
int annot,
java.lang.String subj)
set sticky annotation's subject(or title).
this method can be only invoked in profession or premium license |
boolean |
PageSetAnnotText(int page,
int annot,
java.lang.String txt)
set sticky annotation's text.
this method can be only invoked in profession or premium license |
void |
SetPos(int pageno,
float x,
float y)
goto a position.
|
void |
SetRatio(float ratio)
invoke this when need zoom in or out.
|
void |
SetSel(float x1,
float y1,
float x2,
float y2)
set text selection
|
void |
SetSize(int w,
int h)
invoke this when size of view changed
|
void |
ZoomEnd()
end zooming and re-render all displayed pages
|
float |
ZoomGetRatio(float x1,
float y1,
float x2,
float y2)
invoke this when 2 point moving.
|
boolean |
ZoomStart(float x1,
float y1,
float x2,
float y2)
invoke this when 2 point touch down
|
public void Open(int type, Document doc, int page_gap)
type
- doc
- Document objectpage_gap
- gap between pages.public void Close()
public void OnDown(float x, float y)
x
- point in View coordinatey
- point in View coordinatepublic void OnMove(float x, float y)
x
- point in View coordinatey
- point in View coordinatepublic void OnUp(float x, float y)
x
- point in View coordinatey
- point in View coordinatepublic int Draw(Bitmap bitmap)
bitmap
- Bitmap object allocated by APP.public void SetSize(int w, int h)
w
- view widthh
- view heightpublic void SetRatio(float ratio)
ratio
- public int GetPos(float[] pt)
pt
- output value: left-top point in PDF coordinatepublic void SetPos(int pageno, float x, float y)
pageno
- 0 based page NO.x
- point of page in PDF coordinatey
- point of page in PDF coordinatepublic void SetSel(float x1, float y1, float x2, float y2)
x1
- first point in View coordinatey1
- first point in View coordinatex2
- second point in View coordinatey2
- second point in View coordinatepublic void EnableSel(boolean enable)
enable
- public void lock(int mode)
mode
- 0: non-lock 1: lock side moving 2: lock all moving 3: lock resizingpublic boolean ZoomStart(float x1, float y1, float x2, float y2)
x1
- first touched point in View coordinatey1
- first touched point in View coordinatex2
- second touched point in View coordinatey2
- second touched point in View coordinatepublic float ZoomGetRatio(float x1, float y1, float x2, float y2)
x1
- first touched point in View coordinatey1
- first touched point in View coordinatex2
- second touched point in View coordinatey2
- second touched point in View coordinatepublic void ZoomEnd()
public void Invalidate()
public void Fling(float dx, float dy)
dx
- x delta to flingdy
- y delta to flingpublic boolean FindStart(java.lang.String pat, boolean match_case, boolean whole_word)
pat
- match_case
- whole_word
- public int Find(int dir)
dir
- go backward if less than 0, otherwise go forwardpublic int GetPageCount()
public int GetPage(int index)
index
- public int GetPageFromPoint(float x, float y, float[] rect)
x
- y
- rect
- output parameter, 4 elements for [left, top, right, bottom]public float GetPageRatio(int page)
page
- page objectpublic boolean GetPageRect(int page, float[] rect)
page
- page objectrect
- output as [left, top, right, bottom] in View coordinatepublic boolean PageRender(int page)
page
- page object returned by PDFV.GetPage() or PDFV.GetPageFromPoint()public int PageGetAnnotCount(int page)
page
- page object returned by PDFV.GetPage() or PDFV.GetPageFromPoint()public int PageGetAnnot(int page, int index)
page
- page object returned by getPage() or getPageFromPoint()index
- public int PageGetAnnotFromPoint(int page, float x, float y)
page
- page object returned by getPage() or getPageFromPoint()x
- y
- public boolean PageGetAnnotRect(int page, int annot, float[] rect)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointrect
- output value as [left, top, right, bottom] in view coordinate.public int PageGetAnnotType(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageRemoveAnnot(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageAddTextAnnot(int page, float x, float y)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointx
- point in view coordinate.y
- point in view coordinate.public java.lang.String PageGetAnnotText(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageSetAnnotText(int page, int annot, java.lang.String txt)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointtxt
- text valuepublic java.lang.String PageGetAnnotSubj(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageAddEditboxAnnot(int page, float[] rect, float tsize, int color)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointrect
- rect area in view coordinate.tsize
- size of text, in PDF coordinatecolor
- color of textpublic boolean PageSetAnnotSubj(int page, int annot, java.lang.String subj)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointsubj
- string valuepublic int PageGetAnnotDest(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic java.lang.String PageGetAnnotURI(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic java.lang.String PageGetAnnot3D(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic java.lang.String PageGetAnnotMovie(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic java.lang.String PageGetAnnotSound(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic java.lang.String PageGetAnnotAttach(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageGetAnnot3DData(int page, int annot, java.lang.String path)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpath
- public boolean PageGetAnnotMovieData(int page, int annot, java.lang.String path)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpath
- public boolean PageGetAnnotSoundData(int page, int annot, int[] paras, java.lang.String path)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointparas
- path
- public boolean PageGetAnnotAttachData(int page, int annot, java.lang.String path)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpath
- public boolean PageAddInkAnnot(int page, Ink ink)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointink
- ink object.public boolean PageAddGotoAnnot(int page, float[] rect, int pageno, float top)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointrect
- rect as [left, top, right, bottom] in View coordinate.pageno
- 0 based page NO.top
- y coordinate in PDF coordinatepublic boolean PageAddUriAnnot(int page, float[] rect, java.lang.String uri)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointrect
- rect as [left, top, right, bottom] in View coordinate.uri
- URL example: http://www.radaee.com/enpublic boolean PageAddRectAnnot(int page, float[] rect, float width, int color)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointrect
- rect as [left, top, right, bottom] in View coordinate.width
- color
- public boolean PageAddBitmapAnnot(int page, Bitmap bitmap, boolean has_alpha, float[] rect)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointbitmap
- has_alpha
- rect
- rect as [left, top, right, bottom] in View coordinate.public boolean PageAddBitmap(int page, Bitmap bitmap, boolean has_alpha, float[] rect)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointbitmap
- has_alpha
- rect
- rect as [left, top, right, bottom] in View coordinate.public boolean PageAddMarkupAnnot(int page, int clr, int type)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointclr
- type
- public int PageGetAnnotEditType(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageGetAnnotEditTextRect(int page, int annot, float[] rect)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointrect
- output rect as [left, top, right, bottom] in View coordinate.public float PageGetAnnotEditTextSize(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic java.lang.String PageGetAnnotEditText(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageSetAnnotEditText(int page, int annot, java.lang.String txt)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointtxt
- public int PageGetAnnotComboItemCount(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic java.lang.String PageGetAnnotComboItem(int page, int annot, int item)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointitem
- public int PageGetAnnotComboSel(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageSetAnnotComboSel(int page, int annot, int item)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointitem
- public int PageGetAnnotCheckStatus(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageSetAnnotCheckValue(int page, int annot, boolean check)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointcheck
- public boolean PageSetAnnotRadio(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageGetAnnotReset(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic boolean PageSetAnnotReset(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic java.lang.String PageGetAnnotSubmitTarget(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPointpublic java.lang.String PageGetAnnotSubmitPara(int page, int annot)
page
- page object returned from PDFV.GetPage or PDFV.GetPageFromPointannot
- annotation object returned from PDFV.PageGetAnnot or PDFV.PageGetAnnotFromPoint