Print Photos Print Photos
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Print Photos

Started by rocks, May 27, 2008, 01:40:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rocks

Hi!

Is there a option for printing photos in coppermine?

rocks

To be more precise,is there a ready option to print photo, instead of saving/downloading it first & then printing?

rocks


Hein Traag

This is a volunteer support forum.. so don't expect hotline support. Give it a few more days before bumping.

The thread that comes closest to your request is this one:
http://forum.coppermine-gallery.net/index.php/topic,30658.0.html

In other words, if you need it code it.

Hein

steveeh131047

Rocks,

The thread that Hein is referring to suggests you use a "print stylesheet" approach to the problem. This is really quite easy. For example if you wanted to print Intermediate images ....

... firstly, in your template.html file, modify the link to the stylesheet so that it references two separate stylesheets - one for Screen and one for Print
<link rel="stylesheet" href="themes/yourtheme/style.css" media="screen" type="text/css" />
<link rel="stylesheet" href="themes/yourtheme/print.css" media="print" type="text/css" />


Then create the extra print stylesheet called print.css and put in it something as simple as:
body * {font-size: 0px;}
img {display: none;}
.display_media img { display: block;}


The first line will make all the text disappear; the second line will make all the images disappear; and the third line restores the Intermediate image because it has higher CSS specificity. This works in this example providing the Intermediate image inherits the class "display_media". Depending on which theme you are using, you may need to copy the "HTML template for intermediate image display" from sample/theme.php across to yourtheme/theme.php so you can make sure the image inherits a unique CSS selector.

Hope that makes it a bit clearer. The best thing to do is to create the print.css file and play around with it while looking at "print preview" in your Browser. Finally be sure to check it in several Browsers to make sure they're interpreting the CSS the same way.

Steve


steveeh131047

Or an even simpler print.css which tests OK in Firefox and IE7:

body  {visibility: hidden}
.display_media img {visibility: visible}