From b0b30b8ed51d6de3671c0b133edd6f7f3230282b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 19 Dec 2012 21:17:02 +0100 Subject: Preliminary support of producted pdf quality choice --- MAT/mat.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'MAT/mat.py') diff --git a/MAT/mat.py b/MAT/mat.py index 4c12333..84f26f2 100644 --- a/MAT/mat.py +++ b/MAT/mat.py @@ -102,7 +102,7 @@ def secure_remove(filename): logging.error('Unable to remove %s' % filename) -def create_class_file(name, backup, add2archive): +def create_class_file(name, backup, **kwargs): ''' return a $FILETYPEStripper() class, corresponding to the filetype of the given file @@ -149,4 +149,7 @@ def create_class_file(name, backup, add2archive): logging.info('Don\'t have stripper for %s format' % mime) return None - return stripper_class(filename, parser, mime, backup, add2archive) + if mime.endswith('pdf') and mime.startswith('application/'): + return stripper_class(filename, parser, mime, backup, **kwargs) + + return stripper_class(filename, parser, mime, backup, **kwargs) -- cgit v1.3