Print Templates

For general issues related to PWB v2.

Moderators: Tyler, Scott, PWB v2 Moderator

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Print Templates

Post by GregP »

Hi Scott,

Does PWB already use a Print Template? I ask because I'm interested in introducing custom Print Templates for our PCs.

I'm not sure on a technical level whether this requires implementation within PWB, or if I can do it from outside and interrupt the relevant messages.

Of course if PWB already uses its own (to force the print preview), then it would be great if we could just specify an alternate htm file to use.

I'm referring specifically to this issue :
http://msdn.microsoft.com/library/defau ... review.asp

Thanks,
Greg

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

You should be able to use Print Templates with PWB without problems. PWB was built using Microsoft standards with the Internet Explorer WebBrowser Control and thus gains nearly all the IE functionality.

I only say should becuase I have not actually tested Pirnt Templates with PWB, but I am 99% sure they will work.

From the article:
"First, let's assume you've got a print template you want to use. How do you get Internet Explorer or the WebBrowser control to recognize your template and use it in place of the default print template provided with Internet Explorer?"

You will need to implement the Print Template just as if you were using IE. PWB should then gain the functionality.

--Scott

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

After looking further into the article, if PWB does not use the Print Template when implemented for IE, it looks like it should not be a problem to add the functionality directly into PWB.

If you do not mind doing a little testing, I can add the functionality and post a link to the new EXE.

There would problably be quite a bit of interest in this.

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

I'm more than happy to do testing. I was envisaging the simplest way would be to have PWB refer to a particular print template which we can swap in and out. eg. 'DefaultPrint.htm'.

Sound reasonable?

Thanks,
Greg

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

Do you have a print template ready to test. I will add the ability to supply one tomorrow and post a link to it.

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

I've already got the htm file. Its one of the downloadable examples from the second article. They are a good point from which I would adapt what we want anyway.

Thanks,
Greg

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

Here is PWB v2.07 beta.

http://www.teamsoftwaresolutions.com/beta/PWBv207.zip

The following keys have been added to the INI file.

[Browser] ShellExecuteScripts=False
Allows scripts to run applications directly.
[Printer] PrintTemplateFile=
Enables use of Print Templates
[Java] EnableExternalJava=True
Disables or enables Dynamic External Java Commands

Please let me know if the Print Templates work as expected.

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

Cool! I'll try them out today. Thanks Scott!

Greg

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

Hi Scott,

It appears to work fine with the example I've tried. I'll start setting it up our custom template.

Thanks a million.

Greg

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

I have posted to our web site a few Print Template samples from Microsoft. These represent a good beginning to a secure Print Template Print Preview.

http://www.teamsoftwaresolutions.com/do ... plate1.htm
http://www.teamsoftwaresolutions.com/do ... plate2.htm

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

Fair warning that those print templates are pretty basic. I found that I had to rework various parts of the examples. If anyone's interested I can provide a copy of our template and extra programs when completed.

I'd also love to see anything that other Library's are using.

Ta,
Greg

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

That would be great Greg. I am sure other libraries would benefit from them. If you want to send them to me I can post them on our site.

Here are some more examples from another library.

http://www.teamsoftwaresolutions.com/do ... ntpv1.html
http://www.teamsoftwaresolutions.com/do ... ntpv2.html
http://www.teamsoftwaresolutions.com/do ... ntpv3.html

--Scott

GregP
Benefactor
Benefactor
Posts: 90
Joined: Thu Mar 13, 2003 12:34 am
Location: QLD Australia

Post by GregP »

Hi Scott,

There have been many delays on our end, but I've finally gotten around to finishing off the print templates and rolled them out. I designed them to completely hide the Page Setup and Print dialogs.

Can I email you a zip file to put with the others?

GregP

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

Please feel free to email them to me so I can post them. I am sure everyone would love to have them available.

--Scott

Scott
Site Admin
Site Admin
Posts: 2528
Joined: Mon Dec 16, 2002 12:31 pm
Location: Rochester, MN
Contact:

Post by Scott »

Here is GregP's very impressive print template. Even allows charging for printing.

http://www.teamsoftwaresolutions.com/so ... intPWB.zip

To use unzip to a folder and set the following in you INI file.

[Printer]
...
PrintTemplateFile=C:\path to folder\PrintTemplate.htm
...

Very nice work, thanks GregP!

--Scott

Post Reply