This example generates a report that has a title page and one chapter. The chapter contains two sections, each of which contains an image. The example uses append to add the content to the images, the images to the sections, the sections to the chapter, and the chapter and title page to the report.
Import the DOM and API packages so that you do not have to use long, fully qualified class names.