public class Reader extends ObjectClient-side Reader to load a document from the server.
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description
append(Source source)Appends a
Sourceto a Document at the current position.
complete(com.google.gwt.user.client.rpc.AsyncCallback<Document> callback)Initiates server side document loading.
public void complete(com.google.gwt.user.client.rpc.AsyncCallback<Document> callback)Initiates server side document loading. Please note that prior to calling complete() all
Sources must have been added or appended to the Reader. The client is notified via
AsyncCallbackabout the read status. The
AsyncCallbacks onSuccess() method will be called after the first
DocumentReadResulthas successfully been processed. Then a document will be available on the client side and the client can start to load the document into the viewer. Usually this will be done by calling viewer.getPageView().setDocument(result) (where "result" is the callback's result object, a
Documentinstance). Subsequent pages will be loaded asynchronously - processing these will be handled by appropriate listeners.
callback- Called when the Document is available for the client.
public SourceConfiguration append(Source source)Appends a
Sourceto a Document at the current position. The
Sourcecan also be a CompositeSource. The CompositeSource can consist of several
Sources. Thus the feature can be used to create composite documents created from several document parts which are simply appended one to another in the CompositeSource.
source- The source to append
- Configuration of the Source that was appended, like its target DocumentLayer
@Deprecated public SourceConfiguration add(Source source)Deprecated.Add a
Documentat the position of the last appended document, on top of the last document.
DocumentDataProviderand documentation about Reader API read method. It is important to reset the targetIndex after reading of the document and before reading the annotations. Reset the value to the one prior to the reading of the document.
source- The source to read.
- Configuration of the source to add, especially its