A computer-implemented method and computer-readable medium are provided
for providing page and table layout services. According to the method, a
layout manager program provides layout services to client application
programs. The layout manager receives requests from client application
programs to format document content. In response to such requests, the
layout manager performs one or more callback operations to the client
application to retrieve portions of the document to be laid out. Once the
portions of the page to be laid out have been retrieved through the
callback operations, the layout manager lays out the portions of the
document and notifies the client application that the layout is
completed. The client application can then query the layout manager for
the formatting result.