class PrintingController {

	@RequestMapping(value = "/printing", method = RequestMethod.GET)
	public ModelAndView printGet(@RequestParam("documentId") String documentId,
			@RequestParam(value = "download", defaultValue = DOWNLOAD_METHOD_SAVE, required = false) String download,
			@RequestParam(value = "name", defaultValue = "geomajas.pdf", required = false) String fileName,
			@RequestParam(value = "dpi", defaultValue = "72", required = false) int dpi) throws PrintingException {
		ModelAndView mav = new ModelAndView();
		mav.setViewName(DOCUMENT_VIEW_NAME);
		mav.addObject(DOCUMENT_KEY, printService.removeDocument(documentId));
		mav.addObject(DOWNLOAD_KEY, download);
		mav.addObject(FILENAME_KEY, fileName);
		mav.addObject(FORMAT_KEY, Format.decode(fileName));
		mav.addObject(DPI_KEY, dpi);
		return mav;
	}

}