JohnJuhl VIP
Total posts: 46
07 Nov 2014 16:19

Two things: can I edit the print template somehow? Second: how do I get uploaded pidtre to show on the print? I wanna use the Cobalt tool for QC purposes in the construction industry, and the users will need to download their QC forms as pdf - to send them to their customers.

Can You help me out on this one - then you´ll make my day :-) Skærmbillede 2014-11-07 kl. 17.16.27

And by the way - how can I control the font size? it seems to be a little bit different sizes from one print to the next...

Kr. John

Last Modified: 08 Nov 2014


JohnJuhl VIP
Total posts: 46
07 Nov 2014 16:20

it should have said "Picures"


JohnJuhl VIP
Total posts: 46
07 Nov 2014 16:21

PICTURES for someones sake ;-/


Jeff VIP
Total posts: 745
08 Nov 2014 00:11

JohnJuhl Two things: can I edit the print template somehow?

Yes you can.

Actually, there is no seperate print template in Cobalt. The way your page is printed is primarily defined by your browser and secondarily by the css of your website template.

In many cases your website template has a seperate print.css or the print styling has been done inside your main template.css by using @media print

@media print
{
.noprint {display:none;}
}

Please read this for more info: * https://www.arclab.com/en/webformbuilder/how-to-print-a-specific-part-of-a-html-page-css-media-screen-print.html * http://www.smashingmagazine.com/2011/11/24/how-to-set-up-a-print-style-sheet/

So, by carefully preparing your Cobalt templates you not only can decide what not to print (redundant layout elements like banners, forms, buttons, etc), but you can also restyle them for optimum printing results.

JohnJuhl Second: how do I get uploaded pidtre to show on the print?

The reason your images are not being printed is that they are probably background images. If these are gallery images, they most likely are, unfortunately. Background images and colors are not printed by default by your browser, for ink saving reasons.

Read this: http://its.yale.edu/how-to/printing-web-page-background-colors-and-images

You might be able to print background images by using a css trick to display them inline.

http://stackoverflow.com/questions/11242991/how-to-forcefully-print-background-image-in-html

I haven't tested this, so you might give us feedback if this works for you.


Jeff VIP
Total posts: 745
08 Nov 2014 00:28

If you want to keep the thumbnail picture of /images/Frontbanner01.jpg but want to print it bigger (full width), you could duplicate the image in your record template and wrap them respectively inside <div class="no-print"> and <div class="print">.

At the end of your stylesheet:

@media print { 
  .no-print {
      display: none;
  }
  .print {
      display: inherit;
  }
}

@media screen {
  .no-print {
      display: inherit;
  }
  .print {
      display: none;
  }
}

pepperstreet VIP
Total posts: 3,837
08 Nov 2014 00:43

JohnJuhl Two things: can I edit the print template somehow?

The Joomla popup windows and the print layout is controlled by a file called component.php. It is found in your main templates folder. In general, this file is pretty basic and does not include any specific print styles, nor a print.css.

I have noticed you are using a Joomplates template which is powered by Yootheme's WARP framework. They just include bootstrap, nothing else. You might have a look at the standard BEEZ template folder for a component.php example...

Here is an older related J25 article.

Actually, you can add and modify anything you want. I would make sure, that you use the print.css ONLY for media print, or even add a PHP check for the URL parameter "print=1". Otherwise you might change other views, where component.php is used.

Second: how do I get uploaded pidtre to show on the print? I wanna use the Cobalt tool for QC purposes in the construction industry, and the users will need to download their QC forms as pdf - to send them to their customers.

Do you use the Uploads field? By default it just lists your files. You might create a custom field output template, which adds the needed HTML markup i.e. img tags. If you have other file types, you have to react accordingly.

Are your files always images? You might have a look at the Gallery field. It is specific for multiple image uploads.

Powered by Cobalt