ULocale.getDefault( ) ).getRoot( ) );
ulocale ).getRoot( ) );
		public void end(IReportContent rc)		{			// Before closing the document, we need to create TOC.			TOCHandler tocHandler = new TOCHandler( rc.getTOCTree( "pdf",					ULocale.getDefault( ) ).getRoot( ) );			TOCNode tocRoot = tocHandler.getTOCRoot();			if (tocRoot == null || tocRoot.getChildren().isEmpty())			{				writer.setViewerPreferences(PdfWriter.PageModeUseNone);			}			else			{				writer.setViewerPreferences(PdfWriter.PageModeUseOutlines);				PdfOutline root = cb.getRootOutline();				tocHandler.createTOC(tocRoot, root);			}			if(doc.isOpen( ))			{				doc.close();			}		}