Development

HowToPrintWithLatex (diff)

You must first sign up to be able to contribute.

Changes from Version 1 of HowToPrintWithLatex

Show
Ignore:
Author:
skr68 (IP: 212.80.234.11)
Timestamp:
08/11/06 15:21:02 (11 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowToPrintWithLatex

    v0 v1  
     1This Latex PDF View class provides an easy way to generate PDF files from symfony templates. 
     2 
     3 
     4== Installing == 
     5 
     6 
     7Until Ticket #388 is resolved, you have to copy it into sfConfig::get('sf_symfony_lib_dir').'/view/ 
     8 
     9 
     10 
     11== Example == 
     12 
     13apps/xxx/modules/pdf/config/module.yml: 
     14{{{ 
     15all: 
     16  view_class: sfPDF 
     17}}} 
     18 
     19this template writes out a nicely formatted letter: 
     20 
     21{{{ 
     22<?php use_helper('Latex') ?> 
     23\documentclass[fontsize=11pt]{scrlttr2} 
     24\renewcommand*{\raggedsignature}{\raggedright} 
     25 
     26\KOMAoptions{paper=a4,foldmarks=false, parskip=half} 
     27\setkomavar{signature}{<?= $sf_user->getSig() ?>} 
     28 
     29\setkomavar{date}[]{<?= format_date($today->getTime()) ?>} 
     30\begin{document} 
     31\sloppy 
     32\sffamily 
     33 
     34\begin{letter} 
     35<?= include_partial('adress', array('adress' => $adress1)) ?> 
     36\opening{\textbf{Invoice}} 
     37 
     38\closing{Mit freundlichen Grüßen} 
     39\end{letter} 
     40 
     41%%\newpage 
     42\end{document} 
     43}}} 
     44 
     45== Improvements (TODO) == 
     46 
     47include in symfony or make a plugin 
     48use another suffix (.tex), but this breaks partials