Printing an Image

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • TJ_Tigger
    Indigo Rose Customer
    • Sep 2002
    • 3159

    Printing an Image

    I have a project I am working on that includes pictures contained in a web page from my customers events. They want to have the ability to print the pictures if the person so chooses. I don't want to print the web page, just the picture from the page. I am able to parse the name of the image from the page they are viewing but I can't get it to print the image itself. The images are .JPG.

    I have tried File.Open with the verb set to print and all it did was open the image in a viewer. I also had it set to minimized and it opened maximized.

    I then tried to load the image into the web broswer object and print from the web browser object and it will only print the web page, not the image alone.

    Any suggestions on what to try next?

    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
  • Corey
    Indigo Rose Staff Alumni
    • Aug 2002
    • 9745

    #2
    Re: Printing an Image

    Flash can do that easily. It can even do it dynamically, i.e. you don't need to make a 100% flash project. A simple Flash object can load .jpgs at runtime and it can print them. Let me know if you're lost on building the Flash thing and I'll whip something up for you.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment

    • TJ_Tigger
      Indigo Rose Customer
      • Sep 2002
      • 3159

      #3
      Re: Printing an Image

      That would be good since I am not a flash person.

      Thanks for the help.

      I guess I am just curious why a .jpg wont print using the file.open action with the print verb. Also why, when you load a .jpg into a web browser will it not print the .jpg.
      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

        #4
        Re: Printing an Image

        Maybe it does, Im not sure. How about this. Let's give this thread a day to collect answers, there might be a better solution. And if nothing appears by tomorrow I'll build you a little insertable utility to do what you need.

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment

        • TJ_Tigger
          Indigo Rose Customer
          • Sep 2002
          • 3159

          #5
          Re: Printing an Image

          Thanks Corey,

          No rush at all. It will be a couple weeks before the next CDs need to go out. I just way playing around at the request of the customer.
          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

            #6
            Re: Printing an Image

            OK just PM me when we're a week from deadline if you haven't picked up anything else. As to the issue itself, I'm no authority on printing but I bet there's a way somehow using a javascript pop-up window too, i.e. set it up so that a browser object containing your image opens in kiosk mode at proper size, then print it...

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment

            • Colin
              President
              • Jan 2000
              • 135

              #7
              Re: Printing an Image

              The "print" verb is handled at the discretion of the application you are sending it to. There's no doubt that some people will have an image viewer than responds to the "print" verb, while others will ignore it completely. It's a quick solution if you can control what software is on the user's system, otherwise the results are a bit "undefined".

              Comment

              • Corey
                Indigo Rose Staff Alumni
                • Aug 2002
                • 9745

                #8
                Re: Printing an Image

                BTW Tigger take a look at this:



                That's a javascript which prints an image when it get's clicked on. Not sure if it works the way you want but it's one more simple option...

                Corey Milner
                Creative Director, Indigo Rose Software

                Comment

                • TJ_Tigger
                  Indigo Rose Customer
                  • Sep 2002
                  • 3159

                  #9
                  Re: Printing an Image

                  I was wondering if that was it Colin. I will change my default viewer, which is currently set to Image Viewer Expert, it was the default load on this machine.
                  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

                    #10
                    Re: Printing an Image

                    Could it be done with a .bat file? Have the .bat file ready to go and replace the file to be printed by the variable within AMS and then execute it?
                    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

                    • kpsmith
                      Forum Member
                      • Jul 2000
                      • 332

                      #11
                      Re: Printing an Image

                      Not sure if you could do this but...

                      You could investigate printing image.jpg with explorer through a File execute with a command line switches pointing to the jpg and issueing a print command?

                      Comment

                      • Worm
                        Indigo Rose Customer
                        • Jul 2002
                        • 3971

                        #12
                        Re: Printing an Image

                        Tig,

                        Try this:

                        Put another Web Browser Object on your page and set it to 1x1 pixels.

                        Create a HTML file with the following content:
                        <html>
                        <body OnLoad=window.print()>
                        <img src="http://www.yourclient.com/image.jpg">
                        </body>
                        </html>


                        From there simply do a Navigate To on the 1x1 Web Browser to the HTML file you created. You should get a Print Dialog to select the printer, and then print the image.

                        You're going to have to copy the HTML file to the %TEMP% directory so you can manipulate the image line to display the correct image, but that shouldn't be a biggie.

                        Anyhow, it worked here for me.

                        Comment

                        • Corey
                          Indigo Rose Staff Alumni
                          • Aug 2002
                          • 9745

                          #13
                          Re: Printing an Image

                          Sure or you could just point your browser to your image and then pass the same command to the browser object in the URL bar using the URL

                          javascript:window.print()

                          Saves you from having to create/manage any .HTML files. [img]/ubbthreads/images/icons/smile.gif[/img]

                          Corey Milner
                          Creative Director, Indigo Rose Software

                          Comment

                          • Worm
                            Indigo Rose Customer
                            • Jul 2002
                            • 3971

                            #14
                            Re: Printing an Image

                            Uh, yup! that'd be a whole lot easier.

                            Now, why didn't I think of that!? [img]/ubbthreads/images/icons/crazy.gif[/img]

                            Comment

                            • TJ_Tigger
                              Indigo Rose Customer
                              • Sep 2002
                              • 3159

                              #15
                              Re: Printing an Image

                              Corey and Worm,

                              If I am understanding correctly, I load the image into the browser and then tell the browser to load the url

                              javascript:window.print()

                              Is that all I have to do.
                              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