Make detection and fixing of PDF orientation as experimental and
default it to being disabled. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -100,6 +100,7 @@
|
||||
- Fix carousel item height issues.
|
||||
- Add the "to=" keyword argument to all ForeignKey, ManayToMany and OneToOne Fields.
|
||||
- Add Makefile target to check the format of the README.rst file.
|
||||
- Mark the feature to detect and fix the orientatin of PDF as experimental.
|
||||
|
||||
2.7.3 (2017-09-11)
|
||||
==================
|
||||
|
||||
@@ -350,6 +350,11 @@ Page number summary
|
||||
The page number summary has been placed back at the bottom of the
|
||||
carousel pages in the document preview view.
|
||||
|
||||
Orientation detection
|
||||
---------------------
|
||||
After reports that it is not working in 100% of the cases, the feature that
|
||||
detects and fixes the orientation of PDF has been marked experimental and
|
||||
now defaults to being disabled.
|
||||
|
||||
Other changes worth mentioning
|
||||
------------------------------
|
||||
|
||||
@@ -39,8 +39,8 @@ from .permissions import permission_document_view
|
||||
from .runtime import cache_storage_backend, storage_backend
|
||||
from .settings import (
|
||||
setting_disable_base_image_cache, setting_disable_transformed_image_cache,
|
||||
setting_display_width, setting_display_height, setting_language,
|
||||
setting_zoom_max_level, setting_zoom_min_level
|
||||
setting_display_width, setting_display_height, setting_fix_orientation,
|
||||
setting_language, setting_zoom_max_level, setting_zoom_min_level
|
||||
)
|
||||
from .signals import (
|
||||
post_document_created, post_document_type_change, post_version_upload
|
||||
@@ -569,7 +569,8 @@ class DocumentVersion(models.Model):
|
||||
self.update_mimetype(save=False)
|
||||
self.save()
|
||||
self.update_page_count(save=False)
|
||||
self.fix_orientation()
|
||||
if setting_fix_orientation.value:
|
||||
self.fix_orientation()
|
||||
|
||||
logger.info(
|
||||
'New document version "%s" created for document: %s',
|
||||
|
||||
@@ -101,3 +101,12 @@ setting_disable_transformed_image_cache = namespace.add_setting(
|
||||
'of documents\' pages.'
|
||||
)
|
||||
)
|
||||
setting_fix_orientation = namespace.add_setting(
|
||||
global_name='DOCUMENTS_FIX_ORIENTATION', default=False,
|
||||
help_text=_(
|
||||
'Detect the orientation of each of the document\'s pages '
|
||||
'and create a corresponding rotation transformation to '
|
||||
'display it rightside up. This is an experimental '
|
||||
'feature and it is disabled by default.'
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user