package it.mice.voila.runtime.displaytag.pdfexporter;

import it.mice.voila.runtime.displaytag.DisplayTagUtils;

import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Element;
import com.lowagie.text.Paragraph;
import com.lowagie.text.Phrase;

public class BasicPdfExporter extends AbstractPdfExporter {

	protected void prepareDocumentTitle(Document document) throws DocumentException {
		String title = DisplayTagUtils.getDocumentTitle(model);
		if (title != null) {
	        Paragraph p = new Paragraph(title);
	        p.setSpacingAfter((float)5);
	        p.setAlignment(Element.ALIGN_CENTER);
	        document.add(p);
	        document.add(new Phrase(""));
		}
	}
}
