Foxit PDF SDK  9.1
com.foxit.sdk.common.Renderer Class Reference
Inheritance diagram for com.foxit.sdk.common.Renderer:
com.foxit.sdk.common.Base

Public Member Functions

 Renderer (android.graphics.Bitmap bitmap, boolean is_rgb_order) throws com.foxit.sdk.PDFException
 Constructor, with bitmap.
More...
 
 Renderer (PrintDeviceSettingData print_param, String dest_file_path) throws com.foxit.sdk.PDFException
 Constructor for printing, with specified print device setting data.
More...
 
 Renderer (Renderer other)
 Constructor, with another renderer object.
More...
 
boolean isEmpty ()
 Check whether current object is empty or not.
More...
 
Progressive startQuickRender (PDFPage page, Matrix2D matrix, PauseCallback pause) throws com.foxit.sdk.PDFException
 Start to quickly render a PDF page, mainly for thumbnail purpose.
More...
 
Progressive startRender (PDFPage page, Matrix2D matrix, PauseCallback pause) throws com.foxit.sdk.PDFException
 Start to render a PDF page.
More...
 
Progressive startRenderReflowPage (ReflowPage reflow_page, Matrix2D matrix, PauseCallback pause) throws com.foxit.sdk.PDFException
 Start to render a reflow page.
More...
 
Progressive startRenderXFAPage (XFAPage xfa_page_view, Matrix2D matrix, boolean is_highlight, PauseCallback pause) throws com.foxit.sdk.PDFException
 Start to render an XFA page.
More...
 
Progressive startRenderBitmap (android.graphics.Bitmap bitmap, Matrix2D matrix, RectI clip_rect, int interpolation, PauseCallback pause) throws com.foxit.sdk.PDFException
 Start to render a bitmap.
More...
 
void setRenderAnnotAppearanceType (int ap_type) throws com.foxit.sdk.PDFException
 Set the annotation's appearance type for rendering.
More...
 
boolean renderAnnot (Annot annot, Matrix2D matrix) throws com.foxit.sdk.PDFException
 Render a specified annotation.
More...
 
boolean renderFormControls (PDFPage page, Matrix2D matrix) throws com.foxit.sdk.PDFException
 Render form controls.
More...
 
boolean renderGraphicsObject (GraphicsObject graphics_object, PDFPage page, Matrix2D matrix) throws com.foxit.sdk.PDFException
 Render a graphics object.
More...
 
void setClipRect (RectI clip_rect) throws com.foxit.sdk.PDFException
 Set the clipping rectangle which will be used in following rendering progress.
More...
 
void setClipPathFill (Path clip_path, Matrix2D matrix, int fill_mode) throws com.foxit.sdk.PDFException
 Set clipping path using filled region.
More...
 
void setClipPathStroke (Path clip_path, Matrix2D matrix, GraphState graph_state) throws com.foxit.sdk.PDFException
 Set clipping path using stroked region.
More...
 
void setRenderContentFlags (int render_content_flags) throws com.foxit.sdk.PDFException
 Set rendering flag to decide what content will be rendered.
More...
 
void setRenderAnnotsForThumbnail (boolean is_render_annots_for_thumbnail) throws com.foxit.sdk.PDFException
 Set rendering flag to decide whether to render annotations in thumbnail mode or not.
More...
 
void setRenderFormField (boolean is_render_formfield) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to render form fields (except signature fields).
More...
 
void setRenderSignature (boolean is_render_signature) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to render signatures or not.
More...
 
void setLayerContext (LayerContext layer_context) throws com.foxit.sdk.PDFException
 Set layer context to render context handle.
More...
 
void setColorMode (int color_mode) throws com.foxit.sdk.PDFException
 Set color mode.
More...
 
void setMappingModeColors (int background_color, int foreground_color) throws com.foxit.sdk.PDFException
 Set background color and foreground color when color mode is com.foxit.sdk.common.Renderer.e_ColorModeMappingGray or com.foxit.sdk.common.Renderer.e_ColorModeMapping .
More...
 
void setJPEGDownSample (boolean is_jepg_down_sample) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to use down-sampling for jpeg image.
More...
 
void setJPXDownSample (boolean is_jpx_down_sample) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to use down-sampling for jpx image.
More...
 
