AnsweredAssumed Answered

convert the word document to pdf and also want to add text type watermark

Question asked by ratik.singhal on Aug 16, 2013
Latest reply on Nov 14, 2013 by johnsondave
I want to convert the word document to pdf and also want to add text watermark in to converted pdf. Currently I am able to convert the doc,images and text files into pdf file by using rendition service.

—Code—-
renditionDef = renditionService.createRenditionDefinition('cm:pdfRendition', 'reformat');
renditionDef.parameters["mime-type"] = "application/pdf";
—–

I am stuck in adding Watermark in converted pdf for word document while I am able to add watermark in images by using Imagemagick by overriding the 'RuntimeExecutableContentTransformerWorker.java' file.

——
<bean id="transformer.worker.png2pdf" class="com.formtek.repo.content.transform.CustomRuntimeExecutableContentTransformerWorker">

..
</bean>

command to add watermark (Imagemagick)

* convert logo.jpg -font Arial -pointsize 20 -draw "gravity south fill black text 0,12 'Copyright' fill white text 1,11 'Copyright' " wmark_logo.jpg

I am trying to override for the word document but it was not working ..

Please help !

Outcomes