This project contains a Template Processor for filling PDF-documents with values using meta-data.
To build the module and its AMP / JAR files, run the following command from the base project directory:
mvn clean install
The command builds JAR files named template-processor-share-jar-<version>.jar
/template-processor-share-jar-<version>.amp
,
template-processor-platform-jar-<version>.jar
/template-processor-platform-jar-<version>.amp
into <project-directory>/template-processor-platform-jar/target/
and
<project-directory>/template-processor-share-jar/target/
directories.
Use alfresco built-in tools to deploy plugin, Alfresco install AMP
- Log into Alfresco and create your
model
- Define custom type with custom properties
- Add PDF-document to Alfresco repository
- Change type of your document to your
model
- Add aspect to the document of Template Processor
aim:template
- Now you can fill in properties into your document just clicking
Fill PDF with values
- After it's done once, you are not able to fill values again
- However, if you, for some reason, need to change values in the PDF-document -
you need to edit the properties and remove mark from checkbox
Document is filled
in the property list
Note: names should follow these conventions:
- Id of the property is
prefix:name
, for examplemycom:name
- Id of the property is generated by Alfresco, so Id
mycom:name
means that you havemodel
with namespacemycom
and propertyname
- Id of the input field in the PDF-document should follow prefixed name, in this case
mycom:name
- The mime-type of the PDF-document should be
application/pdf
- The Ids are case-sensitive, so
mycom:Name
andmycom:name
are different Ids