void enableForPrint (boolean is_render_for_print) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to do rendering in print mode.
More...
 
void setForceHalftone (boolean is_to_force_halftone) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to use halftone for image stretching.
More...
 
void setRenderPathThinLine (boolean is_render_path_thin_line) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to draw path as thin line.
More...
 
void setRenderTextAntiAliasing (boolean is_render_text_antialiasing) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to draw text anti-aliasing.
More...
 
void setRenderPathAntiAliasing (boolean is_render_path_antialiasing) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to draw path anti-aliasing.
More...
 
void setRenderPathFullCovered (boolean is_render_path_full_covered) throws com.foxit.sdk.PDFException
 A special flag that can be applied to fill mode.
More...
 
void setRenderImageAntiAliasing (boolean is_render_image_antialiasing) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to draw image anti-aliasing.
More...
 
void setRenderEnhanceThinLines (boolean is_render_enhance_thin_lines) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to enhance thin lines.
More...
 
void setRenderSignatureState (boolean is_render_signature_state) throws com.foxit.sdk.PDFException
 Set the flag to decide whether to draw the signature state on the signature.
More...
 
void drawTextString (PDFDoc document, String text_string, GraphState graph_state, float origin_x, float origin_y, Font font, float font_size, Matrix2D matrix, int fill_color, int stroke_color) throws com.foxit.sdk.PDFException
 Draw text string on the render device.
More...
 
void drawPath (Path path, GraphState graph_state, Matrix2D matrix, int fill_color, int stroke_color, int fill_mode, int blend_mode) throws com.foxit.sdk.PDFException
 Draw path on the render device.
More...
 
void drawStrokeRect (Matrix2D matrix, RectF rect, long color, float width) throws com.foxit.sdk.PDFException
 Draw stroke rectangle on the render device.
More...
 

Static Public Attributes

static final int e_ColorModeNormal = 0
 Normal color mode.

 
static final int e_ColorModeMappingGray = 1
 Map gray/white/black color value to background/foreground; for other colors, no change.

 
static final int e_ColorModeMapping = 2
 Map a color value to the color range defined by a background color and a foreground color.

 
static final int e_RenderPage = 0x01
 If set, page content will be rendered.

 
static final int e_RenderAnnot = 0x02
 If set, annotations will be rendered.

 

Detailed Description

PDF renderer is a graphics engine and is used to render page to a bitmap or a platform device context. This class can be constructed with a bitmap, or a device object. It offers functions to set rendering options/flags, and do rendering. In this class, there are several ways to do rendering:

Widget annotation is always associated with form field and form control in Foxit PDF SDK. For how to render widget annotations, here is a recommended flow:


See also
com.foxit.sdk.pdf.interform.Filler

Constructor & Destructor Documentation

◆ Renderer() [1/3]

com.foxit.sdk.common.Renderer.Renderer ( android.graphics.Bitmap  bitmap,
boolean  is_rgb_order 
) throws com.foxit.sdk.PDFException

Constructor, with bitmap.

The input bitmap is treated as an independent device and all the content rendered by the renderer would appear in the bitmap.

Parameters
[in]bitmapA bitmap used for rendering. User should ensure the bitmap to keep valid until the end of life cycle of current renderer object.
[in]is_rgb_ordertrue means Foxit PDF SDK needs to use RGB byte-order (Red is in the lowest order) when rendering.
false means Foxit PDF SDK needs to use BGR byte-order (Blue is in the lowest order) when rendering.

◆ Renderer() [2/3]

com.foxit.sdk.common.Renderer.Renderer ( PrintDeviceSettingData  print_param,
String  dest_file_path 
) throws com.foxit.sdk.PDFException

Constructor for printing, with specified print device setting data.

All the content rendered by the renderer would appear in the PDF file or PostScrip file. Generating PS files is only supported on Linux systems.

Parameters
[in]print_paramSetting data used to print device.
[in]dest_file_pathThe path to generate the printed PDF file or PostScrip file. If this path is a PDF file path, please ensure Foxit PDF SDK has been initialized successfully by function common.Library.initialize with a key including "Print2PDF" module.

◆ Renderer() [3/3]

com.foxit.sdk.common.Renderer.Renderer ( Renderer  other)

Constructor, with another renderer object.

Parameters
[in]otherAnother renderer object.

Member Function Documentation

◆ drawPath()

void com.foxit.sdk.common.Renderer.drawPath ( Path  path,
GraphState  graph_state,
Matrix2D  matrix,
int  fill_color,
int  stroke_color,
int  fill_mode,
int  blend_mode 
) throws com.foxit.sdk.PDFException

Draw path on the render device.

Parameters
[in]pathPath data.
[in]graph_stateGraph state.
[in]matrixMatrix used to display path.
[in]fill_colorFill color for path.
[in]stroke_colorStroke color for path.
[in]fill_modeFill mode. Please refer to values starting from com.foxit.sdk.common.Constants.e_FillModeNone and this should be one of these values.
[in]blend_modeBlend mode. Please refer to values starting from com.foxit.sdk.pdf.graphics.GraphicsObject.e_BlendNormal and this should be one of these values.
Returns
None.

◆ drawStrokeRect()

void com.foxit.sdk.common.Renderer.drawStrokeRect ( Matrix2D  matrix,
RectF  rect,
long  color,
float  width 
) throws com.foxit.sdk.PDFException

Draw stroke rectangle on the render device.

Parameters
[in]matrixMatrix used to display stroke rectangle.
[in]rectThe stroke rectangle.
[in]colorThe line color for stroke rectangle.
[in]widthThe line width for stroke rectangle.
Returns
None.

◆ drawTextString()

void com.foxit.sdk.common.Renderer.drawTextString ( PDFDoc  document,
String  text_string,
GraphState  graph_state,
float  origin_x,
float  origin_y,
Font  font,
float  font_size,
Matrix2D  matrix,
int  fill_color,
int  stroke_color 
) throws com.foxit.sdk.PDFException

Draw text string on the render device.

Parameters
[in]documentA valid PDF document, to which input parameter font belongs.
[in]text_stringText string.
[in]graph_stateGraph state.
[in]origin_xX coordinate value for origin position, in device coordinate system.
[in]origin_yY coordinate value for origin position, in device coordinate system.
[in]fontFont for text string. This font should belong to input parameter document.
[in]font_sizeFont size.
[in]matrixMatrix used to display text string.
[in]fill_colorFill color for text string.
[in]stroke_colorStroke color for text string.
Returns
None.

◆ enableForPrint()

void com.foxit.sdk.common.Renderer.enableForPrint ( boolean  is_render_for_print) throws com.foxit.sdk.PDFException

Set the flag to decide whether to do rendering in print mode.

Please ensure this rendering flag is set as expected when current renderer is to used for printing. For rendering annotations, if this flag is set to be true, Foxit PDF SDK will only render annotations which have annotation flag com.foxit.sdk.pdf.annots.Annot.e_FlagPrint .
If this function is not called for current renderer object yet, default value false will be used.

Parameters
[in]is_render_for_printtrue means to render in print mode, while false means to render not in print mode.
Returns
None.

◆ isEmpty()

boolean com.foxit.sdk.common.Renderer.isEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ renderAnnot()

boolean com.foxit.sdk.common.Renderer.renderAnnot ( Annot  annot,
Matrix2D  matrix 
) throws com.foxit.sdk.PDFException

Render a specified annotation.

When this function is called, rendering flag (set by function Renderer.setRenderContentFlags or by default) will be ignored.

Parameters
[in]annotAn annotation object to be rendered. If input annot is a pop-up annotation, this function will not render it and will return false.
[in]matrixThe transformation matrix used for rendering, which is usually returned by function pdf.PDFPage.getDisplayMatrix .
Returns
true means success, while false means failure.

◆ renderFormControls()

boolean com.foxit.sdk.common.Renderer.renderFormControls ( PDFPage  page,
Matrix2D  matrix 
) throws com.foxit.sdk.PDFException

Render form controls.

When this function is called, rendering flag (set by function Renderer.setRenderContentFlags or by default) will be ignored.

Parameters
[in]pageA valid PDF page. If input page is invalid, this function do nothing and return false directly.
[in]matrixThe transformation matrix used for rendering, which is usually returned by function pdf.PDFPage.getDisplayMatrix .
Returns
true means success, while false means failure.

