Hi.
I am new to Alfresco.
I have the following problem:
Retrieve the version of an Alfresco document (.docx). Display the version to the user. Allow the user to choose the
new version, then modify the Alfresco document by inserting the chosen version and persist the document. The version must be visible on the document in subsequent views.
How can I proceed?
Thank you in advance, Leonardo.
Hi,
Which UI you are using?ADF or Share or custom UI?
ADF and Share UI having version functionality where you can revert choosen version and persist ,download previous version ,view previous version properties.
Hi Sanjay.
Thank You for your reply. I'm using Share UI.
Thanks, Leonardo.
Hi @lpercoco,
Can I just clarify your requirement? Am I correct that you want to allow users to revert to an earlier version of the document, set that as the final version, and have that version number added somewhere into the document? Having the version number in the document metadata is not sufficient?
As an after thought, from a document management perspective, you may not want to have users setting an earlier version to be the final version?
Thanks,
Hi Eddie.
Hi @lpercoco,
I don't have any experience with docx4j but the process of using it is outlined on the github page.
It say that it "allows us to export metadata of a node into a docx or xlsx document, using a template" - so if the version number is part of a document metadata, it follows that it should be possible to add the version number into the document.
There is a answer by @jpotts that outlines an approach you might take using docx4j to do what you want.
HTH
Hi Eddie.
We have used part of the example you linked, without the metadata part.
The example says that if in the document there is the place holder ${Title} and in the metadata there is a property called Title the value of the property is passed to the template.
To do the same we would have to add a version property, but it would be double, because Alfresco already have a version property.
In addition, our customer does not use an Alfresco template, that is, He does not generate a document from scratch with alfresco, He imports his own docx and to make the changes.
Thank You, Leonardo
Hi @lpercoco,
You can use rules to apply aspects when a document is added to a folder - versionable is one such aspect - or add them manually. That would then give you the version property. That said, I don't understand how docx4j works regarding templates, etc.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.