OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Adding a date watermark to the downloaded article

The Plugin Gallery is a venue for users of PKP software to share their plugins.

Moderators: jmacgreg, michael, John

Forum rules
If you post a plugin here, please include information on which versions of which applications it is compatible with. Attach a tarball of the plugin (e.g. tar cvzf myPlugin-0.1.tar.gz plugins/generic/myPlugin). Thanks for contributing!

Adding a date watermark to the downloaded article

Postby alirezaaa » Mon Apr 02, 2012 1:29 am

Hi,
We have had so many requests about adding the download time and journal's URL to the article that is being downloaded.
I'm not familiar with php coding so I've created a web service in C# which does the job.
It receives the PDF address and returns the modified file.
for example, this is the output (address, date and time of download are added to the left margin of each page):
http://www.medinfotechs.com/pdf/watermark.asmx/watermark?input=http://www.ijnmr.mui.ac.ir/index.php/ijnmr/article/view/505/432
This is just a test version and is not finished yet, but is functional.
Can any one help me adding this web service to OJS?
It could be added as a plugin which is accessed at the download time.
Any help is appreciated
Cheers,
Last edited by alirezaaa on Wed Mar 20, 2013 2:07 pm, edited 5 times in total.
alirezaaa
 
Posts: 29
Joined: Sat Jul 09, 2011 9:54 am

Re: Adding a date watermark to the downloaded article

Postby amitkawasthi » Sat Apr 07, 2012 12:36 am

I am intrested in such plugin. Would you share your C# code (idea) so that I could do something in PHP.
amitkawasthi
 
Posts: 3
Joined: Fri May 08, 2009 9:59 am

Re: Adding a date watermark to the downloaded article

Postby alirezaaa » Sat Apr 07, 2012 11:54 pm

I am using components in my code which are not supported in PHP and I don't know if there is a PHP version.
So, if we are going to use this components we have to either keep the webservice and call it from OJS or use the provided assembly in PHP like this.
http://www.devarticles.com/c/a/PHP/Using-the-.NET-Assembly-in-PHP/

Cheers,
Last edited by alirezaaa on Sun Apr 15, 2012 11:12 pm, edited 1 time in total.
alirezaaa
 
Posts: 29
Joined: Sat Jul 09, 2011 9:54 am

Re: Adding a date watermark to the downloaded article

Postby alirezaaa » Sun Apr 15, 2012 11:10 pm

Hi everybody,
I managed to add the link of this webservice to pdf galley links in our journals' websites.
If you like to use this service too, you must add the mentioned link in article.tpl and issue.tpl files.
Cheers,
Last edited by alirezaaa on Sat Sep 29, 2012 12:16 pm, edited 2 times in total.
alirezaaa
 
Posts: 29
Joined: Sat Jul 09, 2011 9:54 am

Re: Adding a date watermark to the downloaded article

Postby jmacgreg » Tue Apr 17, 2012 9:40 am

Hi Alirezaaa,

That's a really interesting bit of functionality! I don't know of any way to do this via PHP natively myself, and the only other (quick) solution I could think of would be to timestamp the download file's filename itself. Can you control how and what is stamped into the PDF itself fairly easily?

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Adding a date watermark to the downloaded article

Postby alirezaaa » Tue Apr 17, 2012 10:40 pm

Hi James,
It is possible to control whatever is stamped through the parameters that is sent to the webservice (font name, size, color, contrast, position and time format).
The url would be something like http://...?input=(file_address)&font=...&color=...&xy=...&timeformat=.... and all the articles of a journal will use one setting.

Best,
Alireza
alirezaaa
 
Posts: 29
Joined: Sat Jul 09, 2011 9:54 am

Re: Adding a date watermark to the downloaded article

Postby sjournals » Mon Mar 11, 2013 5:33 am

Dear Alireza
I cant find file relation to Adding a date watermark to the downloaded article, please guide me ...
Can any one help me adding this web service to my website?
sjournals
 
Posts: 2
Joined: Fri Feb 15, 2013 2:01 am


Return to Plugin Gallery

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest