dezynetechnologies / alfresco-pdf-toolkit

Automatically exported from code.google.com/p/alfresco-pdf-toolkit
Other
0 stars 0 forks source link

Issue on Javascript for applying watermark #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

When I execute this using javascript console, it doesn't give any error, but 
the watermark result is not there.

Can you show me which are the wrong parameter value?

This is our script :

var first_pdf = 
search.findNode("workspace://SpacesStore/d02fdc61-37fe-44e3-ba8c-165af67881a8");
var second_pdf = 
search.findNode("workspace://SpacesStore/15388185-1aeb-4bf3-825a-cb67ba0e5043");
var dest_folder = second_pdf.parent;
var WatermarkAction = actions.create("pdf-watermark");
WatermarkAction.parameters["destination-folder"] = dest_folder;
WatermarkAction.parameters["watermark-text"] = "Test111";
WatermarkAction.parameters["watermark-type"] = "text";
WatermarkAction.parameters["watermark-pages"] = "all";
WatermarkAction.parameters["watermark-depth"] = "under";
WatermarkAction.parameters["watermark-font"] = "Courier";
WatermarkAction.parameters["watermark-size"] = "34";
WatermarkAction.execute(first_pdf);

Original issue reported on code.google.com by t...@softbless.com on 16 Oct 2012 at 2:12

GoogleCodeExporter commented 9 years ago
Could you try providing a valid image noderef as a watermark image?  If that 
works then we know this is related to another, known issue.

Original comment by nmcminn on 16 Oct 2012 at 9:42

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for the response. We also had tried using watermark image, but it didn't 
success, giving the same behavior : it doesn't give any error, but the 
watermark result is not there.

Because I think watermark using text would be easier, I only report the text. 

Original comment by t...@softbless.com on 16 Oct 2012 at 10:48

GoogleCodeExporter commented 9 years ago
Try to add the following code: 

WatermarkAction.parameters["watermark-image"] = 
"workspace://SpacesStore/0154cb58-ce1f-4f0f-9b8c-5db8f9f19943"; //change it 
with an existing image file
WatermarkAction.parameters["position"] = "topleft";
It works for me.

Original comment by albertob...@gmail.com on 18 Oct 2012 at 9:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by nmcminn on 20 Feb 2013 at 8:24