public void writeAll() throws FileNotFoundException, IOException{
// 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) {