Results 1 to 2 of 2

Thread: Print alternate: jpg from file instead of webpage

  1. #1
    Join Date
    Feb 2006
    Posts
    236
    Thanks
    8
    Thanked 3 Times in 3 Posts

    Default Print alternate: jpg from file instead of webpage

    If possible, I would like to be able to click on a link to print a image file instead of the webpage. (BTW, I'm using a image gallery that requires MooTools, and the ddsmoothmenu menu that uses jQuery, so using more js is......)

    Reason: I need to add text (contained in the image) and center a larger, higher quality image. I can set the printer output using the reference on the dd page: http://www.dynamicdrive.com/dynamici...printstyle.htm, but I have numerous, changeable images from the gallery viewer that I'm using, so I have to change this dynamically as the a link changes during slide show or as clicked:
    Code:
    <link rel=alternate media=print href="printversion.doc">
    And, of course, the jpg file cannot be printed without imbedding it in a html file. I certainly do not want to create each one of those html files, but I will if I have to - would be great to have a generic - but I don't see how at this moment.

    What is the best way to do this?...or must I be happy with popping the image in a new window and let the user print that?

    Has anyone else done this? Suggestions, Please?.......

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If you have PHP, you could use just one page. Feed it the URL of the jpg image to display.

    You could have javascript on that page to print it when the image is loaded.

    Or, without PHP, you could have a section on your page, invisible and placed outside the page area via positioning. Your print stylesheet could make all but that section display none and bring it into the page area and reveal it. Have an image tag there, load the image into it and print the page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •