diff --git a/apps/converter/api.py b/apps/converter/api.py
index 993fb70f1d..ff4e9d645b 100644
--- a/apps/converter/api.py
+++ b/apps/converter/api.py
@@ -110,7 +110,7 @@ def get_page_count(input_filepath):
return backend.get_page_count(input_filepath)
-
+'''
def get_document_dimensions(document, *args, **kwargs):
document_filepath = create_image_cache_filename(document.checksum, *args, **kwargs)
if os.path.exists(document_filepath):
@@ -118,7 +118,7 @@ def get_document_dimensions(document, *args, **kwargs):
return [int(dimension) for dimension in backend.identify_file(unicode(document_filepath), options).split()]
else:
return [0, 0]
-
+'''
def get_available_transformations_choices():
result = []
diff --git a/apps/documents/forms.py b/apps/documents/forms.py
index 60d69506ac..a829516327 100644
--- a/apps/documents/forms.py
+++ b/apps/documents/forms.py
@@ -271,10 +271,10 @@ class DocumentTypeSelectForm(forms.Form):
class PrintForm(forms.Form):
- page_size = forms.ChoiceField(choices=PAGE_SIZE_CHOICES, initial=DEFAULT_PAPER_SIZE, label=_(u'Page size'), required=False)
- custom_page_width = forms.CharField(label=_(u'Custom page width'), required=False)
- custom_page_height = forms.CharField(label=_(u'Custom page height'), required=False)
- page_orientation = forms.ChoiceField(choices=PAGE_ORIENTATION_CHOICES, initial=DEFAULT_PAGE_ORIENTATION, label=_(u'Page orientation'), required=True)
+ #page_size = forms.ChoiceField(choices=PAGE_SIZE_CHOICES, initial=DEFAULT_PAPER_SIZE, label=_(u'Page size'), required=False)
+ #custom_page_width = forms.CharField(label=_(u'Custom page width'), required=False)
+ #custom_page_height = forms.CharField(label=_(u'Custom page height'), required=False)
+ #page_orientation = forms.ChoiceField(choices=PAGE_ORIENTATION_CHOICES, initial=DEFAULT_PAGE_ORIENTATION, label=_(u'Page orientation'), required=True)
page_range = forms.CharField(label=_(u'Page range'), required=False)
diff --git a/apps/documents/templates/document_print.html b/apps/documents/templates/document_print.html
index 06068fc31b..35f08abaf8 100644
--- a/apps/documents/templates/document_print.html
+++ b/apps/documents/templates/document_print.html
@@ -1,5 +1,5 @@
{% load project_tags %}
-{% load printing_tags %}
+{#{% load printing_tags %}#}
@@ -48,9 +48,10 @@
{% for page in pages %}
- {% get_document_size object %}
+ {#{% get_document_size object %}#}
-

page_aspect %}width="97%"{% else %}height="97%"{% endif %} />
+ {#

page_aspect %}width="97%"{% else %}height="97%"{% endif %} />#}
+
{% endfor %}
diff --git a/apps/documents/templatetags/printing_tags.py b/apps/documents/templatetags/printing_tags.py
index c2fc6b4e29..7dccae8085 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
+from converter.api import get_dimensions
from documents.conf.settings import PRINT_SIZE
@@ -13,7 +13,7 @@ class GetImageSizeNode(Node):
def render(self, context):
document = Variable(self.document).resolve(context)
- width, height = get_document_dimensions(document)
+ width, height = get_dimensions(document)
context[u'document_width'], context['document_height'] = width, height
context[u'document_aspect'] = float(width) / float(height)
return u''
diff --git a/apps/documents/views.py b/apps/documents/views.py
index 7e5f563390..fdd98922c6 100644
--- a/apps/documents/views.py
+++ b/apps/documents/views.py
@@ -799,18 +799,18 @@ def document_print(request, document_id):
hard_copy_arguments['page_range'] = form.cleaned_data['page_range']
# Compute page width and height
- if form.cleaned_data['custom_page_width'] and form.cleaned_data['custom_page_height']:
- page_width = form.cleaned_data['custom_page_width']
- page_height = form.cleaned_data['custom_page_height']
- elif form.cleaned_data['page_size']:
- page_width, page_height = dict(PAGE_SIZE_DIMENSIONS)[form.cleaned_data['page_size']]
+ #if form.cleaned_data['custom_page_width'] and form.cleaned_data['custom_page_height']:
+ # page_width = form.cleaned_data['custom_page_width']
+ # page_height = form.cleaned_data['custom_page_height']
+ #elif form.cleaned_data['page_size']:
+ # page_width, page_height = dict(PAGE_SIZE_DIMENSIONS)[form.cleaned_data['page_size']]
# Page orientation
- if form.cleaned_data['page_orientation'] == PAGE_ORIENTATION_LANDSCAPE:
- page_width, page_height = page_height, page_width
+ #if form.cleaned_data['page_orientation'] == PAGE_ORIENTATION_LANDSCAPE:
+ # page_width, page_height = page_height, page_width
- hard_copy_arguments['page_width'] = page_width
- hard_copy_arguments['page_height'] = page_height
+ #hard_copy_arguments['page_width'] = page_width
+ #hard_copy_arguments['page_height'] = page_height
new_url = [reverse('document_hard_copy', args=[document_id])]
if hard_copy_arguments: