LoadCanvasAsync Method

PDFTron SilverDox SDK

Collapse imageExpand ImageCopy imageCopyHover image
Loads the canvas for a given page number.

Namespace: PDFTron.SilverDox.Documents
Assembly: SilverDox (in SilverDox.dll) Version: 1.2.4413.29010

Syntax

C#
public void LoadCanvasAsync(
	int pageNumber,
	Action<Document..::..OnLoadCanvasAsyncCallbackArgs> onLoadCanvasCallback,
	Action<Document..::..OnLoadCanvasAsyncCallbackArgs> onLoadCanvasAndResourcesCallback,
	Action<Link> onLinkReadyCallback
)
Visual Basic
Public Sub LoadCanvasAsync ( _
	pageNumber As Integer, _
	onLoadCanvasCallback As Action(Of Document..::..OnLoadCanvasAsyncCallbackArgs), _
	onLoadCanvasAndResourcesCallback As Action(Of Document..::..OnLoadCanvasAsyncCallbackArgs), _
	onLinkReadyCallback As Action(Of Link) _
)
Visual C++
public:
void LoadCanvasAsync(
	int pageNumber, 
	Action<Document..::..OnLoadCanvasAsyncCallbackArgs^>^ onLoadCanvasCallback, 
	Action<Document..::..OnLoadCanvasAsyncCallbackArgs^>^ onLoadCanvasAndResourcesCallback, 
	Action<Link^>^ onLinkReadyCallback
)

Parameters

pageNumber
Type: System..::..Int32
The page number of the requested canvas.
onLoadCanvasCallback
Type: System..::..Action<(Of <(<'Document..::..OnLoadCanvasAsyncCallbackArgs>)>)>
A callback function that is called when the canvas is loaded. Note that canvas may be missing elements, which will be added to the canvas as they are loaded.
onLoadCanvasAndResourcesCallback
Type: System..::..Action<(Of <(<'Document..::..OnLoadCanvasAsyncCallbackArgs>)>)>
A callback function that is called when the canvas and all its associated resources are loaded. It is at this time that the canvas may be displayed without any missing elements.
onLinkReadyCallback
Type: System..::..Action<(Of <(<'Link>)>)>
A callback function that is called when a link is created on the canvas. The callback's argument provides access the link, which may be used to alter the behavior of the link such as its response to mouse events.

Remarks

A canvas is made available through the onLoadCanvasCallback callback as soon as it is loaded; however, the canvas may not contain all the elements needed to render it completely. In this case, this canvas will be automatically populated with each missing element as each element is loaded. When the canvas can be fully rendered, the canvas is made available through the onLoadCanvasAndResourcesCallback callback.

See Also