// Creation of a document object
Document document = new Document();
// Variable declaration and initialization
ResultManager rm = new ResultManager(result);
GraphResultDrawer graphDrawer = rm.getGraphDrawer();
Image[] images = graphDrawer.getGraphImages();
// Add the data into the PDF file based on the page
// layout that the user chosen
if(pageSetup == false) {
// Set the page layout as landscape