◆ renderGraphicsObject()

boolean com.foxit.sdk.common.Renderer.renderGraphicsObject ( GraphicsObject  graphics_object,
PDFPage  page,
Matrix2D  matrix 
) throws com.foxit.sdk.PDFException

Render a graphics object.

When this function is called, rendering flag (set by function Renderer.setRenderContentFlags or by default) will be ignored.

Parameters
[in]graphics_objectA valid PDF graphics object to be rendered.
[in]pageA valid PDF page. Parameter graphics_object belongs to this PDF page.
[in]matrixThe transformation matrix used for rendering, which is usually returned by function pdf.PDFPage.getDisplayMatrix .
Returns
true means success, while false means failure.

◆ setClipPathFill()

void com.foxit.sdk.common.Renderer.setClipPathFill ( Path  clip_path,
Matrix2D  matrix,
int  fill_mode 
) throws com.foxit.sdk.PDFException

Set clipping path using filled region.

Parameters
[in]clip_pathA clipping path.
[in]matrixThe transformation matrix used for clipping.
[in]fill_modeFill mode. It should be value or .
Returns
None.

◆ setClipPathStroke()

void com.foxit.sdk.common.Renderer.setClipPathStroke ( Path  clip_path,
Matrix2D  matrix,
GraphState  graph_state 
) throws com.foxit.sdk.PDFException

Set clipping path using stroked region.

Parameters
[in]clip_pathA clipping path.
[in]matrixThe transformation matrix used for clipping.
[in]graph_stateA valid graph state, for pen attributes. If this is null, Foxit PDF SDK will use a graph state object with default constructor. Default value: null.
Returns
None.

◆ setClipRect()

void com.foxit.sdk.common.Renderer.setClipRect ( RectI  clip_rect) throws com.foxit.sdk.PDFException

Set the clipping rectangle which will be used in following rendering progress.

Parameters
[in]clip_rectA clipping rectangle. If it is null, that means not to use clipping rectangle in following rendering progress.
Returns
None.

◆ setColorMode()

void com.foxit.sdk.common.Renderer.setColorMode ( int  color_mode) throws com.foxit.sdk.PDFException

Set color mode.

If this function is not called, default value com.foxit.sdk.common.Renderer.e_ColorModeNormal will be used.

Parameters
[in]color_modeColor mode value. It should be one of following values:
Returns
None.

◆ setForceHalftone()

void com.foxit.sdk.common.Renderer.setForceHalftone ( boolean  is_to_force_halftone) throws com.foxit.sdk.PDFException

Set the flag to decide whether to use halftone for image stretching.

If this function is not called, default value false will be used.

Parameters
[in]is_to_force_halftonetrue means to use halftone for image stretching. false means not to use halftone for image stretching.
Returns
None.

◆ setJPEGDownSample()

void com.foxit.sdk.common.Renderer.setJPEGDownSample ( boolean  is_jepg_down_sample) throws com.foxit.sdk.PDFException

Set the flag to decide whether to use down-sampling for jpeg image.

Whether to use down-sampling for jpeg image or not will affect rendering result for a PDF page. When current function is called successfully, user should called function pdf.PDFPage.clearRenderCache for a PDF page (which has been rendered at least once) before rendering the PDF page again.
If this function is not called, default value true will be used.

Parameters
[in]is_jepg_down_sampletrue means to use down-sampling for jpeg image. false means not to use down-sampling for jpeg image.
Returns
None.

◆ setJPXDownSample()

void com.foxit.sdk.common.Renderer.setJPXDownSample ( boolean  is_jpx_down_sample) throws com.foxit.sdk.PDFException

Set the flag to decide whether to use down-sampling for jpx image.

Whether to use down-sampling for jpx image or not will affect rendering result for a PDF page. When current function is called successfully, user should called function pdf.PDFPage.clearRenderCache for a PDF page (which has been rendered at least once) before rendering the PDF page again.
If this function is not called, default value true will be used.

Parameters
[in]is_jpx_down_sampletrue means to use down-sampling for jpx image. false means not to use down-sampling for jpx image.
Returns
None.

◆ setLayerContext()

