TIC\DpdfBundle\Service\WkhtmlService
Service de génération de PDF avec wkhtml(topdf|toimage) (à partir d'un contenu HMTL ou d'une vue Twig).
Synopsis
class WkhtmlService
extends PDFService
{
- // Inherited constants from PDFService
- const MIME_TYPES = ;
- // members
- protected $cmd_bin;
- protected array $cmd_opt = ;
- protected $cmd_src;
- protected $cmd_out;
- protected integer $timeout = 60;
- // Inherited members from PDFService
- protected $twig;
- protected $encore;
- protected array $temp_files;
- protected boolean $debug;
- protected array $confs;
- protected array $paths;
- // methods
- public WkhtmlService initEngine()
- public WkhtmlService loadHtmlFile()
- public WkhtmlService loadHtmlData()
- public string renderData()
- protected array executeCommand()
- protected void checkCommandOutput()
- protected ?array getFileType()
- // Inherited methods from PDFService
- public void __construct()
- public void __destruct()
- protected void purgeTempFiles()
- protected string createTempFile()
- public abstract PDFService initEngine()
- public abstract PDFService loadHtmlFile()
- public abstract PDFService loadHtmlData()
- public PDFService loadTwigView()
- public abstract string renderData()
- public string renderFile()
- public Response renderResponse()
- public StreamedResponse renderStream()
- public string view2data()
- public string view2file()
- public StreamedResponse view2http()
- protected void fixTwigView()
- protected void fixHtmlFile()
- protected void fixFilepath()
- protected void fixFilename()
- protected void getHttpHeaders()
- protected void getFileType()
Hierarchy
Extends
Tasks
| Line | Task |
|---|---|
| 148 |
Constants
| Name | Value |
|---|---|
| MIME_TYPES |
Members
protected
- $cmd_bin
- $cmd_opt
- $cmd_out
- $cmd_src
-
$confs
Valeurs par défaut (options & chemins) pour les générations Twig|HTML vers PDF|PNG - $debug
- $encore
- $paths
- $temp_files
- $timeout
- $twig
Methods
protected
- checkCommandOutput() — Vérification du résultat de la commande de génération wkhtmlto(pdf|image).
- executeCommand() — Exécution de la commande de génération wkhtmlto(pdf|image).
- getFileType()
public
- initEngine() — Initialisation de l'objet Dompdf avec ses options.
- loadHtmlData() — Initialisation de l'objet Dompdf à partir d'un contenu HTML.
- loadHtmlFile() — Initialisation de l'objet Dompdf à partir d'un fichier HTML.
- renderData() — Returns the PDF data as a string.
Inherited from TIC\DpdfBundle\Base\PDFService
protected
- createTempFile() — Création d'un fichier temporaire avec le contenu donné.
- fixFilename()
- fixFilepath()
- fixHtmlFile()
- fixTwigView()
- getFileType()
- getHttpHeaders()
- purgeTempFiles() — Suppression des fichiers temporaires (sauf en mode debug).
public
- initEngine() — Initialisation du moteur html2pdf avec ses options.
- loadHtmlData() — Initialisation du moteur html2pdf à partir d'un contenu HTML.
- loadHtmlFile() — Initialisation du moteur html2pdf à partir d'un fichier HTML.
- loadTwigView() — Initialisation du moteur html2pdf à partir d'une vue Twig à générer.
- renderData() — Returns the PDF data as a string.
- renderFile() — Returns the PDF in a local file.
- renderResponse() — Returns the PDF in a symfony Response object (clean integration).
- renderStream() — Returns the PDF in a symfony StreamedResponse object (less memory usage).
- view2data() — Initialisation à partir d'une vue Twig pour générer un PDF retourné dans une variable.
- view2file() — Initialisation à partir d'une vue Twig pour générer un PDF retourné dans un fichier local.
- view2http() — Initialisation à partir d'une vue Twig pour générer un PDF retourné dans une StreamedResponse.