# Tuesday, August 02, 2005

How to print html documents or reports with custom headers and footers in Internet Explorer.

The headers and footers printed when a web page is printed in Internet Explorer is defined in the IE Page Setup dialog - a number of meta commands are available for including page numbers and dates etc - but then you knew that.

When printing an html document or report in a corporate environment or on specialist pages from web sites (e.g. printing a post card) it can be desirable to use headers/footers appropriate to the report or remove the headers and footers altogether, but only for the particular report/page.

ScriptX is an ActiveX control from MeadCo that provides this control, and much more. For just controlling the headers and footers it is free.

1. Include the ScriptX object on the page, either in the <head> or <body> sections of the document:

<!-- MeadCo ScriptX Control --> 
<object id="factory" style="display:none" viewastext
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=6,2,433,14">
</object>

(The installation cab file can be downloaded from your own servers).

2. Initialise the required print parameters in the onload event with a little bit of javascript:

<script language="jscript">
function initPrinting() {
   factory.printing.header = "ScriptX Printing";
   factory.printing.footer = "";
}
</script>
<body onload="initPrinting()">
...
</body>
</html>

Now, when the user chooses print (either from the File menu or via some scripted button), the page will be printed with the defined headers. When the user navigates away from the page their default print settings will be restored.

#    Comments [1] |
# Monday, July 25, 2005

Widgets

MacWorld: "Yahoo on Monday will announce the acquisition of Konfabulator, a Macintosh and Windows application that allows users to run mini files known as Widgets on their desktop -- the same model used by Apple for its Dashboard application." [via Scripting News]

Depends what you mean by model. The Apple Dashboard application is HTML based, Konfabulator, the last time I looked, isn't. As far as I am aware, the nearest thing there is to Dashboard is Zeepe though Dashboard does things that Zeepe doesn't (like the canvas element) but then Zeepe is usable for way beyond 'widgets'.

#    Comments [0] |
# Sunday, July 24, 2005

Muggers or shooting to protect.

Simon Phipps's comments/observes:

... One might guess he didn't understand the shouts of his pursuers (even those whose English is excellent can find shouted orders incomprehensible) and assumed they were armed muggers, not policemen. He fled, was pursued, was pushed to the ground and was shot in the head in cold blood. ... It's a tragedy in every sense....

I don't live in London anymore, I have in the past when bombs were going off (my late father was in town when the Harrods bomb went off - Harrods was on his drive route so a call to mother was required to let her know he was no-where near) but I am convinced that guns are not making the difference some might hope for. I argued against armed police at school and I agree with Simon:

I'm sure the investigation will find the truth but there's a deeper truth here. We had it right - we don't want or need guns on London's streets. Get those guns off London's streets, they kill people rather than making us safe, no matter whose hands they are in. [via WebMink]

 

#    Comments [1] |
# Friday, July 22, 2005

I can see clearly now....

Peter has an amusing view:

Vista?! Are you serious?.  .... I suppose Longhorn will be one of those form over substance things then: it will look pretty, and don't forget that, and remember the name, and it's all about the view, the view is great, and don't expect stability or neat features, half of which we have gutted. Of course, the meaning of a "distant view or prospect" could also be a subtle hint about infinite delays of the product (and then Redmond could smugly say: "But we told you so!"). ... [via Peter on Tech]

 

#    Comments [0] |

Boom and bust

Adding to the gloom was news that the manufacturing sector moved into recession during the period. Manufacturing output contracted 0.7% in the second quarter - following a 0.9% fall in the previous three months.  [via BBC NEWS | Business | Consumer slowdown hits UK growth]

I'm old enough to remember the days when news like this would have been the top headline, whatever the state of the service sector.

#    Comments [0] |
# Wednesday, July 20, 2005

Virtual PC tip - thanks Ben

Drag and drop off of Virtual PC console.  A little known feature of Virtual PC is that you can select a virtual machine in the Virtual PC Console and drag and drop it off on to the desktop.  This will create a shortcut on the desktop that can be used to launch the selected virtual machine directly. [via MSDN Blogs]

Its true: little known and very useful.

#    Comments [0] |

Fixin' the rules

He appears to be fixing the rules to suit himself, while putting off tough spending and tax decisions. These fiscal fudges contrast with the open, independent conduct of monetary policy.  [via Britain, UK news from The Times and The Sunday Times - Times Online]

It is great while they let him get away with it - heck who really wants to pay increased taxes? Just by saying "ooh lets start counting from 1997" means taxes don't have to rise is truely wonderful - if only to the extent that it exposes the 'science' of economics as really only a bit of cod psychology.

#    Comments [0] |

At last, the nice theme

The Tablet PC Experience pack (or whatever it was called) came with a rather nice theme that originated on Media Centre, finally its available on XP:

New Windows XP Theme (Energy Blue) Available....  ..., you can now download the Royale / Energy Blue theme. This theme originally shipped with Windows XP Media Center Edition, but Microsoft New Zealand have now released it in a form that can be installed on Windows XP Professional and (I assume) Windows XP Home Edition. It's the best dressed you've seen Windows XP ... [via Tim Sneath]

 

#    Comments [2] |
# Thursday, July 07, 2005

MeadCo ScriptX and Turnabout

Turnabout is a GreaseMonkey for IE. Some previous versions have had a conflict with MeadCo's ScriptX, the de facto printing control for IE. Having worked with the guys at Reify to identify the issues, I'm glad to say that the latest build of Turnabout (.03 b15) works with ScriptX.
#    Comments [0] |

More disappointment with .NET

.NET Framework architects continues to disappoint Don Park. Some of this stuff is a big problem and one wonders whether we are supposed to ignore WinForms and wait for XAML.

#    Comments [0] |