XTextRange pageEnd = textViewCursor.getStart();
PagePosition endPagePosition = new PagePosition(textDocument,
pageEnd);
return new Page(textDocument, startPagePosition, endPagePosition);
} catch (Exception exception) {
TextException textException = new TextException(exception
.getMessage());
textException.initCause(exception);
throw textException;
}
}