I just download today the trail version of the PowerJobs.
And i have found a link to create watermark on a PDF file.
If i copy the sample code and create a new job for it and added him to a lifecycle.
But it doesnt work.
Can anyone assist me for the solutions.
Thank you for reaching out to us. Are you getting any errors? What seems to be the problem? Please make sure that the archive was unblocked and that you copied the files in the right directory. Also have you restarted powerJobs and the Vault client after copying the files? When you add a file to a lifecycle transition please make sure that you copy the jobname without the extension. If the filename is Sample.CreatePDF.ps1 you have to write Sample.CreatePDF in the appropriate lifecycle transition.
If this resolved your problem please mark this topic as resolved, thank you.
I have copied the files to the standard directory from PowerJobs.
In the folder Modules i placed the "pdf folder" and the powershell script.
In the Jobs folder i created a new job for the watermark.
After that i have added a row to the jobhandlers in de programdata folder.
Indeed the filename of the jabname in the lifecycle is without .ps1
I see that the job is started en i dont have any error when the job is ready.
But the PDF file dont have any watermark in it.
What do you mean by standard directory from powerJobs? All the files have to be copied to the Modules folder. Have you made sure that all the files are unblocked? Can you please send me the logfile located at "C:\Users\<USER>\AppData\Local\coolOrange\powerJobs\Logs"?
Here you got the log file from PowerJobs.
Indeed i have copied all the files to the modules folder.
But the sample code to add watermark to the pdf file i have add to the folder Jobs
This is the Job Handler that i copied from the link above.
Did i do something wrong?
From your logfile i can see that you are trying to execute this job on a drawing. This sample job from the knowledge base has to be executed on a PDF file to work. This sample will add a watermark on an existing PDF file and save it to "C:\Temp\<filename>". To be able to add this to your lifecycle you could add the code for the watermark to your PDF job.
That should be great.
I use the sample pdf job handler that coolorange deliverd with it.
Is there a sample for the total job?
Or is it a small job for you to combine these to?
Unfortunately there is no sample of the full job. You could create it yourself by inserting the sample code from the Knowledge base into the standard job. After the cmdlet Export-Document where the PDF file gets created you can insert the code to add the watermark by using the PDF file in the $localPDFfileLocation, in the standard job that is in "C:\Temp\<filename>". After the watermark was added to the PDF file you can add the file into your Vault with Add-VaultFile. Please note that in the sample script to add a watermark the PDF file is in the variable $file but in the sample PDF job the $file variable is the drawing that gets exported to PDF.