Looking for ideas on certificate

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • discotheque
    Indigo Rose Customer
    • Oct 2004
    • 5

    Looking for ideas on certificate

    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!
  • JimS
    Indigo Rose Customer
    • May 2003
    • 1057

    #2
    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:

    Comment

    • TJ_Tigger
      Indigo Rose Customer
      • Sep 2002
      • 3159

      #3
      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.

      tigg
      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

      • TJ_Tigger
        Indigo Rose Customer
        • Sep 2002
        • 3159

        #4
        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.

        Tigg
        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

        • markstaylor
          Indigo Rose Customer
          • Oct 2003
          • 296

          #5
          TJ_Tigger,

          That's just what I could use. I don't know html at all, but I think I can follow your code.

          Can the Cert be printed from the App? And can it be viewed as a Web object instead of in IE.

          Thanks for the great info once again

          Mark
          SELECT * FROM Users WHERE IQ > 0;
          o rows Returned

          Comment

          • TJ_Tigger
            Indigo Rose Customer
            • Sep 2002
            • 3159

            #6
            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

            Tigg
            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

            • TJ_Tigger
              Indigo Rose Customer
              • Sep 2002
              • 3159

              #7
              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

              • TJ_Tigger
                Indigo Rose Customer
                • Sep 2002
                • 3159

                #8
                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.

                Microsoft support is here to help you with Microsoft products. Find how-to articles, videos, and training for Microsoft Copilot, Microsoft 365, Windows, Surface, and more.
                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

                • markstaylor
                  Indigo Rose Customer
                  • Oct 2003
                  • 296

                  #9
                  That was easy!

                  I made a project for my sons cub scouts, and this will work great for that.

                  Would it be hard to make it full page landscape? without the IE file info and header that is on the print out.

                  Either way, This is great.
                  Thanks
                  Mark
                  SELECT * FROM Users WHERE IQ > 0;
                  o rows Returned

                  Comment

                  • TJ_Tigger
                    Indigo Rose Customer
                    • Sep 2002
                    • 3159

                    #10
                    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

                    • Intrigued
                      Indigo Rose Customer
                      • Dec 2003
                      • 6138

                      #11
                      Thanks from me too TJ_TIGGER!

                      This project is definitely going up on amsuser.com!

                      Very Sincerely,
                      Intrigued

                      Comment

                      • TJ_Tigger
                        Indigo Rose Customer
                        • Sep 2002
                        • 3159

                        #12
                        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

                        • TJ_Tigger
                          Indigo Rose Customer
                          • Sep 2002
                          • 3159

                          #13
                          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.

                          Tigg
                          Attached Files
                          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

                          • Corey
                            Indigo Rose Staff Alumni
                            • Aug 2002
                            • 9745

                            #14
                            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

                            • TJ_Tigger
                              Indigo Rose Customer
                              • Sep 2002
                              • 3159

                              #15
                              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.

                              HTH
                              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

                              Working...
                              X