How can I include a watermark in a document?

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

How can I include a watermark in a document?

I wonder if it is possible and how can I include a watermark in a document.
6 Replies
kalpesh_c2
Senior Member

Re: How can I include a watermark in a document?

You can try alfresco add-on  called Alfresco PDF Toolkit .

It has  adding watermark option.

Thanks,

Contcentric

renato_fritola
Active Member II

Re: How can I include a watermark in a document?

When I try to install pdf addon toolkit alfresco generates the following error:

at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1301),
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.updateAdminUserWhenDefault' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-7.22.jar!/alfresco/patch/patch-services-context.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.alfresco.web.app.ResourceBundleBootstrap] for bean with name 'bootstrapExtraBundlesBean' defined in file [/usr/local/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/org.alfresco.extension.pdftoolkit/module-context.xml]; nested exception is java.lang.ClassNotFoundException: org.alfresco.web.app.ResourceBundleBootstrap,
2018-10-29 19:37:15,941 ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed,
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498),
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199),
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745),
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576),
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320),
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222),
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318),
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846),
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511),
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875),
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:726),
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863),
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546),
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400),
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291),
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103),
at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70),
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4753),
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215),
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150),
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752),
at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:129),
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:150),
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:140),
at java.security.AccessController.doPrivileged(Native Method),
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734),
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1141),
at java.util.concurrent.FutureTask.run(FutureTask.java:266),
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149),
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624),
at java.lang.Thread.run(Thread.java:748),
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.alfresco.web.app.ResourceBundleBootstrap] for bean with name 'bootstrapExtraBundlesBean' defined in file [/usr/local/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/module/org.alfresco.extension.pdftoolkit/module-context.xml]; nested exception is java.lang.ClassNotFoundException: org.alfresco.web.app.ResourceBundleBootstrap,
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1379),
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:663),
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:630),
... 30 more,
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741),
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1794),
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$invokeInitMethods$5(AbstractAutowireCapableBeanFactory.java:1795),
at org.alfresco.repo.admin.patch.impl.AdminUserPatch.afterPropertiesSet(AdminUserPatch.java:117),
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1101),
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:341),
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:335),
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:413),
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1098),
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:462),
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:407),
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:485),
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:507),
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1491)

kalpesh_c2
Senior Member

Re: How can I include a watermark in a document?

In Which Version of Alfresco,You are trying to install?

kalpesh_c2
Senior Member

Re: How can I include a watermark in a document?

First Download That code,Create jar file and place repo jar file inside  tomcat\webapps\alfresco\WEB-INF\lib and share jar file inside tomcat\webapps\share\WEB-INF\lib

renato_fritola
Active Member II

Re: How can I include a watermark in a document?

I tried to compile however the system can not download some trending:

[ERROR] Unresolvable build extension: Plugin org.alfresco.maven.plugin: alfr esco-maven-plugin: 2.2.0 or one of its dependencies could not be resolved: Failed  to collect dependencies at org.alfresco.maven.plugin: alfresco-maven-plugin: jar: 2.2.0 -> org.alfresco: alfresco-mmt: jar: 5.1.e: Failed to read artifact descriptor  for org.alfresco: alfresco-mmt: jar: 5.1.e: Could not transfer artifact org.alfres co: alfresco-mmt: pom: 5.1.e from / to central3 (http://artifacts.alfresco.com/nexus/ content / groups / public /): sun.security.validator.ValidatorException: PKIX path bu ilding failed: sun.security.provider.certpath.SunCertPathBuilderException: unabl and to find valid certification path to requested target -> [Help 2]
renato_fritola
Active Member II

Re: How can I include a watermark in a document?

The PDF Toolkit has been discontinued and does not work in the latest versions of Alfresco. 
Is there any other way to set up watermark addition? Can you give me an example?
I need to add a watermark dynamically as I run the folder rules.