INSERT DOCUMENT VERSION INTO DOCX DOCUMENT

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

INSERT DOCUMENT VERSION INTO DOCX DOCUMENT

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.

7 Replies
Highlighted
Senior Member II

Re: INSERT DOCUMENT VERSION INTO DOCX DOCUMENT

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.

 

 

Thanks & Regard,
Sanjay
Highlighted
Member II

Re: INSERT DOCUMENT VERSION INTO DOCX DOCUMENT

Hi Sanjay.

Thank You for your reply. I'm using Share UI.

Thanks, Leonardo.

Highlighted
Community Manager
Community Manager

Re: INSERT DOCUMENT VERSION INTO DOCX DOCUMENT

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,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
Highlighted
Member II

Re: INSERT DOCUMENT VERSION INTO DOCX DOCUMENT

Hi Eddie.

I do not need the users to revert the version of the document. I just need the last version printed inside the document's front page. How can I do technically? I am trying to integrate docx4j with Alfresco to update my docx document.  Is it a good solution?
 
Thank You, Leonardo.
Highlighted
Community Manager
Community Manager

Re: INSERT DOCUMENT VERSION INTO DOCX DOCUMENT

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

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
Highlighted
Member II

Re: INSERT DOCUMENT VERSION INTO DOCX DOCUMENT

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

Highlighted
Community Manager
Community Manager

Re: INSERT DOCUMENT VERSION INTO DOCX DOCUMENT

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. 

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!