void com.foxit.sdk.common.Renderer.setLayerContext ( LayerContext  layer_context) throws com.foxit.sdk.PDFException

Set layer context to render context handle.

In order to render one layer when PDF page's contents is rendered on a rendering context, user should call this function to set the layer context to render context.

Parameters
[in]layer_contextA layer context object.
Returns
None.

◆ setMappingModeColors()

void com.foxit.sdk.common.Renderer.setMappingModeColors ( int  background_color,
int  foreground_color 
) throws com.foxit.sdk.PDFException

Set background color and foreground color when color mode is com.foxit.sdk.common.Renderer.e_ColorModeMappingGray or com.foxit.sdk.common.Renderer.e_ColorModeMapping .

Parameters
[in]background_colorThe background color. Format: 0xAARRGGBB.
[in]foreground_colorThe foreground color. Format: 0xAARRGGBB.
Returns
None.

◆ setRenderAnnotAppearanceType()

void com.foxit.sdk.common.Renderer.setRenderAnnotAppearanceType ( int  ap_type) throws com.foxit.sdk.PDFException

Set the annotation's appearance type for rendering.

Parameters
[in]ap_typeType of annotation's appearance. Please refer to values starting from com.foxit.sdk.pdf.annots.Annot.e_AppearanceTypeNormal and this should be one of these values.
Returns
None.

◆ setRenderAnnotsForThumbnail()

void com.foxit.sdk.common.Renderer.setRenderAnnotsForThumbnail ( boolean  is_render_annots_for_thumbnail) throws com.foxit.sdk.PDFException

Set rendering flag to decide whether to render annotations in thumbnail mode or not.

In thumbnail mode, the flags of annotations, "NoZoom" and "NoRotate", will be ignored. This rendering flag is available only when flag com.foxit.sdk.common.Renderer.e_RenderAnnot is used for rendering or function Renderer.renderAnnot is called. Please refer to function Renderer.setRenderContentFlags about setting flag com.foxit.sdk.common.Renderer.e_RenderAnnot .
If this function is not called, default value false will be used when this rendering flag is available.

Parameters
[in]is_render_annots_for_thumbnailtrue means to render annotations in thumbnail mode. false means not to render annotations in thumbnail mode.
Returns
None.

◆ setRenderContentFlags()

void com.foxit.sdk.common.Renderer.setRenderContentFlags ( int  render_content_flags) throws com.foxit.sdk.PDFException

Set rendering flag to decide what content will be rendered.

If this function is not called, default value (com.foxit.sdk.common.Renderer.e_RenderPage | com.foxit.sdk.common.Renderer.e_RenderAnnot ) will be used.

Parameters
[in]render_content_flagsRendering content flags. Please refer to values starting from com.foxit.sdk.common.Renderer.e_RenderPage and this should be one or a combination of these values.
Returns
None.

◆ setRenderEnhanceThinLines()

void com.foxit.sdk.common.Renderer.setRenderEnhanceThinLines ( boolean  is_render_enhance_thin_lines) throws com.foxit.sdk.PDFException

Set the flag to decide whether to enhance thin lines.

If this function is not called, default value false will be used.

Parameters
[in]is_render_enhance_thin_linestrue means to draw zero width lines with a thicker path so they are more visible than the default single pixel.
false means to draw zero width lines with a single pixel width.
Returns
None.

◆ setRenderFormField()

void com.foxit.sdk.common.Renderer.setRenderFormField ( boolean  is_render_formfield) throws com.foxit.sdk.PDFException

Set the flag to decide whether to render form fields (except signature fields).

If this function is not called, default value true will be used when this flag is available.

Parameters
[in]is_render_formfieldtrue means to render form fields (except signature fields). false means not to render form fields (except signature fields).
Returns
None.

◆ setRenderImageAntiAliasing()

void com.foxit.sdk.common.Renderer.setRenderImageAntiAliasing ( boolean  is_render_image_antialiasing) throws com.foxit.sdk.PDFException

Set the flag to decide whether to draw image anti-aliasing.

If this function is not called, default value true will be used.

Parameters
[in]is_render_image_antialiasingtrue means to draw image anti-aliasing, and the effect would be similar to values defined in enum class InterpolationFlag. false means to draw image aliasing.
Returns
None.

