diff --git a/apps/converter/literals.py b/apps/converter/literals.py index 915630416a..66a17d0d67 100644 --- a/apps/converter/literals.py +++ b/apps/converter/literals.py @@ -1,27 +1,10 @@ from django.utils.translation import ugettext_lazy as _ -from converter.conf.settings import DEFAULT_OPTIONS -from converter.conf.settings import LOW_QUALITY_OPTIONS -from converter.conf.settings import HIGH_QUALITY_OPTIONS -from converter.conf.settings import PRINT_QUALITY_OPTIONS - DEFAULT_ZOOM_LEVEL = 100 DEFAULT_ROTATION = 0 DEFAULT_PAGE_NUMBER = 1 DEFAULT_FILE_FORMAT = u'jpeg' -QUALITY_DEFAULT = u'quality_default' -QUALITY_LOW = u'quality_low' -QUALITY_HIGH = u'quality_high' -QUALITY_PRINT = u'quality_print' - -QUALITY_SETTINGS = { - QUALITY_DEFAULT: DEFAULT_OPTIONS, - QUALITY_LOW: LOW_QUALITY_OPTIONS, - QUALITY_HIGH: HIGH_QUALITY_OPTIONS, - QUALITY_PRINT: PRINT_QUALITY_OPTIONS -} - DIMENSION_SEPARATOR = u'x' TRANSFORMATION_RESIZE = u'resize' diff --git a/apps/documents/templatetags/printing_tags.py b/apps/documents/templatetags/printing_tags.py index 33f560bdf1..d556f6e10d 100644 --- a/apps/documents/templatetags/printing_tags.py +++ b/apps/documents/templatetags/printing_tags.py @@ -1,6 +1,6 @@ from django.template import Library, Node, Variable -from converter.api import get_document_dimensions, QUALITY_PRINT +from converter.api import get_document_dimensions from documents.views import calculate_converter_arguments from documents.conf.settings import PRINT_SIZE @@ -14,8 +14,7 @@ class GetImageSizeNode(Node): def render(self, context): document = Variable(self.document).resolve(context) - arguments, warnings = calculate_converter_arguments(document, size=PRINT_SIZE, quality=QUALITY_PRINT) - width, height = get_document_dimensions(document, **arguments) + width, height = get_document_dimensions(document) context[u'document_width'], context['document_height'] = width, height context[u'document_aspect'] = float(width) / float(height) return u''