As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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 thenew 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.
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
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