HTML - Printing a repeating background image.
Discussion
I thought I was being really clever.... I can now tell if a report in my database has been printed and display a repeating background image if it has... Woohoo. Except of course browsers don't print background images by default. Arse. How can I get round this?
Snippet of how I'm doing it below.
{{{
<table width="832" border="1" cellpadding="0" cellspacing="0" <?php if ($Printed=="Yes"
{ ?>background="images/duplicate.gif" <?php } ?>>
<tr>
<td width="504" colspan="3"><p> Site: <strong><?php echo $row_PermitRecordset['Site']; ?></strong></p></td></table>
}}}
Snippet of how I'm doing it below.
{{{
<table width="832" border="1" cellpadding="0" cellspacing="0" <?php if ($Printed=="Yes"
{ ?>background="images/duplicate.gif" <?php } ?>><tr>
<td width="504" colspan="3"><p> Site: <strong><?php echo $row_PermitRecordset['Site']; ?></strong></p></td></table>
}}}
It's a browser issue - unless background printing is enabled on the browser I don't think you'll get very far
Something I've had to explain to clients a number of times.
I suppose you could you some CGI component to render the content as a graphic and stick a background in that way.
Probably best to think of an alternative way of flagging the content without needing background images.
Something I've had to explain to clients a number of times.
I suppose you could you some CGI component to render the content as a graphic and stick a background in that way.Probably best to think of an alternative way of flagging the content without needing background images.
But just in case that doesn't work does anyone have any other ideas?
I need to somehow make it very difficult (read impossible) to alter the master document or print a duplicate without it being obvious that it's not the original. A repeating watermark would be the ideal solution to make image manipulation difficult.
Any ideas or suggestions welcome.
I need to somehow make it very difficult (read impossible) to alter the master document or print a duplicate without it being obvious that it's not the original. A repeating watermark would be the ideal solution to make image manipulation difficult.
Any ideas or suggestions welcome.
The Griffalo said:
I've got my if/then processing working (it's how I switch the background image on second time it prints) but what could I do on the CSS that would allow me to identify a duplicate and make copying/editing very hard?
You could always place the "master" image in the document as an embedded <img>, then use CSS to show/hide (display:none) the image depending on whether it's the master or copy document.Bear in mind though that CSS and HTML can always be manipulated from within the browser.
Edited by jagnet on Thursday 25th October 09:23
Edited by jagnet on Thursday 25th October 09:25
That sounds like a bloody good idea... While it could be manipulated I've shown due diligence if I can get it to print a watermark on anything but the first copy. If a user prints the document I capture the event with the onbeforeprint() event and throw an entry in my audit log so I can always tell how many copies of the document have been queued to print.
The Griffalo said:
That sounds like a bloody good idea... While it could be manipulated I've shown due diligence if I can get it to print a watermark on anything but the first copy. If a user prints the document I capture the event with the onbeforeprint() event and throw an entry in my audit log so I can always tell how many copies of the document have been queued to print.
That sounds like it should do the job then. I assume that this document is only going to be printed by Internet Explorer users? IIRC onbeforeprint() is only supported by IE.jagnet said:
The Griffalo said:
That sounds like a bloody good idea... While it could be manipulated I've shown due diligence if I can get it to print a watermark on anything but the first copy. If a user prints the document I capture the event with the onbeforeprint() event and throw an entry in my audit log so I can always tell how many copies of the document have been queued to print.
That sounds like it should do the job then. I assume that this document is only going to be printed by Internet Explorer users? IIRC onbeforeprint() is only supported by IE.FYI:
http://www.w3schools.com/browsers/browsers_stats.a...
Shows Firefox (FF) as having 35.4% of the market !
http://www.w3schools.com/browsers/browsers_stats.a...
Shows Firefox (FF) as having 35.4% of the market !
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff




