Foxit PDF SDK  9.1
com.foxit.sdk.PDFViewCtrl Class Reference

Inherits ViewGroup, OnGestureListener, OnScaleGestureListener, and OnDoubleTapListener.

Classes

class  CacheOption
 
class  HttpRequestProperties
 
interface  IActivityResultListener
 
interface  IDocEventListener
 
interface  IDoubleTapEventListener
 
interface  IDrawEventListener
 
interface  IExceptionLogger
 
interface  IGestureEventListener
 
interface  ILayoutEventListener
 
interface  IPageAutoEventListener
 
interface  IPageEventListener
 
interface  IRecoveryEventListener
 
interface  IReflowEventListener
 
interface  IRenderEventListener
 
interface  IScaleGestureEventListener
 
interface  ITouchEventListener
 
interface  PageAutoEventType
 
interface  PageBinding
 
interface  UIExtensionsManager
 

Public Member Functions

void registerDocEventListener (IDocEventListener listener)
 
void unregisterDocEventListener (IDocEventListener listener)
 
void registerPageEventListener (IPageEventListener listener)
 
void unregisterPageEventListener (IPageEventListener listener)
 
void registerLayoutEventListener (ILayoutEventListener listener)
 
void unregisterLayoutEventListener (ILayoutEventListener listener)
 
boolean rotatePages (int[] pageIndexes, int rotation)
 
boolean removePages (int[] pageIndexes)
 
boolean movePage (int index, int dstIndex)
 
boolean insertPages (int index, float width, float height, int style, int color, int rotation, int count)
 
boolean insertPages (int index, int size, int style, int color, int rotation, int count)
 
boolean insertPages (int dstIndex, int flags, String layerName, String srcFilePath, byte[] password, int[] pageRanges)
 
boolean insertPages (int dstIndex, int flags, String layerName, PDFDoc srcDoc, int[] pageRanges)
 
boolean addImagePage (final int dstIndex, String imagePath)
 
void registerRecoveryEventListener (IRecoveryEventListener listener)
 
void unregisterRecoveryEventListener (IRecoveryEventListener listener)
 
void registerDrawEventListener (IDrawEventListener listener)
 
void unregisterDrawEventListener (IDrawEventListener listener)
 
void registerRenderEventListener (IRenderEventListener listener)
 
void unregisterRenderEventListener (IRenderEventListener listener)
 
void registerReflowEventListener (IReflowEventListener listener)
 
void unregisterReflowEventListener (IReflowEventListener listener)
 
void registerTouchEventListener (ITouchEventListener listener)
 
void unregisterTouchEventListener (ITouchEventListener listener)
 
void registerGestureEventListener (IGestureEventListener listener)
 
void unregisterGestureEventListener (IGestureEventListener listener)
 
void registerScaleGestureEventListener (IScaleGestureEventListener listener)
 
void unregisterScaleGestureEventListener (IScaleGestureEventListener listener)
 
void registerDoubleTapEventListener (IDoubleTapEventListener listener)
 
void unregisterDoubleTapEventListener (IDoubleTapEventListener listener)
 
void setUIExtensionsManager (UIExtensionsManager manager)
 
UIExtensionsManager getUIExtensionsManager ()
 
 PDFViewCtrl (Context context, AttributeSet attrs)
 
 PDFViewCtrl (Context context)
 
void recoverForOOM ()
 
void setDoc (PDFDoc pdfDocument)
 
PDFDoc getDoc ()
 
int getPageCount ()
 
void openDoc (final String path, final byte[] password)
 
void openDocFromMemory (final byte[] buffer, final byte[] password)
 
void openDoc (Uri uri, final byte[] password)
 
void openDocFromUrl (String url, byte[] password, CacheOption cacheOption, HttpRequestProperties properties)
 
void clearCacheFile (String url)
 
void clearAllCacheFiles ()
 
void openDoc (final FileReaderCallback FileReader, final byte[] password)
 
void closeDoc ()
 
void saveDoc (String filePath, int flag)
 
void saveDoc (FileWriterCallback fileWriter, int flag)
 
void setHScrollPos (int pos)
 
void setVScrollPos (int pos)
 
int getHScrollPos ()
 
int getVScrollPos ()
 
int getVScrollRange ()
 
int getHScrollRange ()
 
int getCurrentPage ()
 
int[] getVisiblePages ()
 
int[] getCachePages ()
 
int getPageIndex (PointF displayViewPt)
 
int getPageViewWidth (int pageIndex)
 
int getPageViewHeight (int pageIndex)
 
Rect getPageViewRect (int pageIndex)
 
boolean isTouchPageView (Point point)
 
int getDisplayViewWidth ()
 
int getDisplayViewHeight ()
 
void gotoPage (int pageIndex)
 
void gotoFirstPage ()
 
void gotoLastPage ()
 
void gotoPrevPage ()
 
void gotoNextPage ()
 
void setPageLayoutMode (@PageMode int lMode)
 
int getPageLayoutMode ()
 
void setContinuous (boolean isContinuous)
 
boolean isContinuous ()
 
int getReflowMode ()
 
void setReflowMode (int reflowMode)
 
void setZoomMode (int zMode)
 
int getZoomMode ()
 
void setZoom (Point devicePt, float factor)
 
void zoomToRect (int pageIndex, RectF pageViewRect, int fitMode)
 
void setZoom (float factor)
 
float getZoom ()
 
void setKeepZoomRatio (boolean keep)
 
boolean isKeepZoomRatio ()
 
boolean isNightMode ()
 
void setNightMode (boolean bNightMode)
 
void setColorMode (int colorMode)
 
int getColorMode ()
 
int getMappingModeBackgroundColor ()
 
void setMappingModeBackgroundColor (int mappingModeBackgroundColor)
 
int getMappingModeForegroundColor ()
 
void setMappingModeForegroundColor (int mappingModeForegroundColor)
 
void setBackgroundColor (int color)
 
Matrix getDisplayMatrix (int pageIndex)
 
boolean convertPageViewPtToPdfPt (PointF pageViewPt, PointF pdfPt, int pageIndex)
 
boolean convertPdfPtToPageViewPt (PointF pdfPt, PointF pageViewPt, int pageIndex)
 
boolean convertPdfRectToPageViewRect (RectF pdfRectF, RectF pageViewRectF, int pageIndex)
 
boolean convertPageViewRectToPdfRect (RectF pageViewRectF, RectF pdfRectF, int pageIndex)
 
boolean convertPageViewRectToDisplayViewRect (RectF pageViewRectF, RectF displayViewRectF, int pageIndex)
 
boolean convertDisplayViewRectToPageViewRect (RectF displayViewRectF, RectF pageViewRectF, int pageIndex)
 
boolean convertPageViewPtToDisplayViewPt (PointF pageViewPt, PointF displayViewPt, int pageIndex)
 
boolean convertDisplayViewPtToPageViewPt (PointF displayViewPt, PointF pageViewPt, int pageIndex)
 
void refresh (int pageIndex, Rect rect)
 
boolean hasPrevView ()
 
boolean hasNextView ()
 
void gotoPrevView ()
 
void gotoNextView ()
 
void slideToPreviousScreen ()
 
void slideToNextScreen ()
 
void gotoPage (int pageIndex, PointF pdfPt)
 
void gotoPage (int pageIndex, float devOffsetX, float devOffsetY)
 
void addNodePage (int pageIndex)
 
void updatePagesLayout ()
 
boolean isPageVisible (int pageIndex)
 
ThumbListView getThumbnailView ()
 
boolean onSingleTapConfirmed (MotionEvent e)
 
boolean onDoubleTap (MotionEvent e)
 
boolean onDoubleTapEvent (MotionEvent e)
 
boolean onScale (ScaleGestureDetector detector)
 
boolean onScaleBegin (ScaleGestureDetector detector)
 
void onScaleEnd (ScaleGestureDetector detector)
 
boolean onTouchEvent (MotionEvent e)
 
boolean onDown (MotionEvent e)
 
void onShowPress (MotionEvent e)
 
boolean onSingleTapUp (MotionEvent e)
 
boolean onScroll (MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
 
void onLongPress (MotionEvent e)
 
boolean onFling (MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
 
void addTask (Task task)
 
void removeTask (Task task)
 
int getDensityDpi ()
 
boolean setCropMode (int mode)
 
boolean setCropRect (int pageIndex, RectF cropRect)
 
RectF getCropRect (int pageIndex)
 
void setFilePath (String filePath)
 
String getFilePath ()
 
void enableTilingRefresh (boolean isTilingRefresh)
 
void enableTurnPageBySliding (boolean isTurnPageBySliding)
 
void appendPageView (View view)
 
void scrollView (float distanceX, float distanceY)
 
void setMaxZoomLimit (float maxZoomLimit)
 
float getMaxZoomLimit ()
 
void setMinZoomLimit (float minZoomLimit)
 
float getMinZoomLimit ()
 
boolean isOwner ()
 
int getUserPermission ()
 
void setPageSpacing (int space)
 
void setPageSpacing (int space, int direction)
 
XFADoc getXFADoc ()
 
boolean isDynamicXFA ()
 
void setAppProvider (AppProviderCallback callback)
 
AppProviderCallback getAppProvider ()
 
Activity getAttachedActivity ()
 
void setAttachedActivity (Activity attachedActivity)
 
void registerActivityResultListener (IActivityResultListener listener)
 
void unregisterActivityResultListener (IActivityResultListener listener)
 
void handleActivityResult (int requestCode, int resultCode, Intent data)
 
void rotateView (int rotation)
 
int getViewRotation ()
 
void setReflowBackgroundColor (int color)
 
int getReflowBackgroundColor ()
 
void enablePageFlippingByTouchBorder (boolean pageFlipping)
 
boolean isPageFlippingByTouchBorder ()
 
void renderRmsWatermark (PDFPage page, Renderer renderer, Matrix2D displayMatrix)
 
void saveAsWrapperFile (String path, int flag)
 
void setPageBinding (@PageBinding int pageBinding)
 
int getPageBinding ()
 
void registerPageAutoEventListener (IPageAutoEventListener listener)
 
void unregisterPageAutoEventListener (IPageAutoEventListener listener)
 
void setGestureLockFlags (int lockFlags)
 
boolean removeSecurity (PDFDoc doc)
 

Static Public Member Functions

static void lock ()
 
static void unlock ()
 
static void setExceptionLogger (Context context, String foldPath, final IExceptionLogger logger)
 

Public Attributes

boolean shouldRecover = true
 

Static Public Attributes

static final int PAGELAYOUTMODE_SINGLE = 1
 
static final int PAGELAYOUTMODE_REFLOW = 2
 
static final int PAGELAYOUTMODE_FACING = 3
 
static final int PAGELAYOUTMODE_COVER = 4
 
static final int PDF_PAGE_STYLE_TYPE_BLANK = 1
 
static final int PDF_PAGE_STYLE_TYPE_LINED = 2
 
static final int PDF_PAGE_STYLE_TYPE_GRID = 3
 
static final int PDF_PAGE_STYLE_TYPE_GRAPH = 4
 
static final int PDF_PAGE_STYLE_TYPE_MUSIC = 5
 
static final int GESTURE_LOCK_NONE = 0
 
static final int GESTURE_LOCK_SINGLE_TAP = 1
 
static final int GESTURE_LOCK_DOUBLE_TAP = 1 << 1
 
static final int GESTURE_LOCK_PINCH = 1 << 2
 
static final int GESTURE_LOCK_PAN = 1 << 3
 
static final int LEFT_EDGE = 0
 
static final int RIGHT_EDGE = 1
 
static final int AUTO_NONE = 0
 
static final int AUTO_SCROLL_CORRECTION = 1
 
static final int AUTO_FLING = 2
 
static final int AUTO_SCROLL_TURNPAGE = 3
 
static final int AUTO_ZOOMIN = 4
 
static final int AUTO_ZOOMOUT = 5
 
static final int AUTO_ZOOM_RECT = 6
 
static final int ZOOMMODE_CUSTOMIZE = 0
 
static final int ZOOMMODE_FITWIDTH = 1
 
static final int ZOOMMODE_FITHEIGHT = 2
 
static final int ZOOMMODE_FITPAGE = 3
 
static final int PAGESPACING_HORIZONTAL = 0x0001
 
static final int PAGESPACING_VERTICAL = 0x0002
 
static final int ZOOM_FITRECT_RECT = 0
 
static final int ZOOM_FITRECT_WIDTH = 1
 
static final int ZOOM_FITRECT_HEIGHT = 2
 

Detailed Description

Class PDFViewCtrl represents a PDF view control.

PDFViewCtrl class provides the functionaries to interact with rendering PDF documents. It implements some essential features which are required in interactive rendering applications. There are three coordinate systems for PDF view control:

  • Display View Coordinate System: Which is the displaying area of view control, all the pages will be displayed on the display view.
  • Page View Coordinate System: It use upper-left corner of the page view as origin point(0, 0).
  • PDF Coordinate System: The PDF page coordinate system.

Foxit has implemented an automatically recovering system when Foxit PDF SDK runs out of memory. When OOM happens, the Foxit PDF SDK will try to restore to the latest reading status before OOM. However, if the user has modified/added/deleted something on PDF document, those will not recovered by Foxit PDF SDK.

Constructor & Destructor Documentation

◆ PDFViewCtrl() [1/2]

com.foxit.sdk.PDFViewCtrl.PDFViewCtrl ( Context  context,
AttributeSet  attrs 
)

Construct a new PDF viewer control.

Parameters
contextA Context object which species the context.
attrsAn AttributeSet object which species the attribute set.

◆ PDFViewCtrl() [2/2]

com.foxit.sdk.PDFViewCtrl.PDFViewCtrl ( Context  context)

Construct a new PDF viewer control.

Parameters
contextA Context object which species the context.

Member Function Documentation

◆ addImagePage()

boolean com.foxit.sdk.PDFViewCtrl.addImagePage ( final int  dstIndex,
String  imagePath 
)

Add image as a page for the current document.

Parameters
dstIndexA page index in current PDF document. This is used to specify where the image will be added. If parameter dstIndex is less than 0, the image will be added to the first.
If parameter dstIndex is equal to or larger than current page count, the image will be added to the end.
imagePathThe image path. The format of the picture needs to be in line with Android's official requirements(.jpg,.png,.gif,.bmp,.webp)
Returns
true means success, while false means failure.

◆ addNodePage()

void com.foxit.sdk.PDFViewCtrl.addNodePage ( int  pageIndex)

Add the task node page of the previous operation

Parameters
pageIndexPage index. Valid range: from 0 to (count-1). count is the page count.

◆ addTask()

void com.foxit.sdk.PDFViewCtrl.addTask ( Task  task)

Add task to view control.

Parameters
taskThe task which would be added.

◆ appendPageView()

void com.foxit.sdk.PDFViewCtrl.appendPageView ( View  view)

Append a customized view after pdf page views.

Parameters
viewThe specified view to add. User-defined view is appended as the new last page view. User events and interactions of the appended view is handled by themselves. The pdf file is not changed. This method can be called multi-times.

◆ clearAllCacheFiles()

void com.foxit.sdk.PDFViewCtrl.clearAllCacheFiles ( )

◆ clearCacheFile()

void com.foxit.sdk.PDFViewCtrl.clearCacheFile ( String  url)

Clear the cache file by the specified url.

Parameters
urlThe url of the document that used in openDocFromUrl(String, byte[], CacheOption, HttpRequestProperties) openDocFromUrl(String, byte[], CacheOption, HttpRequestProperties)

◆ closeDoc()

void com.foxit.sdk.PDFViewCtrl.closeDoc ( )

Close the displayed document.

◆ convertDisplayViewPtToPageViewPt()

boolean com.foxit.sdk.PDFViewCtrl.convertDisplayViewPtToPageViewPt ( PointF  displayViewPt,
PointF  pageViewPt,
int  pageIndex 
)

Convert display view point to page view point.

Parameters
displayViewPtThe display view point.
pageViewPtOutput parameter that receives the page view point as result.
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
true means success.
false means failure.

◆ convertDisplayViewRectToPageViewRect()

boolean com.foxit.sdk.PDFViewCtrl.convertDisplayViewRectToPageViewRect ( RectF  displayViewRectF,
RectF  pageViewRectF,
int  pageIndex 
)

Convert display view rectangle to page view rectangle.

Parameters
displayViewRectFThe display view rectangle.
pageViewRectFOutput parameter that receives the page view rectangle as result.
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
true means success.
false means failure.

◆ convertPageViewPtToDisplayViewPt()

boolean com.foxit.sdk.PDFViewCtrl.convertPageViewPtToDisplayViewPt ( PointF  pageViewPt,
PointF  displayViewPt,
int  pageIndex 
)

Convert page view point to display view point.

Parameters
pageViewPtThe page view point.
displayViewPtOutput parameter that receives the display view point as result.
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
true means success.
false means failure.

◆ convertPageViewPtToPdfPt()

boolean com.foxit.sdk.PDFViewCtrl.convertPageViewPtToPdfPt ( PointF  pageViewPt,
PointF  pdfPt,
int  pageIndex 
)

Convert page view point to PDF point.

Parameters
pageViewPtThe point on the page view.
pdfPtOutput parameter that receives the PDF point as result.
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
true means success.
false means failure.

◆ convertPageViewRectToDisplayViewRect()

boolean com.foxit.sdk.PDFViewCtrl.convertPageViewRectToDisplayViewRect ( RectF  pageViewRectF,
RectF  displayViewRectF,
int  pageIndex 
)

Convert page view rectangle to display view rectangle.

Parameters
pageViewRectFThe page view rectangle.
displayViewRectFOutput parameter that receives the display view rectangle as result.
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
true means success.
false means failure.

◆ convertPageViewRectToPdfRect()

boolean com.foxit.sdk.PDFViewCtrl.convertPageViewRectToPdfRect ( RectF  pageViewRectF,
RectF  pdfRectF,
int  pageIndex 
)

Convert page view rectangle to pdf rectangle.

Parameters
pageViewRectFThe page view rectangle.
pdfRectFOutput parameter that receives the pdf rectangle as result
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
true means success.
false means failure.

◆ convertPdfPtToPageViewPt()

boolean com.foxit.sdk.PDFViewCtrl.convertPdfPtToPageViewPt ( PointF  pdfPt,
PointF  pageViewPt,
int  pageIndex 
)

Convert pdf point to page view point coordination.

Parameters
pdfPtThe PDF point.
pageViewPtOutput parameter that receives the page view point as result
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
true means success.
false means failure.

◆ convertPdfRectToPageViewRect()

boolean com.foxit.sdk.PDFViewCtrl.convertPdfRectToPageViewRect ( RectF  pdfRectF,
RectF  pageViewRectF,
int  pageIndex 
)

Convert pdf rectangle to page view rectangle.

Parameters
pdfRectFThe PDF rectangle.
pageViewRectFOutput parameter that receives the page view rectangle as result.
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
true means success.
false means failure.

◆ enablePageFlippingByTouchBorder()

void com.foxit.sdk.PDFViewCtrl.enablePageFlippingByTouchBorder ( boolean  pageFlipping)

Whether to flip the page by touching border.

Parameters
pageFlippingtrue means to flip page by touching border.

◆ enableTilingRefresh()

void com.foxit.sdk.PDFViewCtrl.enableTilingRefresh ( boolean  isTilingRefresh)

Whether to refresh page view by using tiling or not.

Parameters
isTilingRefreshtrue means using tiling refresh. or refresh the whole page view.

◆ enableTurnPageBySliding()

void com.foxit.sdk.PDFViewCtrl.enableTurnPageBySliding ( boolean  isTurnPageBySliding)

Whether to turn the page by sliding.

NOTE: 1: if turn the page by sliding is disabled, then you should turn pages byPDFViewCtrl#gotoPage(int) yourself. 2: This will only take effect when PDFViewCtrl#isContinuous() is false.

Parameters
isTurnPageBySlidingtrue means turn page by sliding, or turn page without sliding

◆ getAppProvider()

AppProviderCallback com.foxit.sdk.PDFViewCtrl.getAppProvider ( )

Get the AppProviderCallback object.

Returns
The AppProviderCallback object.

◆ getAttachedActivity()

Activity com.foxit.sdk.PDFViewCtrl.getAttachedActivity ( )

Get the attached activity

Returns
The attached activity.

◆ getCachePages()

int [] com.foxit.sdk.PDFViewCtrl.getCachePages ( )

Get cached pages.

Returns
cached pages.

◆ getColorMode()

int com.foxit.sdk.PDFViewCtrl.getColorMode ( )

Get the colorMode

Returns
colorMode

◆ getCropRect()

RectF com.foxit.sdk.PDFViewCtrl.getCropRect ( int  pageIndex)

Return the crop rect of the specified page.

Parameters
pageIndexPage index of the cropped page.
Returns
The crop rectangle on the PDF page, in pdf coordinate.

◆ getCurrentPage()

int com.foxit.sdk.PDFViewCtrl.getCurrentPage ( )

Get the current page index.

Returns
Current page index.

◆ getDensityDpi()

int com.foxit.sdk.PDFViewCtrl.getDensityDpi ( )

Gets density dpi.

Returns
the density dpi

◆ getDisplayMatrix()

Matrix com.foxit.sdk.PDFViewCtrl.getDisplayMatrix ( int  pageIndex)

Get the display matrix of a specified page.

Parameters
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
The display matrix.

◆ getDisplayViewHeight()

int com.foxit.sdk.PDFViewCtrl.getDisplayViewHeight ( )

Get display view height.

Returns
Height of the display view.

◆ getDisplayViewWidth()

int com.foxit.sdk.PDFViewCtrl.getDisplayViewWidth ( )

Get display view width.

Returns
Width of the display view.

◆ getDoc()

PDFDoc com.foxit.sdk.PDFViewCtrl.getDoc ( )

Get current displayed PDF document from view control

Returns
A PDFDoc object which represents current PDF document.

◆ getFilePath()

String com.foxit.sdk.PDFViewCtrl.getFilePath ( )

Return the current file path.

Returns
The current file path.

◆ getHScrollPos()

int com.foxit.sdk.PDFViewCtrl.getHScrollPos ( )

Get the horizontal scroll position.

Returns
The scrolled left position.

◆ getHScrollRange()

int com.foxit.sdk.PDFViewCtrl.getHScrollRange ( )

Get the horizontal scroll range.

Returns
The horizontal scroll range.

◆ getMappingModeBackgroundColor()

int com.foxit.sdk.PDFViewCtrl.getMappingModeBackgroundColor ( )

Get the "background color" while in Renderer#e_ColorModeMapping or Renderer#e_ColorModeMappingGray color mode.

You can get the current color mode by using getColorMode()

Returns
the "background color"

◆ getMappingModeForegroundColor()

int com.foxit.sdk.PDFViewCtrl.getMappingModeForegroundColor ( )

Get the "foreground color" while in Renderer#e_ColorModeMapping or Renderer#e_ColorModeMappingGray color mode.

You can get the current color mode by using getColorMode()

Returns
the "foreground color"

◆ getMaxZoomLimit()

float com.foxit.sdk.PDFViewCtrl.getMaxZoomLimit ( )

Get the maximum zoom bound

Returns
the maximum zoom bound, default: 8.0f

◆ getMinZoomLimit()

float com.foxit.sdk.PDFViewCtrl.getMinZoomLimit ( )

Get the minimum zoom bound

Returns
the minimum zoom bound, default: 1.0f

◆ getPageBinding()

int com.foxit.sdk.PDFViewCtrl.getPageBinding ( )

Get the current document's PageBinding.

Returns
The current PageBinding set on this document.

◆ getPageCount()

int com.foxit.sdk.PDFViewCtrl.getPageCount ( )

Get the page count of PDF document.

Returns
The count of page.

◆ getPageIndex()

int com.foxit.sdk.PDFViewCtrl.getPageIndex ( PointF  displayViewPt)

Get the page index with device point.

Parameters
displayViewPtA PointF value which specifies the device point.
Returns
The page index, starting from 0.

◆ getPageLayoutMode()

int com.foxit.sdk.PDFViewCtrl.getPageLayoutMode ( )

Get page layout mode.

Returns
The page layout mode. One of PAGELAYOUTMODE_SINGLE,PAGELAYOUTMODE_REFLOW, PAGELAYOUTMODE_FACING, PAGELAYOUTMODE_COVER

◆ getPageViewHeight()

int com.foxit.sdk.PDFViewCtrl.getPageViewHeight ( int  pageIndex)

Get the height of a specified page view.

Parameters
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
Height of the page view.

◆ getPageViewRect()

Rect com.foxit.sdk.PDFViewCtrl.getPageViewRect ( int  pageIndex)

Get the size of a specified page view relative to its parent.

Parameters
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
The rect of the whole page view in the display view coordinate.

◆ getPageViewWidth()

int com.foxit.sdk.PDFViewCtrl.getPageViewWidth ( int  pageIndex)

Get the width of a specified page view.

Parameters
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
Width of the page view.

◆ getReflowBackgroundColor()

int com.foxit.sdk.PDFViewCtrl.getReflowBackgroundColor ( )

Gets the background color in reflow mode

Returns
The background color in reflow mode

◆ getReflowMode()

int com.foxit.sdk.PDFViewCtrl.getReflowMode ( )

Get the reflow mode

Returns
The reflow mode. Please refer to values starting from ReflowPage#e_Normal and this can be one or combination of these values. Default value: ReflowPage#e_Normal|ReflowPage#e_WithImage.

◆ getThumbnailView()

ThumbListView com.foxit.sdk.PDFViewCtrl.getThumbnailView ( )

Get the thumbnail list view.

Returns
A ThumbListView object.

◆ getUIExtensionsManager()

UIExtensionsManager com.foxit.sdk.PDFViewCtrl.getUIExtensionsManager ( )

Get UI extensions manager.

Returns
An UIExtensionsManager object which represents the UI extensions manager.

◆ getUserPermission()

int com.foxit.sdk.PDFViewCtrl.getUserPermission ( )

Get user access permissions.

Returns
User access permission. Please refer to values starting from PDFDoc#e_PermPrint and this can be one or combination of these values.

◆ getViewRotation()

int com.foxit.sdk.PDFViewCtrl.getViewRotation ( )
Returns
the rotation of the view. Please refer to values starting from com.foxit.sdk.common.Constants#e_Rotation0 and this should be one of these values.

◆ getVisiblePages()

int [] com.foxit.sdk.PDFViewCtrl.getVisiblePages ( )

Get an integer array which specifies indexes of current visible pages.

Returns
The indexes array for current visible pages.

◆ getVScrollPos()

int com.foxit.sdk.PDFViewCtrl.getVScrollPos ( )

Get the vertical scroll position.

Returns
The scrolled top position.

◆ getVScrollRange()

int com.foxit.sdk.PDFViewCtrl.getVScrollRange ( )

Get the vertical scroll range.

Returns
The vertical scroll range.

◆ getXFADoc()

XFADoc com.foxit.sdk.PDFViewCtrl.getXFADoc ( )

Get the current XFA document.

Returns
A XFADoc object which represents current XFA document.

◆ getZoom()

float com.foxit.sdk.PDFViewCtrl.getZoom ( )

Get the zoom factor.

Returns
Zoom factor. Default valid range from 1.0f to 8.0f. 1.0f is the value of the fit page mode (the initial model).

◆ getZoomMode()

int com.foxit.sdk.PDFViewCtrl.getZoomMode ( )

Get the current zoom mode.

Returns
Current zoom mode. Please refer to values starting from ZOOMMODE_CUSTOMIZE and this would be one of these values.

◆ gotoFirstPage()

void com.foxit.sdk.PDFViewCtrl.gotoFirstPage ( )

Go to the first page.

◆ gotoLastPage()

void com.foxit.sdk.PDFViewCtrl.gotoLastPage ( )

Go to the last page.

◆ gotoNextPage()

void com.foxit.sdk.PDFViewCtrl.gotoNextPage ( )

Go to the next page.

◆ gotoNextView()

void com.foxit.sdk.PDFViewCtrl.gotoNextView ( )

Go to next view.

◆ gotoPage() [1/3]

void com.foxit.sdk.PDFViewCtrl.gotoPage ( int  pageIndex)

Go to a specified page.

Parameters
pageIndexPage index. Valid range: from 0 to (count-1). count is the page count.

◆ gotoPage() [2/3]

void com.foxit.sdk.PDFViewCtrl.gotoPage ( int  pageIndex,
float  devOffsetX,
float  devOffsetY 
)

Go to a specified page, then move to a specified position in display view coordinate system.

The new position is specified by offset X and offset Y.
Here, the left-top corner of display view coordinate system is treated as the base point. Offset X and offset Y means the offset values from left-top corner of page view coordinate system to the base point in display view coordinate system.

Parameters
pageIndexPage index. Valid range: from 0 to (count-1). count is the page count.
devOffsetXOffset X value in display view coordinate system.
devOffsetYOffset Y value in display view coordinate system.

◆ gotoPage() [3/3]

void com.foxit.sdk.PDFViewCtrl.gotoPage ( int  pageIndex,
PointF  pdfPt 
)

Go to a specified page, then move to a specified position in PDF coordinate.

Parameters
pageIndexPage index. Valid range: from 0 to (count-1). count is the page count.
pdfPtThe pdf point.

◆ gotoPrevPage()

void com.foxit.sdk.PDFViewCtrl.gotoPrevPage ( )

Go to the previous page.

◆ gotoPrevView()

void com.foxit.sdk.PDFViewCtrl.gotoPrevView ( )

Go to previous view.

◆ handleActivityResult()

void com.foxit.sdk.PDFViewCtrl.handleActivityResult ( int  requestCode,
int  resultCode,
Intent  data 
)

Receive and handle result from activity.

NOTE: Should call this function in Activity#onActivityResult(int, int, Intent) or android.app.Fragment#onActivityResult(int, int, Intent) when you open a rms file.

Parameters
requestCodethe request code
resultCodethe result code
datathe data

◆ hasNextView()

boolean com.foxit.sdk.PDFViewCtrl.hasNextView ( )

Check if current view control has a next view.

Returns
true means current view control has a next page view. false means current view control does not have a next page view.

◆ hasPrevView()

boolean com.foxit.sdk.PDFViewCtrl.hasPrevView ( )

Check if current view control has a previous view.

Returns
true means current view control has a previous page view. false means current view control does not have a previous page view.

◆ insertPages() [1/4]

boolean com.foxit.sdk.PDFViewCtrl.insertPages ( int  dstIndex,
int  flags,
String  layerName,
PDFDoc  srcDoc,
int[]  pageRanges 
)

Start to import pages from another PDF document (via file path). After all operations are ended, you need to call the PDFViewCtrl#updatePagesLayout() to update pages layout.

Note: Currently not support to import pages from a PDF which contains XFA form.

Parameters
dstIndexA page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter dstIndex is less than 0, the imported pages will be inserted to the first.
If parameter dstIndex is equal to or larger than current page count, the imported pages will be inserted to the end.
flagsOptions for importing pages. Please refer to values starting from PDFDoc#e_ImportFlagNormal and this can be one or combination of these values.
layerNameThe name of non-selectable label or the prefix name of the non-selectable label to be shown in layer panel of application, in UTF-8 encoding. If parameter flags contains PDFDoc#e_ImportFlagWithLayers, this should not be empty and should be a valid string. If parameter flags does not contain PDFDoc#e_ImportFlagWithLayers, this string will be ignored.
  • If all the pages of source PDF document is to be imported to current document, all layers from source document will be grouped under a non-selectable label, and this string will be directly used as the label.
  • If only part of pages of source PDF document is to be imported to current document, layers in the same page will be grouped under a single non-selectable label, and this string will be used as the prefix name of the label. The label will be like "layerName_Page_X".
srcDocA PDFDoc object com.foxit.sdk.pdf.PDFDoc that represents the source PDF document, whose pages will be imported to current PDF document. Please keep this source document valid until current document will not be saved any more.
pageRangesAn integer array which contains the page ranges of source PDF document, to be imported.
In this array, 2 numbers are a pair: the first integer is the starting page index, and the second integer is the page count.
If this parameter is not null, it should contains at least 2 numbers, and the count of elements should be a multiples of 2.
Returns
true means success, while false means failure.

◆ insertPages() [2/4]

boolean com.foxit.sdk.PDFViewCtrl.insertPages ( int  dstIndex,
int  flags,
String  layerName,
String  srcFilePath,
byte[]  password,
int[]  pageRanges 
)

Start to import pages from another PDF document (via file path). After all operations are ended, you need to call the PDFViewCtrl#updatePagesLayout() to update pages layout.

Note: Currently not support to import pages from a PDF which contains XFA form.

Parameters
dstIndexA page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter dstIndex is less than 0, the imported pages will be inserted to the first.
If parameter dstIndex is equal to or larger than current page count, the imported pages will be inserted to the end.
flagsOptions for importing pages. Please refer to values starting from PDFDoc#e_ImportFlagNormal and this can be one or combination of these values.
layerNameThe name of non-selectable label or the prefix name of the non-selectable label to be shown in layer panel of application, in UTF-8 encoding. If parameter flags contains PDFDoc#e_ImportFlagWithLayers, this should not be empty and should be a valid string. If parameter flags does not contain PDFDoc#e_ImportFlagWithLayers, this string will be ignored.
  • If all the pages of source PDF document is to be imported to current document, all layers from source document will be grouped under a non-selectable label, and this string will be directly used as the label.
  • If only part of pages of source PDF document is to be imported to current document, layers in the same page will be grouped under a single non-selectable label, and this string will be used as the prefix name of the label. The label will be like "layerName_Page_X".
srcFilePathThe file path of source PDF document, from which some pages will be imported to current PDF document.
passwordThe password string for source PDF document. It should be in UTF-8 encoding. If source PDF document is not encrypted by password, just pass an empty string.
pageRangesAn integer array which contains the page ranges of source PDF document, to be imported.
In this array, 2 numbers are a pair: the first integer is the starting page index, and the second integer is the page count.
This parameter is not null, it should contains at least 2 numbers, and the count of elements should be a multiples of 2.
Returns
true means success, while false means failure.

◆ insertPages() [3/4]

boolean com.foxit.sdk.PDFViewCtrl.insertPages ( int  index,
float  width,
float  height,
int  style,
int  color,
int  rotation,
int  count 
)

Insert a new blank PDF page to document, by index.

Parameters
indexA page index in current PDF document. This is used to specify where the imported pages will be inserted.
If parameter index is less than 0, the new page will be inserted to the first.
If parameter index is equal to or larger than the count of pages, the new page will be inserted to the end.
widthWidth of new page (unit is 1/72 inch).
heightHeight of new page (unit is 1/72 inch).
styleStyle of new page.Please refer to values starting from PDFViewCtrl#PDF_PAGE_STYLE_TYPE_BLANKand this should be one of these values. Default value: PDFViewCtrl#PDF_PAGE_STYLE_TYPE_BLANK
colorColor of new page. Format: 0xAARRGGBB.
rotationRotation value of new page. Please refer to values starting from com.foxit.sdk.common.Constants#e_Rotation0 and this should be one of these values except com.foxit.sdk.common.Constants#e_RotationUnknown
countThe count of new pages to be inserted.
Returns
true means success, while false means failure.

◆ insertPages() [4/4]

boolean com.foxit.sdk.PDFViewCtrl.insertPages ( int  index,
int  size,
int  style,
int  color,
int  rotation,
int  count 
)

Insert a new blank PDF page to document, by index.

Parameters
indexA page index in current PDF document. This is used to specify where the imported pages will be inserted.
If parameter index is less than 0, the new page will be inserted to the first.
If parameter index is equal to or larger than the count of pages, the new page will be inserted to the end.
sizeSize type of new page. Please refer to values starting from PDFPage#e_SizeLetterand this should be one of these values. Default value: PDFPage#e_SizeLetter
styleStyle of new page.Please refer to values starting from PDFViewCtrl#PDF_PAGE_STYLE_TYPE_BLANKand this should be one of these values. Default value: PDFViewCtrl#PDF_PAGE_STYLE_TYPE_BLANK
colorColor of new page. Format: 0xAARRGGBB.
rotationRotation value of new page.Please refer to values starting from com.foxit.sdk.common.Constants#e_Rotation0 and this should be one of these values except com.foxit.sdk.common.Constants#e_RotationUnknown
countThe count of new pages to be inserted.
Returns
true means success, while false means failure.

◆ isContinuous()

boolean com.foxit.sdk.PDFViewCtrl.isContinuous ( )

Whether the page layout mode is continuous. Note: It's invalid for PDFViewCtrl#PAGELAYOUTMODE_REFLOW mode.

Returns
true means page layout mode is continuous.

◆ isDynamicXFA()

boolean com.foxit.sdk.PDFViewCtrl.isDynamicXFA ( )

Check whether the current xfa document is Dynamic xfa.

Returns
true means the current xfa document is Dynamic xfa, while false means the current xfa document is not Dynamic xfa.

◆ isKeepZoomRatio()

boolean com.foxit.sdk.PDFViewCtrl.isKeepZoomRatio ( )

Get whether to keep the zoom ratio when turning pages in non-continuous page mode.

Returns
true means to keep the zoom ratio when turning pages in non-continuous page mode.

◆ isNightMode()

boolean com.foxit.sdk.PDFViewCtrl.isNightMode ( )

Check if it's night mode

Deprecated:
Use getColorMode() instead.
Returns
true means is the night mode

◆ isOwner()

boolean com.foxit.sdk.PDFViewCtrl.isOwner ( )

Check whether current user is the owner.

Returns
true means current user is the owner, while false means current user is not the owner.

◆ isPageFlippingByTouchBorder()

boolean com.foxit.sdk.PDFViewCtrl.isPageFlippingByTouchBorder ( )

Check whether to flip the page by touching border.

Returns
true means current user is the owner, while false means current user is not the owner.

◆ isPageVisible()

boolean com.foxit.sdk.PDFViewCtrl.isPageVisible ( int  pageIndex)

Check whether a specified page is visible or not.

Parameters
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
true means the specified page is visible. false means the specified page is invisible.

◆ isTouchPageView()

boolean com.foxit.sdk.PDFViewCtrl.isTouchPageView ( Point  point)

Whether to click page view

Parameters
pointPress the position
Returns
The Whether to click page view

◆ lock()

static void com.foxit.sdk.PDFViewCtrl.lock ( )
static

Lock to sync with page rendering process in the view control. Usually caller should call this API before page content is modified or annotation is going to reset its appearance.

◆ movePage()

boolean com.foxit.sdk.PDFViewCtrl.movePage ( int  index,
int  dstIndex 
)

Move page to destination index. After all operations are ended, you need to call the PDFViewCtrl#updatePagesLayout() to update pages layout.

Parameters
indexThe index of page which will be moved.
dstIndexThe destination index.
Returns
true means success, while false means failure.

◆ onDoubleTap()

boolean com.foxit.sdk.PDFViewCtrl.onDoubleTap ( MotionEvent  e)

Notified when a double-tap occurs.

Parameters
eThe down motion event of the first tap of the double-tap.
Returns
true means the event is consumed, while false means not.

◆ onDoubleTapEvent()

boolean com.foxit.sdk.PDFViewCtrl.onDoubleTapEvent ( MotionEvent  e)

Notified when an event within a double-tap gesture occurs, including down, move, and up events.

Parameters
eThe motion event that occurred during the double-tap gesture.
Returns
true means the event is consumed, while false means not.

◆ onDown()

boolean com.foxit.sdk.PDFViewCtrl.onDown ( MotionEvent  e)

Notified when a tap occurs with the down MotionEvent that triggered it.

This will be triggered immediately for every down event. All other events should be preceded by this.

Parameters
eThe down motion event.
Returns
true means the event is consumed.
false means not.

◆ onFling()

boolean com.foxit.sdk.PDFViewCtrl.onFling ( MotionEvent  e1,
MotionEvent  e2,
float  velocityX,
float  velocityY 
)

Notified of a fling event when it occurs with the initial on down MotionEvent and the matching up MotionEvent. The calculated velocity is supplied along the x and y axis in pixels per second.

Parameters
e1The first down motion event that started the fling.
e2The move motion event that triggered the current onFling.
velocityXThe velocity of this fling measured in pixels per second along the x axis.
velocityYThe velocity of this fling measured in pixels per second along the y axis.
Returns
true means the event is consumed, while false means not.

◆ onLongPress()

void com.foxit.sdk.PDFViewCtrl.onLongPress ( MotionEvent  e)

Notified when a long press occurs with the initial on down MotionEvent that trigger it.

It will dispatch the long-press event to function

Parameters
eThe initial on down motion event that started the long-press. com.foxit.sdk.PDFViewCtrl.UIExtensionsManager#onTouchEvent(MotionEvent) if interface UIExtensionsManager implemented has been set to current view control.

◆ onScale()

boolean com.foxit.sdk.PDFViewCtrl.onScale ( ScaleGestureDetector  detector)

Respond to scaling events for a gesture in progress. Reported by pointer motion.

Parameters
detectorThe detector reporting the event - use this to retrieve extended info about event state.
Returns
true means the detector should consider this event as handled. false means the detector does not need to consider this event as handled. If an event was not handled, the detector will continue to accumulate movement until an event is handled. This can be useful if an application, for example, only wants to update scaling factors if the change is greater than 0.01.

◆ onScaleBegin()

boolean com.foxit.sdk.PDFViewCtrl.onScaleBegin ( ScaleGestureDetector  detector)

Responds to the beginning of a scaling gesture. Reported by new pointers going down.

Parameters
detectorThe detector reporting the event - use this to retrieve extended info about event state.
Returns
true means the detector should continue recognizing this gesture. false means the detector does not need to continue recognizing this gesture. For example, if a gesture is beginning with a focal point outside of a region where it makes sense, this function may return false to ignore the rest of the gesture.

◆ onScaleEnd()

void com.foxit.sdk.PDFViewCtrl.onScaleEnd ( ScaleGestureDetector  detector)

Responds to the end of a scale gesture. Reported by existing pointers going up.

Parameters
detectorThe detector reporting the event - use this to retrieve extended info about event state.

◆ onScroll()

boolean com.foxit.sdk.PDFViewCtrl.onScroll ( MotionEvent  e1,
MotionEvent  e2,
float  distanceX,
float  distanceY 
)

Notified when a scroll occurs with the initial on down MotionEvent and the current move MotionEvent. The distance in x and y is also supplied for convenience.

Parameters
e1The first down motion event that started the scrolling.
e2The move motion event that triggered the current onScroll.
distanceXThe distance along the X axis that has been scrolled since the last call to onScroll. This is NOT the distance between
e1
and
e2
.
distanceYThe distance along the Y axis that has been scrolled since the last call to onScroll. This is NOT the distance between
e1
and
e2
.
Returns
true means the event is consumed, while false means not.

◆ onShowPress()

void com.foxit.sdk.PDFViewCtrl.onShowPress ( MotionEvent  e)

The user has performed a down MotionEvent and not performed a move or up yet. This event is commonly used to provide visual feedback to the user to let them know that their action has been recognized i.e. highlight an element.

Parameters
eThe down motion event.

◆ onSingleTapConfirmed()

boolean com.foxit.sdk.PDFViewCtrl.onSingleTapConfirmed ( MotionEvent  e)

Notified when a single-tap occurs.

It will dispatch the single-tap event to UIExtensionsManager interface and all other touch event listeners that register by function registerDoubleTapEventListener(IDoubleTapEventListener).

Parameters
eThe down motion event of the single-tap.
Returns
true means the event is consumed, while false means not.

◆ onSingleTapUp()

boolean com.foxit.sdk.PDFViewCtrl.onSingleTapUp ( MotionEvent  e)

Notified when a tap occurs with the up MotionEvent that triggered it.

Parameters
eThe up motion event that completed the first tap
Returns
true means the event is consumed, while false means not.

◆ onTouchEvent()

boolean com.foxit.sdk.PDFViewCtrl.onTouchEvent ( MotionEvent  e)

The override implementation of android.view.onTouchEvent().

It will dispatch the touch event to UIExtensionsManager interface and all other touch event listeners that register by function registerTouchEventListener(ITouchEventListener).

Parameters
eThe motion event.
Returns
true means the event was handled, while false means not.

◆ openDoc() [1/3]

void com.foxit.sdk.PDFViewCtrl.openDoc ( final FileReaderCallback  FileReader,
final byte[]  password 
)

Open PDF document from a specified FileReaderCallback.

Parameters
FileReaderA FileReaderCallback used to be open the PDF file.
passwordA byte array which specifies the password used to load the PDF document content. It can be either user password or owner password. If the PDF document is not encrypted by password, just pass an empty string.

◆ openDoc() [2/3]

void com.foxit.sdk.PDFViewCtrl.openDoc ( final String  path,
final byte[]  password 
)

Open PDF document from a specified PDF file path.

Parameters
pathA PDF file path.
passwordA byte array which specifies the password used to load the PDF document content. It can be either user password or owner password. If the PDF document is not encrypted by password, just pass an empty string.

◆ openDoc() [3/3]

void com.foxit.sdk.PDFViewCtrl.openDoc ( Uri  uri,
final byte[]  password 
)

Open PDF document from a specified URL.

Note that it will create a temporary file as cache for downloading the PDF file. The cache will be removed after closing the document.

Parameters
uriA PDF url.
passwordA byte array which specifies the password used to load the PDF document content. It can be either user password or owner password. If the PDF document is not encrypted by password, just pass an empty string.

◆ openDocFromMemory()

void com.foxit.sdk.PDFViewCtrl.openDocFromMemory ( final byte[]  buffer,
final byte[]  password 
)

Open the PDF document from memory buffer.

Parameters
bufferA memory buffer, containing the serialized document.
passwordA byte array which specifies the password used to load the PDF document content. It can be either user password or owner password. If the PDF document is not encrypted by password, just pass an empty string.

◆ openDocFromUrl()

void com.foxit.sdk.PDFViewCtrl.openDocFromUrl ( String  url,
byte[]  password,
CacheOption  cacheOption,
HttpRequestProperties  properties 
)

Open PDF document from a specified URL.

Note: In the first, maybe open document from cache if there is. You should clearCacheFile(String) to delete the cache file.

Parameters
urlThe url of the document to open. It supports HTTP and HTTPS.
passwordA byte array which specifies the password used to load the PDF document content. It can be either user password or owner password. If the PDF document is not encrypted by password, just pass an empty string.
cacheOptionThe cache option used to download the PDF file, may be
null
.
propertiesThe request properties that HTTP requires, may be
null
.

◆ recoverForOOM()

void com.foxit.sdk.PDFViewCtrl.recoverForOOM ( )

Do the recovering when Foxit PDF SDK runs out of memory.

Foxit PDF SDK will call this method automatically. This needs to be used carefully. Current reading status will be restored, but all the editing to document will be lost.

◆ refresh()

void com.foxit.sdk.PDFViewCtrl.refresh ( int  pageIndex,
Rect  rect 
)

Refresh a specified rectangle area in a specified page.

Parameters
pageIndexPage index. Valid range: from 0 to (count-1). count is the page count.
rectThe specified rectangle, in page view coordinate system.

◆ registerActivityResultListener()

void com.foxit.sdk.PDFViewCtrl.registerActivityResultListener ( IActivityResultListener  listener)

Register an activity result listener.

Parameters
listenerAn IActivityResultListener object to be registered.

◆ registerDocEventListener()

void com.foxit.sdk.PDFViewCtrl.registerDocEventListener ( IDocEventListener  listener)

Register a document event listener.

Parameters
listenerAn IDocEventListener object to be registered.

◆ registerDoubleTapEventListener()

void com.foxit.sdk.PDFViewCtrl.registerDoubleTapEventListener ( IDoubleTapEventListener  listener)

Register a double tap event listener.

Parameters
listenerAn IDoubleTapEventListener object to be registered.

◆ registerDrawEventListener()

void com.foxit.sdk.PDFViewCtrl.registerDrawEventListener ( IDrawEventListener  listener)

Register a draw event listener.

Parameters
listenerAn IDrawEventListener object to be registered.

◆ registerGestureEventListener()

void com.foxit.sdk.PDFViewCtrl.registerGestureEventListener ( IGestureEventListener  listener)

Register a gesture event listener.

Parameters
listenerAn IGestureEventListener object to be registered.

◆ registerLayoutEventListener()

void com.foxit.sdk.PDFViewCtrl.registerLayoutEventListener ( ILayoutEventListener  listener)

Register a layout mode event listener.

Parameters
listenerAn ILayoutEventListener object to be registered.

◆ registerPageAutoEventListener()

void com.foxit.sdk.PDFViewCtrl.registerPageAutoEventListener ( IPageAutoEventListener  listener)

Register a page auto event listener.

Parameters
listenerAn IPageAutoEventListener object to be registered.

◆ registerPageEventListener()

void com.foxit.sdk.PDFViewCtrl.registerPageEventListener ( IPageEventListener  listener)

Register a page event listener.

Parameters
listenerAn IPageEventListener object to be registered.

◆ registerRecoveryEventListener()

void com.foxit.sdk.PDFViewCtrl.registerRecoveryEventListener ( IRecoveryEventListener  listener)

Register an event listener for recovery from running out of memory.

Parameters
listenerAn IRecoveryEventListener object to be registered.

◆ registerReflowEventListener()

void com.foxit.sdk.PDFViewCtrl.registerReflowEventListener ( IReflowEventListener  listener)

Register a reflow event listener.

Parameters
listenerAn IReflowEventListener object to be registered.

◆ registerRenderEventListener()

void com.foxit.sdk.PDFViewCtrl.registerRenderEventListener ( IRenderEventListener  listener)

Register a render event listener.

Parameters
listenerAn IRenderEventListener object to be registered.

◆ registerScaleGestureEventListener()

void com.foxit.sdk.PDFViewCtrl.registerScaleGestureEventListener ( IScaleGestureEventListener  listener)

Register a scale gesture event listener.

Parameters
listenerAn IScaleGestureEventListener object to be registered.

◆ registerTouchEventListener()

void com.foxit.sdk.PDFViewCtrl.registerTouchEventListener ( ITouchEventListener  listener)

Register a touch event listener.

Parameters
listenerAn ITouchEventListener object to be registered.

◆ removePages()

boolean com.foxit.sdk.PDFViewCtrl.removePages ( int[]  pageIndexes)

Remove pages from pdf document.

After all operations are ended, you need to call the PDFViewCtrl#updatePagesLayout() to update pages layout.

Parameters
pageIndexesAn integer array specify which pages will be removed.
Returns
true means success, while false means failure.

◆ removeSecurity()

boolean com.foxit.sdk.PDFViewCtrl.removeSecurity ( PDFDoc  doc)

Remove the security handler from document, so that the later saved document will be unencrypted. The result is same as calling doc.removeSecurity();

Parameters
docThe PDF document object.
Returns
true means the security handler is removed.
  • false means not.

◆ removeTask()

void com.foxit.sdk.PDFViewCtrl.removeTask ( Task  task)

Remove the task.

Parameters
taskThe task which would be removed.

◆ renderRmsWatermark()

void com.foxit.sdk.PDFViewCtrl.renderRmsWatermark ( PDFPage  page,
Renderer  renderer,
Matrix2D  displayMatrix 
)

Render RMS Watermark while the document is RMS file and has watermark.

NOTE: if the specified page is not in the range. Foxit PDF SDK will do not render the watermark.

Parameters
pageA valid PDFPage object.
rendererA valid Renderer object.
displayMatrixThe transformation matrix used for rendering, which is usually returned by function PDFPage#getDisplayMatrix(int, int, int, int, int).

◆ rotatePages()

boolean com.foxit.sdk.PDFViewCtrl.rotatePages ( int[]  pageIndexes,
int  rotation 
)

Rotate pages with specified rotation. After all operations are ended, you need to call the PDFViewCtrl#updatePagesLayout() to update pages layout.

Parameters
pageIndexesAn integer array specify which pages will be rotated.
rotationNew page rotation value. Please refer to values starting from com.foxit.sdk.common.Constants#e_Rotation0 and this should be one of these values.
Returns
true means success, while false means failure.

◆ rotateView()

void com.foxit.sdk.PDFViewCtrl.rotateView ( int  rotation)

Rotates all pages in the document by using the specified degrees clockwise.

Note: After calling this method you must also update the page layout. See updatePagesLayout() for more information.

Parameters
rotationThe rotation to be used. Please refer to values starting from com.foxit.sdk.common.Constants#e_Rotation0 and this should be one of these values.

◆ saveAsWrapperFile()

void com.foxit.sdk.PDFViewCtrl.saveAsWrapperFile ( String  path,
int  flag 
)

Save the current document as a wrapper file

NOTE: Now. Just call this function if the current PDF document is an RMS PDF file.

Parameters
pathA full path of a PDF file. Current PDF document will be saved into this PDF file as a wrapper file.
flagDocument saving flags. Please refer to values starting from PDFDoc#e_SaveFlagNormal and this can be one or combination of these values.

◆ saveDoc() [1/2]

void com.foxit.sdk.PDFViewCtrl.saveDoc ( FileWriterCallback  fileWriter,
int  flag 
)

Save the displayed document to a specified file writer callback with saving flag.

Parameters
fileWriterFile writer callback for the new saved PDF file.
flagDocument saving flags. Please refer to values starting from PDFDoc#e_SaveFlagNormal and this can be one or combination of these values.

◆ saveDoc() [2/2]

void com.foxit.sdk.PDFViewCtrl.saveDoc ( String  filePath,
int  flag 
)

Save the displayed document to a specified file path with saving flag.

Parameters
filePathFile path for the new saved PDF file.
flagDocument saving flags. Please refer to values starting from PDFDoc#e_SaveFlagNormal and this can be one or combination of these values.

◆ scrollView()

void com.foxit.sdk.PDFViewCtrl.scrollView ( float  distanceX,
float  distanceY 
)

Scroll display view by the specified offset.

Parameters
distanceXThe distance along the X axis that has been scrolled.
distanceYThe distance along the Y axis that has been scrolled.

◆ setAppProvider()

void com.foxit.sdk.PDFViewCtrl.setAppProvider ( AppProviderCallback  callback)

Set a customized AppProviderCallback object.

User can call this function to set a customized app provider, and this function should be called first before processing XFA document.

If this function has not been called even once, it will use the default xfa provider.

Parameters
callbackAn AppProviderCallback object, which is implemented by user and based on callback class AppProviderCallback.

◆ setAttachedActivity()

void com.foxit.sdk.PDFViewCtrl.setAttachedActivity ( Activity  attachedActivity)

Set the attached activity.

If you want open a rms file; you must set the attached activity.

Parameters
attachedActivityThe attached activity.

◆ setBackgroundColor()

void com.foxit.sdk.PDFViewCtrl.setBackgroundColor ( int  color)

Set the background color for current view.

Parameters
colorNew background color. Format: 0xRRGGBB.

◆ setColorMode()

void com.foxit.sdk.PDFViewCtrl.setColorMode ( int  colorMode)

Set color mode.

If this function is not called, default value Renderer#e_ColorModeNormal will be used.

Parameters
colorModeColor mode value. It should be one of following values:

◆ setContinuous()

void com.foxit.sdk.PDFViewCtrl.setContinuous ( boolean  isContinuous)

set page layout mode to continuous. Note: It's invalid for PDFViewCtrl#PAGELAYOUTMODE_REFLOW mode.

Parameters
isContinuoustrue means page layout mode use continuous.

◆ setCropMode()

boolean com.foxit.sdk.PDFViewCtrl.setCropMode ( int  mode)

Set the page crop mode. Each page will be cropped separately according to the crop mode.

Parameters
modeCrop mode. It should be one of following values: com.foxit.sdk.PDFViewCtrl#CROPMODE_NONE means exiting crop mode. com.foxit.sdk.PDFViewCtrl#CROPMODE_CONTENTSBOX means cropping margin according to bounding box of all contents. com.foxit.sdk.PDFViewCtrl#CROPMODE_DETECT means cropping margin by detecting paths or images. com.foxit.sdk.PDFViewCtrl#CROPMODE_CUSTOMIZE means cropping margin with custom pages rect from setCropRect(int, RectF). Meaningful after setCropRect(int, RectF) is called.
Returns
true means success, while false means failure.

◆ setCropRect()

boolean com.foxit.sdk.PDFViewCtrl.setCropRect ( int  pageIndex,
RectF  cropRect 
)

Set crop rect of the specified page, others are original as default. It won't take effect until calling setCropMode(int).

Parameters
pageIndexPage index of the cropped page. Valid range: from 0 to (count-1). count is the page count. -1 means the same rect to all pages.
cropRectThe crop rectangle on the PDF page, in pdf coordinate, make sure left <= right, and bottom <= top.
Returns
true means success, while false means failure.

◆ setDoc()

void com.foxit.sdk.PDFViewCtrl.setDoc ( PDFDoc  pdfDocument)

Set the PDF document object to view control, then open the document.

Parameters
pdfDocumentA PDFDoc object which specifies the pdf document to be opened.

◆ setExceptionLogger()

static void com.foxit.sdk.PDFViewCtrl.setExceptionLogger ( Context  context,
String  foldPath,
final IExceptionLogger  logger 
)
static

The exception logger is for collecting info of exceptions or crashes. It will catch the unhandled Exception and application-wide signals.

Parameters
contextThe context of the application object of the current process.
foldPathThe directory to save crash log files. If it is set to null, then SDK will save the log files to the default directory. (Default: android.content.Context#getFilesDir() + "/tombstones")
loggerA protocal to be implemented for getting the exception info. If it is set to null, then SDK will not catch the exceptions.

◆ setFilePath()

void com.foxit.sdk.PDFViewCtrl.setFilePath ( String  filePath)

Set the file path of the current document.

Parameters
filePaththe path of the current document.

◆ setGestureLockFlags()

void com.foxit.sdk.PDFViewCtrl.setGestureLockFlags ( int  lockFlags)

Set the gesture lock flags.

The gesture lock flags are used to control the gesture lock behavior. Please refer to values starting from PDFViewCtrl#GESTURE_LOCK_NONE and this can be one or combination of these values.

Parameters
lockFlagsThe gesture lock flags to be set.

◆ setHScrollPos()

void com.foxit.sdk.PDFViewCtrl.setHScrollPos ( int  pos)

Set the horizontal scroll position.

Parameters
posNew horizontal scroll position. If this value is out of range of current view, it will only be displayed within the last view region.

◆ setKeepZoomRatio()

void com.foxit.sdk.PDFViewCtrl.setKeepZoomRatio ( boolean  keep)

Set whether to keep the zoom ratio when turning pages in non-continuous page mode

Parameters
keeptrue means to keep the zoom ratio when turning pages in non-continuous page mode.

◆ setMappingModeBackgroundColor()

void com.foxit.sdk.PDFViewCtrl.setMappingModeBackgroundColor ( int  mappingModeBackgroundColor)

Set the "background color" will be work in Renderer#e_ColorModeMapping or Renderer#e_ColorModeMappingGray color mode.

Please call the function setColorMode(int) after setting the new "background color".

Parameters
mappingModeBackgroundColorThe "background color". Format: 0xAARRGGBB.

◆ setMappingModeForegroundColor()

void com.foxit.sdk.PDFViewCtrl.setMappingModeForegroundColor ( int  mappingModeForegroundColor)

Set the "foreground color" will be work in Renderer#e_ColorModeMapping or Renderer#e_ColorModeMappingGray color mode.

Please call the function setColorMode(int) after setting the new "foreground color".

Parameters
mappingModeForegroundColorThe "foreground color". Format: 0xAARRGGBB.

◆ setMaxZoomLimit()

void com.foxit.sdk.PDFViewCtrl.setMaxZoomLimit ( float  maxZoomLimit)

Set the maximum zoom bound.

This method sets the upper limit for zooming in. The maximum zoom limit cannot be less than 1. If a value less than 1 is provided, it will be ignored and the default value will remain in effect.

Parameters
maxZoomLimitthe maximum zoom bound, default: 8.0f

◆ setMinZoomLimit()

void com.foxit.sdk.PDFViewCtrl.setMinZoomLimit ( float  minZoomLimit)

Set the minimum zoom bound

This method sets the lower limit for zooming out. The minimum zoom limit must be greater than 0 and cannot exceed 1. If a value outside this range is provided, it will be ignored, and the default value will remain in effect.

Parameters
minZoomLimitthe minimum zoom bound, default: 1.0f

◆ setNightMode()

void com.foxit.sdk.PDFViewCtrl.setNightMode ( boolean  bNightMode)

Set night mode.

Deprecated:
Use setColorMode(int) instead.
Parameters
bNightModetrue means to use night mode. false means not to use night mode.

◆ setPageBinding()

void com.foxit.sdk.PDFViewCtrl.setPageBinding ( @PageBinding int  pageBinding)

Set the PageBinding controlling in which direction pages of documents are laid out, either left to right (page indexed 0 will be to the left),or right to left (page indexed 0 will be on the right), default pagebinding is PDFViewCtrl#LEFT_EDGE.

Parameters
pageBindingOne LEFT_EDGE or RIGHT_EDGE to set on the document.

◆ setPageLayoutMode()

void com.foxit.sdk.PDFViewCtrl.setPageLayoutMode ( @PageMode int  lMode)

Set page layout mode.

Parameters
lModePage layout mode. Please refer to values starting from PAGELAYOUTMODE_SINGLE and this would be one of these values.

◆ setPageSpacing() [1/2]

void com.foxit.sdk.PDFViewCtrl.setPageSpacing ( int  space)

Set spacing(in pixels) between adjacent pages in the view. If the layout has already been loaded, you need to call updatePagesLayout() for the changes to take effect.

Note: Currently, It supports in PDFViewCtrl#PAGELAYOUTMODE_FACING and PDFViewCtrl#PAGELAYOUTMODE_COVER mode.

Parameters
spacespacing between adjacent pages in the view. default: 2. Valid range: from 0 to 10.

◆ setPageSpacing() [2/2]

void com.foxit.sdk.PDFViewCtrl.setPageSpacing ( int  space,
int  direction 
)

Sets the vertical and horizontal spacing between adjacent pages in the view.

Note: Currently, It supports in PDFViewCtrl#PAGELAYOUTMODE_FACING, PDFViewCtrl#PAGELAYOUTMODE_COVER mode and PDFViewCtrl#PAGELAYOUTMODE_SINGLE mode is continuous.

Parameters
spacespacing(in pixels) between adjacent pages in the view. Valid range: from 0 to 10. Note: The default value of the horizontal spacing is 2, and the default value of the vertical spacing is 10.
directionUsed to decide which kind of direction spacing will be set. Please refer to values starting from PDFViewCtrl#PAGESPACING_HORIZONTAL and this can be one or a combination of these values.

◆ setReflowBackgroundColor()

void com.foxit.sdk.PDFViewCtrl.setReflowBackgroundColor ( int  color)

Sets the page background color in reflow mode and the color mode is Renderer#e_ColorModeNormal. Should called before setPageLayoutMode(int)

Parameters
colorthe background color to be used.

◆ setReflowMode()

void com.foxit.sdk.PDFViewCtrl.setReflowMode ( int  reflowMode)

Set the reflow mode

Parameters
reflowModeRe-flow mode. It should be one or a combination of the following enumeration definitions. Default value: ReflowPage#e_Normal|ReflowPage#e_WithImage. Please refer to values starting from ReflowPage#e_Normal and this can be one or combination of these values.

◆ setUIExtensionsManager()

void com.foxit.sdk.PDFViewCtrl.setUIExtensionsManager ( UIExtensionsManager  manager)

Set UI extensions manager.

Parameters
managerAn UIExtensionsManager object to be set.

◆ setVScrollPos()

void com.foxit.sdk.PDFViewCtrl.setVScrollPos ( int  pos)

Set the vertical scroll position.

Parameters
posNew vertical scroll position. If this value is out of range of current view, it will only be displayed within the last view region.

◆ setZoom() [1/2]

void com.foxit.sdk.PDFViewCtrl.setZoom ( float  factor)

Set the zoom factor and re-render.

You can call setMinZoomLimit(float) and setMaxZoomLimit(float) to change the limitation.

Parameters
factorNew zoom factor. Default valid range from 1.0f to 8.0f. 1.0f is the value of the fit page mode (the initial model).

◆ setZoom() [2/2]

void com.foxit.sdk.PDFViewCtrl.setZoom ( Point  devicePt,
float  factor 
)

Set the zoom factor and re-render by using the given point as the zoom center.

You can call setMinZoomLimit(float) and setMaxZoomLimit(float) to change the limitation.

Parameters
devicePtThe device point
factorNew zoom factor. Default valid range from 1.0f to 8.0f. 1.0f is the value of the fit page mode (the initial model).

◆ setZoomMode()

void com.foxit.sdk.PDFViewCtrl.setZoomMode ( int  zMode)

Set zoom mode.

Parameters
zModeNew zoom mode. Please refer to values starting from ZOOMMODE_CUSTOMIZE and this would be one of these values.

◆ slideToNextScreen()

void com.foxit.sdk.PDFViewCtrl.slideToNextScreen ( )

Slide to next screen

◆ slideToPreviousScreen()

void com.foxit.sdk.PDFViewCtrl.slideToPreviousScreen ( )

Slide to pre screen

◆ unlock()

static void com.foxit.sdk.PDFViewCtrl.unlock ( )
static

Unlock for the page rendering process.

◆ unregisterActivityResultListener()

void com.foxit.sdk.PDFViewCtrl.unregisterActivityResultListener ( IActivityResultListener  listener)

Unregister an activity result listener.

Parameters
listenerAn IActivityResultListener object to be unregistered.

◆ unregisterDocEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterDocEventListener ( IDocEventListener  listener)

Unregister a document event listener.

Parameters
listenerAn IDocEventListener object to be unregistered.

◆ unregisterDoubleTapEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterDoubleTapEventListener ( IDoubleTapEventListener  listener)

Unregister a double tap event listener.

Parameters
listenerAn IDoubleTapEventListener object to be unregistered.

◆ unregisterDrawEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterDrawEventListener ( IDrawEventListener  listener)

Unregister a draw event listener.

Parameters
listenerAn IDrawEventListener object to be unregistered.

◆ unregisterGestureEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterGestureEventListener ( IGestureEventListener  listener)

Unregister a gesture event listener.

Parameters
listenerAn IGestureEventListener object to be unregistered.

◆ unregisterLayoutEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterLayoutEventListener ( ILayoutEventListener  listener)

Unregister a layout mode event listener.

Parameters
listenerAn ILayoutEventListener object to be unregistered.

◆ unregisterPageAutoEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterPageAutoEventListener ( IPageAutoEventListener  listener)

Unregister a page auto event listener.

Parameters
listenerAn IPageAutoEventListener object to be unregistered.

◆ unregisterPageEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterPageEventListener ( IPageEventListener  listener)

Unregister a page event listener.

Parameters
listenerAn IPageEventListener object to be unregistered.

◆ unregisterRecoveryEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterRecoveryEventListener ( IRecoveryEventListener  listener)

Unregister an event listener for recovery from running out of memory.

Parameters
listenerAn IRecoveryEventListener object to be unregistered.

◆ unregisterReflowEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterReflowEventListener ( IReflowEventListener  listener)

Unregister a reflow event listener.

Parameters
listenerAn IReflowEventListener object to be unregistered.

◆ unregisterRenderEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterRenderEventListener ( IRenderEventListener  listener)

Unregister a render event listener.

Parameters
listenerAn IRenderEventListener object to be unregistered.

◆ unregisterScaleGestureEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterScaleGestureEventListener ( IScaleGestureEventListener  listener)

Unregister a scale gesture event listener.

Parameters
listenerAn IScaleGestureEventListener object to be unregistered.

◆ unregisterTouchEventListener()

void com.foxit.sdk.PDFViewCtrl.unregisterTouchEventListener ( ITouchEventListener  listener)

Unregister a touch event listener.

Parameters
listenerAn ITouchEventListener object to be unregistered.

◆ updatePagesLayout()

void com.foxit.sdk.PDFViewCtrl.updatePagesLayout ( )

Update pages layout, you should call this function to update pages layout when some pages be removed, inserted, moved or rotates all pages.

removePages(int[]) insertPages(int, int, String, PDFDoc, int[]) insertPages(int, int, String, String, byte[], int[]) movePage(int, int) rotatePages(int[], int) rotateView(int)

◆ zoomToRect()

void com.foxit.sdk.PDFViewCtrl.zoomToRect ( int  pageIndex,
RectF  pageViewRect,
int  fitMode 
)

Zoom to a specific area of the page content so that it is visible on the screen.

You can call setMinZoomLimit(float) and setMaxZoomLimit(float) to change the limitation.

Parameters
pageIndexThe page index which page the rectangle is on.
pageViewRectA rectangle defining an area of the page content view. The rectangle should be in the coordinate space of the page view.
fitModeThe fit mode that used to calculate the zoom ratio. One of ZOOM_FITRECT_RECT, ZOOM_FITRECT_WIDTH, ZOOM_FITRECT_HEIGHT

Member Data Documentation

◆ AUTO_FLING

final int com.foxit.sdk.PDFViewCtrl.AUTO_FLING = 2
static

The page auto fling event

◆ AUTO_NONE

final int com.foxit.sdk.PDFViewCtrl.AUTO_NONE = 0
static

The defaule auto state

◆ AUTO_SCROLL_CORRECTION

final int com.foxit.sdk.PDFViewCtrl.AUTO_SCROLL_CORRECTION = 1
static

The page auto scroll correction event

◆ AUTO_SCROLL_TURNPAGE

final int com.foxit.sdk.PDFViewCtrl.AUTO_SCROLL_TURNPAGE = 3
static

The page auto scroll turn page event

◆ AUTO_ZOOM_RECT

final int com.foxit.sdk.PDFViewCtrl.AUTO_ZOOM_RECT = 6
static

The page auto zoom rect event

◆ AUTO_ZOOMIN

final int com.foxit.sdk.PDFViewCtrl.AUTO_ZOOMIN = 4
static

The page auto zoom in event

◆ AUTO_ZOOMOUT

final int com.foxit.sdk.PDFViewCtrl.AUTO_ZOOMOUT = 5
static

The page auto zoom out event

◆ GESTURE_LOCK_DOUBLE_TAP

final int com.foxit.sdk.PDFViewCtrl.GESTURE_LOCK_DOUBLE_TAP = 1 << 1
static

Lock double-tap gesture

◆ GESTURE_LOCK_NONE

final int com.foxit.sdk.PDFViewCtrl.GESTURE_LOCK_NONE = 0
static

No gesture lock

◆ GESTURE_LOCK_PAN

final int com.foxit.sdk.PDFViewCtrl.GESTURE_LOCK_PAN = 1 << 3
static

Lock pan gesture

◆ GESTURE_LOCK_PINCH

final int com.foxit.sdk.PDFViewCtrl.GESTURE_LOCK_PINCH = 1 << 2
static

Lock pinch-to-zoom gesture

◆ GESTURE_LOCK_SINGLE_TAP

final int com.foxit.sdk.PDFViewCtrl.GESTURE_LOCK_SINGLE_TAP = 1
static

Lock single-tap gesture

◆ LEFT_EDGE

final int com.foxit.sdk.PDFViewCtrl.LEFT_EDGE = 0
static

The document flows from left to right.

◆ PAGELAYOUTMODE_COVER

final int com.foxit.sdk.PDFViewCtrl.PAGELAYOUTMODE_COVER = 4
static

Cover page mode

◆ PAGELAYOUTMODE_FACING

final int com.foxit.sdk.PDFViewCtrl.PAGELAYOUTMODE_FACING = 3
static

Facing page mode

◆ PAGELAYOUTMODE_REFLOW

final int com.foxit.sdk.PDFViewCtrl.PAGELAYOUTMODE_REFLOW = 2
static

Reflow page mode

◆ PAGELAYOUTMODE_SINGLE

final int com.foxit.sdk.PDFViewCtrl.PAGELAYOUTMODE_SINGLE = 1
static

Single page mode

◆ PAGESPACING_HORIZONTAL

final int com.foxit.sdk.PDFViewCtrl.PAGESPACING_HORIZONTAL = 0x0001
static

Horizontal page spacing.

◆ PAGESPACING_VERTICAL

final int com.foxit.sdk.PDFViewCtrl.PAGESPACING_VERTICAL = 0x0002
static

Vertical page spacing.

◆ PDF_PAGE_STYLE_TYPE_BLANK

final int com.foxit.sdk.PDFViewCtrl.PDF_PAGE_STYLE_TYPE_BLANK = 1
static

Insert new page style – blank

◆ PDF_PAGE_STYLE_TYPE_GRAPH

final int com.foxit.sdk.PDFViewCtrl.PDF_PAGE_STYLE_TYPE_GRAPH = 4
static

Insert new page style – graph

◆ PDF_PAGE_STYLE_TYPE_GRID

final int com.foxit.sdk.PDFViewCtrl.PDF_PAGE_STYLE_TYPE_GRID = 3
static

Insert new page style – grid

◆ PDF_PAGE_STYLE_TYPE_LINED

final int com.foxit.sdk.PDFViewCtrl.PDF_PAGE_STYLE_TYPE_LINED = 2
static

Insert new page style – line

◆ PDF_PAGE_STYLE_TYPE_MUSIC

final int com.foxit.sdk.PDFViewCtrl.PDF_PAGE_STYLE_TYPE_MUSIC = 5
static

Insert new page style – music

◆ RIGHT_EDGE

final int com.foxit.sdk.PDFViewCtrl.RIGHT_EDGE = 1
static

The document flows from right to left.

◆ shouldRecover

boolean com.foxit.sdk.PDFViewCtrl.shouldRecover = true

Used to check whether it should recover from out of memory or not. Default is true.

◆ ZOOM_FITRECT_HEIGHT

final int com.foxit.sdk.PDFViewCtrl.ZOOM_FITRECT_HEIGHT = 2
static

Automatically scale the page to fit the height of the specified rectangle.

◆ ZOOM_FITRECT_RECT

final int com.foxit.sdk.PDFViewCtrl.ZOOM_FITRECT_RECT = 0
static

Automatically scale the page to fit the specified rectangle.

◆ ZOOM_FITRECT_WIDTH

final int com.foxit.sdk.PDFViewCtrl.ZOOM_FITRECT_WIDTH = 1
static

Automatically scale the page to fit the width of the specified rectangle.

◆ ZOOMMODE_CUSTOMIZE

final int com.foxit.sdk.PDFViewCtrl.ZOOMMODE_CUSTOMIZE = 0
static

Zoom mode: customized mode.

◆ ZOOMMODE_FITHEIGHT

final int com.foxit.sdk.PDFViewCtrl.ZOOMMODE_FITHEIGHT = 2
static

Zoom mode: fit page height.

◆ ZOOMMODE_FITPAGE

final int com.foxit.sdk.PDFViewCtrl.ZOOMMODE_FITPAGE = 3
static

Zoom mode: fit page.

◆ ZOOMMODE_FITWIDTH

final int com.foxit.sdk.PDFViewCtrl.ZOOMMODE_FITWIDTH = 1
static

Zoom mode: fit page width.