@param ln is a two letter language code to give the OCR tool a hint.
@param return_working_dir if set to True, will return output_file path and the working_dir path, instead of deleting the working_dir. This is useful in case you need the intermediate images to build again a PDF.
"""
def_perform_rotate(working_dir,imagefile,angle):
"""Rotate imagefile of the corresponding angle. Creates a new file
with rotated- as prefix."""
debug('Performing rotate on %s by %s degrees'%(imagefile,angle))
raiseInvenioWebSubmitFileConverterError('It\'s impossible to retrieve the size of %s needed to perform a dummy OCR. The stdout of pamfile was: %s, the stderr was: %s. (%s)'%(imagefile,stdout,stderr,err))
parser.add_option("-o","--output",dest="output_name",help="the desired output FILE (if not specified a new file will be generated with the desired output format)")
parser.add_option("--without-pdfa",action="store_false",dest="pdf_a",default=True,help="don't force creation of PDF/A PDFs")
parser.add_option("--without-pdfopt",action="store_false",dest="pdfopt",default=True,help="don't force optimization of PDFs files")
parser.add_option("--without-ocr",action="store_false",dest="ocr",default=True,help="don't force OCR")
parser.add_option("--can-convert",dest="can_convert",help="display all the possible format that is possible to generate from the given format",metavar="FORMAT")
parser.add_option("--is-ocr-needed",dest="check_ocr_is_needed",help="check if OCR is needed for the FILE specified",metavar="FILE")
parser.add_option("-t","--title",dest="title",help="specify the title (used when creating PDFs)",metavar="TITLE")
parser.add_option("-l","--language",dest="ln",help="specify the language (used when performing OCR, e.g. en, it, fr...)",metavar="LN",default='en')