Remove transformations from 1800 documents

26 views
Skip to first unread message

RBS

unread,
Jul 26, 2018, 11:03:17 AM7/26/18
to Mayan EDMS
Just recently started using Mayan and we had a user upload around 1800 documents.  Almost all of these documents had a transformation of {"degrees": 180} added and should not have.  How can I easily remove the transformations from all documents in the system?  Thanks!

RBS

unread,
Jul 26, 2018, 11:10:23 AM7/26/18
to Mayan EDMS

BTW, We are using version 2.7.3 running under docker

Roberto Rosario

unread,
Aug 8, 2018, 5:33:25 PM8/8/18
to Mayan EDMS
This was most likely caused by the automatic orientation detection. This feature now defaults to disable since PDF are not always compliant. In 3.0 it is possible to select all the document in a page (40) and delete the transformations. A entry can be added to the "Tools" menu to clear all transformation in the system. In the meantime the only solution would be to launch a Python shell inside the Docker instance using:

docker exec -ti <docker container name> /bin/bash

The launcher a Python shell connected to Mayan.

/usr/local/python shell

execute the following:

from documents.models import Document
from converter.models import Transformation

[Transformation.objects.get_for_model(document).delete() for document in Document.objects.all()]

I'll push the option of adding an entry to the tools menu to clear all transformation in the queue for next version.
Reply all
Reply to author
Forward
0 new messages