I'm designing a training program and on the final page the user prints a certificate of completion. Last year I accomplished this by having a html file open, having the users fil in their name, and then printing the document. The problem was that users could access the file in the directory in the CD and print out the file without completing the course. I'm trying to thwart this process and am in search of ideas. It sounds like auto play can't simply print the page the user is on.... so that's where I am at!
Looking for ideas on certificate
Collapse
X
-
Here’s a few ideas you might try:
1. Hide your certificate.html document by giving it a different extension i.e. call it something like 936.dat You’ll still be able to open it as a web object I you want.
2. Don’t distribute your program with the certificate.html file, instead write it out dynamically only after the person has completed the course.
3. Use a combination of ideas 1 & 2
4. Use Worms Screen Capture DLL to capture your AMS screen and print it out
Get his DLL and a sample APZ here:
-
-
Disco,
I am working on the same thing with a Training Tracking program that I am building that keeps track of who has been trained on what and where. I have it so that when The course is completed, I can build a html file for them dynamically as their certificate. I will extract the code and post it here. It might be tomorrow however.
In short it takes the users name and with one function it builds the certificate for them. If the course is distributed on CD and you are using images, those images might need to be copied to the directory to which you write your template.
tiggTJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
-
-
As promised
The function is a little long but it gets the job done. I ended up redoing the function since the function within my project is closely tied to other functions.
I hope you find it useful.
TiggTJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
-
-
Mark,
I really don't know html either. I leveraged the certificate template from another internal source from my company. I used the double brackets to preserve the format of the code. just copied and pasted it from notepad, added the variables I needed in the middle and wrote it to a file.
Yes you can easily open the file in AMS. Just use the Web.Load action
Web.LoadURL("Web1", _TempFolder.."\\"..sName..".htm");
and once it is loaded use
Web.Print("Web1", true);
Hope that helps
TiggTJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
-
-
Try this one.TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
-
-
Let me search for it, but I remember there being a function that someone created to turnoff the page number, title and url from being printed with certificate.
If anyone has it, please post it.
Tigg
EDIT
Here is the key in the registry. HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup
You could blank the header and footer then print then reset them.
Last edited by TJ_Tigger; 12-17-2004, 12:12 PM.TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
-
-
And here is the registry entry for setting page size and landscape.
Printer Settings
Settings in the HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet Settings key define printing preferences.
The following table shows the named values.
Value : type Description
PageOrientation : REG_DWORD Specifies page orientation. Valid settings are 1=portrait, 2=landscape. Default setting is 1.
PrintQuality : REG_DWORD Specifies print quality. Valid settings are 1=draft, 2=final. Default setting is 1.
PaperSize : REG_DWORD Specifies paper size. Valid settings are 1=letter, 5=Legal, 9=A4, 13=B5.Default setting is 1.TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
-
-
I can get it to print without the headers but I am having difficulty getting it to print landscape. I will continue to work on it and post it when I am finished.TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
-
-
Here is the latest that will output without header and footer. Thanks to KP who posted a function on this originally.
Still can't get the landscape to work programatically. Might have to change the Web.Print value to false so the user can set their page to landscape. I will keep digging on the landscape but no luck so far.
TiggAttached FilesTJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
-
-
I can make it print nice and big with razor sharp vectors, and it even brings up the user preferences so they can choose landscape. But I can't figure out how to get it to override margins. Try the attached, choose landscape when prompted to print, and let me know what happened... :yes Main thing I'm trying to see is what size, sharpness, and alignment gets output, i.e. was it centered on the page? Etc...Attached Files
Comment
-
-
As a side note, margins are found in this registry key
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup
so if you wanted to set the margins smaller you could add that to the function. Here is a link to KPsmith's post on how to do the same.
And lastly, if you have a background graphic that you would like to print, there is a print background option in
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
called Print_Background
You can change this to yes to have it print the background.
There are a couple of CSS tags that are supposed to allow you to define a page as landscape but they are not supported by IE at this time. Firefox and Opera appear to support them however. The first better than the latter.
HTHTJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Comment
-
Comment