ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Manipulate a webpage to include a watermark

(1/2) > >>

Sisenando:
I work with a web application that works only on Mozilla Firefox.

A particular task generates a page to print a letter to be mailed.

After printed the letter, my colleagues should stamp the brand of post office and manually write the send date on which the letter is sent.

Is there any way to manipulate the display of the page to include a line in HTML with the stamp image before printing?

Any ideas?

Thank you very much.

MilesAhead:
www.w3schools.com/css/css_background.asp

by using css you may not even need to change the page source provided the browser prints what you see.

Sisenando:
Thanks for feedback, Guys.

Basically, before printing the letter, I need a solution that enter the source code of the page (or simulate it) the following line after the BODY tag and refresh the page (or generate another showing the letter with the stamp):

<div style = "background: url (file :///G:/PostStamp.jpg) no-repeat; display: block; height: 37px; padding: 135px 0 0 0; position: absolute; right: 0; text-align: center; top: 0 width: 171px; "> %ShowDate% </ div>

The %ShowDate% I already know how to fill.

My working conditions:

1. I work in a government office.

2. Most of my colleagues are laymen in computer use, most are elderly and there are also people with disabilities (I'm trying to improve everyone's work).

3. The specific task that is necessary to improve is the print of letters (I want to eliminate the need to use hand stamps or writing manually).

4. The basis of our work is a web application developed by a third party, ready to use, and we can not request changes to the source code.

5. Locally, I can save the page and change the source code, but my colleagues will have difficulty with this task and certainly will prefer manually stamping and write.

6. I want to improve the efficiency of all people, that's why I need a solution based on a simple click or keyboard shortcut.

I tryed Greasemonkey, but we can not install add-ons to firefox too because the system security policies.

Example.jpg (184.61 kB. 956x537 - viewed 143 times.)

app103:
You might be able to do this with a bookmarklet, instead of greasemonkey.  ;)

Sisenando:
Thanks for the Idea, app103.

How can I make a Bookmarklet with this code below? (It works in scratchpad, but doesn't works in a bookmark link):

data=document.getSelection();
correios=document.createElement("div");
correios.id="correios";
correios.style="background:url(http://i62.tinypic.com/169hxls.png) no-repeat;display:block;height:37px;padding:135px 0 0 0;position:absolute;right:0;text-align:center;top:0;width:171px;z-index=-1";
correios.innerHTML=data;
document.getElementsByTagName("body")[0].appendChild(correios);

Navigation

[0] Message Index

[#] Next page

Go to full version