◆ setRenderPathAntiAliasing()

void com.foxit.sdk.common.Renderer.setRenderPathAntiAliasing ( boolean  is_render_path_antialiasing) throws com.foxit.sdk.PDFException

Set the flag to decide whether to draw path anti-aliasing.

If this function is not called, default value true will be used.

Parameters
[in]is_render_path_antialiasingtrue means to draw path anti-aliasing. false means to draw path aliasing.
Returns
None.

◆ setRenderPathFullCovered()

void com.foxit.sdk.common.Renderer.setRenderPathFullCovered ( boolean  is_render_path_full_covered) throws com.foxit.sdk.PDFException

A special flag that can be applied to fill mode.

If this function is not called, default value false will be used.

Parameters
[in]is_render_path_full_coveredtrue means that all pixels partially covered by the path will be fully painted, while false means not.
Returns
None.

◆ setRenderPathThinLine()

void com.foxit.sdk.common.Renderer.setRenderPathThinLine ( boolean  is_render_path_thin_line) throws com.foxit.sdk.PDFException

Set the flag to decide whether to draw path as thin line.

If this function is not called, default value false will be used.

Parameters
[in]is_render_path_thin_linetrue means to draw path as thin line. false means not to draw path as thin line.
Returns
None.

◆ setRenderSignature()

void com.foxit.sdk.common.Renderer.setRenderSignature ( boolean  is_render_signature) throws com.foxit.sdk.PDFException

Set the flag to decide whether to render signatures or not.

If this function is not called, default value true will be used when this flag is available.

Parameters
[in]is_render_signaturetrue means to render signatures. false means not to render signatures.
Returns
None.

◆ setRenderSignatureState()

void com.foxit.sdk.common.Renderer.setRenderSignatureState ( boolean  is_render_signature_state) throws com.foxit.sdk.PDFException

Set the flag to decide whether to draw the signature state on the signature.

If this function is not called, default value true will be used.

Parameters
[in]is_render_signature_statetrue means to draw the signature state on the signature, while false means not.

◆ setRenderTextAntiAliasing()

void com.foxit.sdk.common.Renderer.setRenderTextAntiAliasing ( boolean  is_render_text_antialiasing) throws com.foxit.sdk.PDFException

Set the flag to decide whether to draw text anti-aliasing.

If this function is not called, default value true will be used.

Parameters
[in]is_render_text_antialiasingtrue means to draw text anti-aliasing. false means to draw text aliasing.
Returns
None.

◆ startQuickRender()

Progressive com.foxit.sdk.common.Renderer.startQuickRender ( PDFPage  page,
Matrix2D  matrix,
PauseCallback  pause 
) throws com.foxit.sdk.PDFException

Start to quickly render a PDF page, mainly for thumbnail purpose.

This function is mainly used for render a page for thumbnail purpose. The rendered content will not be completed: all the annotations will be ignored, event if flag com.foxit.sdk.common.Renderer.e_RenderAnnot is set by function Renderer.setRenderContentFlags ; text content will become blurred and will be replace by pixel point.
It may still take a long time to do this quick rendering when page has complex or large contents, so Foxit PDF SDK uses a progressive process to do this.

Parameters
[in]pageA valid PDF page. It should have been parsed.
[in]matrixThe transformation matrix used for rendering, which is usually returned by function pdf.PDFPage.getDisplayMatrix .
[in]pausePause callback object which decides if the rendering process needs to be paused. This can be null which means not to pause during the rendering process. If this is not null, it should be a valid pause object implemented by user. Default value: null.
Returns
A progressive object. Please check the rate of current progress by function Progressive.getRateOfProgress . If the rate is not 100 yet, call function Progressive.resume to continue the progress until the progress is finished.

◆ startRender()

Progressive com.foxit.sdk.common.Renderer.startRender ( PDFPage  page,
Matrix2D  matrix,
PauseCallback  pause 
) throws com.foxit.sdk.PDFException

Start to render a PDF page.

It may take a long time to render a PDF page with complex or large contents, so Foxit PDF SDK uses a progressive process to do this.
Widget annotation is always associated with form field and form control in Foxit PDF SDK. For how to render widget annotations, here is a recommended flow:


Parameters
[in]pageA valid PDF page. If only to render annotations (that means only com.foxit.sdk.common.Renderer.e_RenderAnnot is set by function Renderer.setRenderContentFlags ), there is no need to parse the input page; otherwise the input page should have been parsed.
[in]matrixThe transformation matrix used for rendering, which is usually returned by function pdf.PDFPage.getDisplayMatrix .
[in]pausePause callback object which decides if the rendering process needs to be paused. This can be null which means not to pause during the rendering process. If this is not null, it should be a valid pause object implemented by user. Default value: null.
Returns
A progressive object. Please check the rate of current progress by function Progressive.getRateOfProgress . If the rate is not 100 yet, call function Progressive.resume to continue the progress until the progress is finished.

◆ startRenderBitmap()

Progressive com.foxit.sdk.common.Renderer.startRenderBitmap ( android.graphics.Bitmap  bitmap,
Matrix2D  matrix,
RectI  clip_rect,
int  interpolation,
PauseCallback  pause 
) throws com.foxit.sdk.PDFException

Start to render a bitmap.

It may take a long time to render a bitmap with complex or large contents, so Foxit PDF SDK uses a progressive process to do this.

Parameters
[in]bitmapA valid bitmap. User should ensure the bitmap to keep valid until current rendering process is finished.
[in]matrixThe transformation matrix used for rendering. This matrix is used as image matrix:
assume that h is image height, w is image width, and then matrix [w 0 0 h 0 0] will produce an identical image.
[in]clip_rectClip rectangle for the rendering device. This can be null. Default value: null.
[in]interpolationBitmap interpolation flags. Please refer to values starting from com.foxit.sdk.common.Bitmap.e_Downsample and this can be one or a combination of these values. If not specify any flag, please use 0. Default value: 0.
[in]pausePause callback object which decides if the rendering process needs to be paused. This can be null which means not to pause during the rendering process. If this is not null, it should be a valid pause object implemented by user. Default value: null.
Returns
A progressive object. Please check the rate of current progress by function Progressive.getRateOfProgress . If the rate is not 100 yet, call function Progressive.resume to continue the progress until the progress is finished.

◆ startRenderReflowPage()

Progressive com.foxit.sdk.common.Renderer.startRenderReflowPage ( ReflowPage  reflow_page,
Matrix2D  matrix,
PauseCallback  pause 
) throws com.foxit.sdk.PDFException

Start to render a reflow page.

It may take a long time to render a reflow page with complex or large contents, so Foxit PDF SDK uses a progressive process to do this.

Parameters
[in]reflow_pageA valid reflow page. It should have been parsed.
[in]matrixThe transformation matrix used for rendering, which is usually returned by function pdf.ReflowPage.getDisplayMatrix .
[in]pausePause callback object which decides if the rendering process needs to be paused. This can be null which means not to pause during the rendering process. If this is not null, it should be a valid pause object implemented by user. Default value:null.
Returns
A progressive object. Please check the rate of current progress by function Progressive.getRateOfProgress . If the rate is not 100 yet, call function Progressive.resume to continue the progress until the progress is finished.

◆ startRenderXFAPage()

Progressive com.foxit.sdk.common.Renderer.startRenderXFAPage ( XFAPage  xfa_page_view,
Matrix2D  matrix,
boolean  is_highlight,
PauseCallback  pause 
) throws com.foxit.sdk.PDFException

Start to render an XFA page.

It will take a long time to render an XFA page with complex or large contents, so Foxit PDF SDK uses a progressive process to do this.

Parameters
[in]xfa_page_viewA valid XFA page.
[in]matrixThe transformation matrix used for rendering, which is usually returned by function addon.xfa.XFAPage.getDisplayMatrix .
[in]is_highlighttrue means to highlight XFA widgets, and false means not to highlight XFA widgets.
[in]pausePause callback object which decides if the rendering process needs to be paused. This can be null which means not to pause during the rendering process. If this is not null, it should be a valid pause object implemented by user. Default value: null.
Returns
A progressive object. Please check the rate of current progress by function Progressive.getRateOfProgress . If the rate is not 100 yet, call function Progressive.resume to continue the progress until the progress is finished.