Provide a method to generate PDF CSS

This commit is contained in:
Thomas Gelf 2014-03-06 09:21:32 +00:00
parent c5ad14e781
commit e930df4c54
1 changed files with 12 additions and 0 deletions

View File

@ -22,6 +22,18 @@ class StyleSheet
'css/icinga/login.less',
);
public static function compileForPdf()
{
$less = new LessCompiler();
$basedir = Icinga::app()->getBootstrapDirecory();
foreach (self::$lessFiles as $file) {
$less->addFile($basedir . '/' . $file);
}
$less->addLoadedModules();
$less->addFile($basedir . '/css/pdf/pdfprint.less');
return $less->compile();
}
public static function send()
{
header('Content-Type: text/css');