Way to print one image from a page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lace
    Too lazy to set a custom title
    • Mar 2004
    • 16116

    #1

    Way to print one image from a page?

    Trying to find out a way to print a selected image from a page.

    It's a coupon page, with 14 coupons at the moment. I need to find a way to set it up where when you click on an image, it sends just that image to a printer.

    Or better yet, have check boxes to select which to print, then have a print button below.


    Anyone know of any easy options off hand?

    Thanks
    Your Paysite Partner
    Strength In Numbers!
    StickyDollars | RadicalCash | KennysPennies | HomegrownCash
  • potter
    Confirmed User
    • Dec 2004
    • 6559

    #2
    You could use jquery to on-click of an image, (hide) all images except the one clicked on, and then fire the print function. That way the page should only print the image desired.

    Something like
    Code:
    $('div.container img').click(function() {
        $('div.container img').hide();
        $(this).show();
        window.print();
    });

    Comment

    • Lace
      Too lazy to set a custom title
      • Mar 2004
      • 16116

      #3
      Originally posted by potter
      You could use jquery to on-click of an image, (hide) all images except the one clicked on, and then fire the print function. That way the page should only print the image desired.

      Something like
      Code:
      $('div.container img').click(function() {
          $('div.container img').hide();
          $(this).show();
          window.print();
      });
      Hmm...okay. I'll give this a shot first.

      Thanks, potter!
      Your Paysite Partner
      Strength In Numbers!
      StickyDollars | RadicalCash | KennysPennies | HomegrownCash

      Comment

      • livexxx
        Confirmed User
        • May 2005
        • 1201

        #4
        You can do it very easily to print just single elements with jQuery Print Area plugin

        http://www.ssdtutorials.com/tutorial...ery-print.html

        Code:
        	$('.print').click(function() {
        		var container = $(this).attr('rel');
        		$('#' + container).printArea();
        		return false;
        	});
        The demo on that page has a print button to print named elements on a page. You can create a new CSS element and wrap that around single images as well so that you can click an image and get it to print.

        example below :
        http://www.gotporn.com/print/
        Last edited by livexxx; 08-30-2012, 07:42 AM.
        http://www.webcamalerts.com for auto tweets for web cam operators

        Comment

        • Lace
          Too lazy to set a custom title
          • Mar 2004
          • 16116

          #5
          Originally posted by livexxx
          You can do it very easily to print just single elements with jQuery Print Area plugin

          http://www.ssdtutorials.com/tutorial...ery-print.html

          Code:
          	$('.print').click(function() {
          		var container = $(this).attr('rel');
          		$('#' + container).printArea();
          		return false;
          	});
          The demo on that page has a print button to print named elements on a page. You can create a new CSS element and wrap that around single images as well so that you can click an image and get it to print.

          example below :
          http://www.gotporn.com/print/
          Tried this, and it works fine until I put it into my template. I don't get it. Everything is set - the scripts, the div id's, etc.
          Your Paysite Partner
          Strength In Numbers!
          StickyDollars | RadicalCash | KennysPennies | HomegrownCash

          Comment

          • marlboroack
            So Fucking Banned
            • Jul 2010
            • 9327

            #6
            Print screen it then paste it in paint then Ctrl- P

            Comment

            • fris
              I have to go potty
              • Aug 2002
              • 55730

              #7
              also take a look at jqprint, i use it for a cms that allows you to only print the source code.
              Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

              My Latest Theme

              Comment

              Working...