A Laravel package for creating PDF files using LaTeX

Related tags

PDF laratex
Overview

Contributors Forks Stargazers Issues MIT License


Laratex

LaraTeX

A laravel package to generate PDFs using LaTeX

· Report Bug · Request Feature

For better visualization you can find a small Demo and the HTML to LaTeX converter here.

Table of Contents
  1. Note
  2. Getting Started
  3. Usage
  4. Convert HTML to LaTeX BETA
  5. Garbage Collection
  6. Error Handling
  7. Contribution
  8. Credits
  9. Changelog
  10. License

NOTE

This package was tested in two different environments while using the package for those two special processes. If you experience any issues in all the time you are using it please open an issue so I can make this package better with every update :)

Getting Started

Important information about your environment

This package was developed and tested on Unix (FreeBSD) servers and has been tested successfully on a Windows machine both running pdflatex. Always make sure to write your paths correctly :)

This package makes use of the storage_path() function. On Windows it is possible that the absolute path will be written out with backslashes. Windows is really good with paths using both forward & backslashes but just keep this in mind if something doesn't work that well on windows.

Prerequisites

You need to have texlive-full installed on your server. This program has tex packages and language libraries which help you generate documents. Note : You can also choose to install textlive which is the lighter version of the package.

The difference is:

  • When you install textlive and want to use any additional tex package, you need to install it manually.
  • texlive-full comes with these extra packages. As a result it may take up some additional space on your server (to store the package library files).

If you are choosing a hosting provider that doesn't allow you to install applications yourself please make sure that pdflatex is installed or ask if it can get installed. Also make sure that you have SSH access to the server as you might need it to find out in which path your pdflatex installation is sitting.

Installation

You can install the package with composer:

composer require ismaelw/laratex

Configuration

To load the config file with php artisan run the following command:

php artisan vendor:publish --tag=config

After this please make sure to configure your LaraTeX installation. In your LaraTeX Config file \config\laratex.php you can configure two settings:

binPath If your system doesn't allow to just run the command line command "pdflatex" you may specify the correct one. On Unix systems you can find out which bin path to use by running the command which pdflatex

If you are running this package with on a windows system please check this in cmd.exe before. There you should find out if running the command pdflatex works in cmd or if you need to provide the absolute path to your pdflatex application.

tempPath This specifies the folder where temporary files are saved while rendering a tex file into a PDF file. It is important that you always start your path without a slash and end your path with a slash (e.g. app/pdf/)

Usage

Dry Run

Before diving into the usage directly, it is important that you make sure that the required programs are installed properly on your server. The package comes with a dryrun method. It will automatically generate a file called dryrun.pdf if everything is set up properly on the server. If not please double-check the configuration of the binPath above.

<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Ismaelw\LaraTeX\LaraTeX;

class TestController extends Controller
{
    /**
     * Download PDF generated from latex
     *
     * @return Illuminate\Http\Response
     */
    public function download(){
        return (new LaraTeX)->dryRun();
    }
}

Dryrun will download a beautifully clean test pdf if pdflatex is setup properly.

dryrun.pdf sample

With this package you have multiple options. You can render a PDF file and download it directly, save it somewhere, just get the tex content or bulk download a ZIP file containing multiple generated PDF files.

Preparing a Laravel View with LaTeX Content

Create a view file inside resources/views/latex/tex.blade.php You are of course free to create your view files wherever you want inside of your resources folder. Just make sure to define the view to use correctly later.

\documentclass[a4paper,9pt,landscape]{article}
\usepackage{adjustbox}
\usepackage[english]{babel}
\usepackage[scaled=.92]{helvet}
\usepackage{fancyhdr}
\usepackage[svgnames,table]{xcolor}
\usepackage[a4paper,inner=1.5cm,outer=1.5cm,top=1cm,bottom=1cm,bindingoffset=0cm]{geometry}
\usepackage{blindtext}
\geometry{textwidth=\paperwidth, textheight=\paperheight, noheadfoot, nomarginpar}

\renewcommand{\familydefault}{\sfdefault}

\pagestyle{fancy}
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot{}
\fancyfoot[LE,RO]{\thepage}

\fancyfoot[C]{\fontsize{8pt}{8pt}\selectfont The above document is auto-generated.}
\renewcommand{\footrulewidth}{0.2pt}

\begin{document}

    \section*{\centering{LaraTeX Demo Document}}
    
    \begin{center}
        \item[Name :] {{ $Name }}
        \item[Date of Birth :] {{ $Dob }}
    \end{center}
    
    \blindtext
    
    \begin{table}[ht]
        \centering
        \renewcommand{\arraystretch}{2}
        \begin{tabular}{|c|l|} 
             \hline
             \rowcolor[HTML]{E3E3E3}
             \textbf{ID} & \textbf{Language} \\
             \hline\renewcommand{\arraystretch}{1.5}
             
             @foreach($languages as $key => $language)
                {{ $key }} & {{ $language }} \\ \hline
             @endforeach
             
        \end{tabular}
        \caption{Language Summary}
    \end{table}
    
    \begin{center}
        {!! $SpecialCharacters !!}
    \end{center}

\end{document}

You can see how we have easily used blade directives for {{ $name }} to show a name or @foreach to show languages in a table to dynamically generate the content.

For more complex LaTeX files where you may need to use blade directives like {{ $var }} inside of a LaTeX command which already uses curly brackets (e.g. \textbf{}) you can always use Laravels @php @endphp method or plain PHP like <?php echo $var; ?> or <?= $var ?> (Example: \textbf{<?= $var ?>}).

Important note when using html characters

When using the {{ }} statement in a blade template, Laravel's blade engine always sends data through the PHP function htmlspecialchars() first. This will convert characters like & to &amp; and < to &lt; to just mention a few. pdflatex doesn't like those converted string and will throw an error like Misplaced alignment tab character &..

To fix this issue you have to use the {!! !!} statement so that unescaped text is written to your tex template.

Using graphics inside of your LaTeX files

Where exactly pdflatex looks for graphics included inside of a .tex file I am not really sure. What helped me the most was to always give the absolute path to a graphic like \includegraphics[scale=0.06]{/absolute/path/to/www/storage/graphics/file.pdf} for example. If you have a better working idea please help me and share your knowledge with me :)

Download a PDF file

download(string $fileName = null)
<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use Ismaelw\LaraTeX\LaraTeX;

class TestController extends Controller
{
    /**
     * Download PDF generated from LaTex
     *
     * @return Illuminate\Http\Response
     */
    public function download(){

        return (new LaraTeX('latex.tex'))->with([
            'Name' => 'John Doe',
            'Dob' => '01/01/1990',
            'SpecialCharacters' => '$ (a < b) $',
            'languages' => [
                'English',
                'Spanish',
                'Italian'
            ]
        ])->download('test.pdf');
    }
}

If you named your blade file differently or you have it in another folder make sure to set the blade file correctly: return (new LaraTeX('folder.file'))

Save a PDF file

To save a PDF File use the savePdf Method.

savePdf(string $location)
(new LaraTeX('latex.tex'))->with([
    'Name' => 'John Doe',
    'Dob' => '01/01/1990',
    'SpecialCharacters' => '$ (a < b) $',
    'languages' => [
        'English',
        'Spanish',
        'Italian'
    ]
])->savePdf(storage_path('app/export/test.pdf'));

Make sure that the destination folder exists inside of your storage folder.

Return the PDF content

To just get the pdf content as RAW or base64 use the content Method.

content(string $type = 'raw')

The default is raw.

(new LaraTeX('latex.tex'))->with([
    'Name' => 'John Doe',
    'Dob' => '01/01/1990',
    'SpecialCharacters' => '$ (a < b) $',
    'languages' => [
        'English',
        'Spanish',
        'Italian'
    ]
])->content();

or with base64:

(new LaraTeX('latex.tex'))->with([
    'Name' => 'John Doe',
    'Dob' => '01/01/1990',
    'SpecialCharacters' => '$ (a < b) $',
    'languages' => [
        'English',
        'Spanish',
        'Italian'
    ]
])->content('base64');

Return the PDF inline

To just get the PDF inline use the inline Method.

inline(string $fileName = null)
(new LaraTeX('latex.tex'))->with([
    'Name' => 'John Doe',
    'Dob' => '01/01/1990',
    'SpecialCharacters' => '$ (a < b) $',
    'languages' => [
        'English',
        'Spanish',
        'Italian'
    ]
])->inline('filename.pdf');

This will return the pdf as an inline document stream shown as filename.pdf.

Return the TeX data

render()
$tex = new LaraTeX('latex.tex'))->with([
    'Name' => 'John Doe',
    'Dob' => '01/01/1990',
    'SpecialCharacters' => '$ (a < b) $',
    'languages' => [
        'English',
        'Spanish',
        'Italian'
    ]
])->render();

Using Raw TeX

If you do not want to use views as tex files, but already have tex content, or are using other libraries to generate tex content, you can use RawTex class instead of passing a view path :

use Ismaelw\LaraTeX\LaraTeX;
use Ismaelw\LaraTeX\RawTex;

...

$tex = new RawTex('your_raw_tex_content_string.....');

return (new LaraTeX($tex))->with([
    'Name' => 'John Doe',
    'Dob' => '01/01/1990',
    'SpecialCharacters' => '$ (a < b) $',
    'languages' => [
        'English',
        'Spanish',
        'Italian'
    ]
])->download('test.pdf');

Bulk download in a ZIP archive

You want to export multiple PDFs inside of a ZIP-Archive? This package has that functionality ready for you. This gives a great flexibility for you. However, make sure you are not passing too many PDFs together, as it is going to consume a good amount of server memory to export those together.

$latexCollection = (new LaratexCollection());
$users = User::limit(10)->get();
foreach ($users as $user) {
    $pdfName = $user->first_name.'-'.$user->last_name.'-'.$user->id.'.pdf';

    // Create LaraTeX instance
    $laratex= (new LaraTeX('latex.report'))->with([
        'user' => $user
    ])->setName($pdfName);

    // Add it to latex collection
    $latexCollection->add($laratex);
}

// Download the zip
return $latexCollection->downloadZip('Users.zip');

// OR you can also save it
$latexCollection->saveZip(storage_path('app/pdf/zips/Users.zip'));

Convert HTML to LaTeX BETA

convertHtmlToLatex(string $Input, array $Override = NULL)

As I already had a case where the data sent to the latex view was in HTML format I decided to add a parser that converts basic HTML strings to LaTeX. Included is a set of HTML Tags and how they should get converted. Note: At the end of the conversion, all HTML Tags that are not in the default conversion set nor in the override conversion set will be removed with strip_tags().

If you need the functionality but need a certain HTML Tag converted differently, you can send an override array to the method. This override array needs to look like this:

    $Override = array(
        array('tag' => 'img', 'extract' => 'src', 'replace' => '\begin{center}\includegraphics[scale=1]{$1}\end{center}'),
        array('tag' => 'body', 'extract' => 'value', 'replace' => '$1 \newline '),
    );

Explanation for the array keys:

Key Value
tag The HTML Tag to look for
extract Which data to extract from the HTML Dom Node (Possible values: value, src - value would be the innerHTML and src would be the src attribute)
replace The string with which the HTML Tag wrapping gets replaced. Note: Always use $1 as the placeholder for the extracted value

The next code snippet shows how the process for the conversion works:

    $HTMLString = '<h1>Heading 1</h1> <p>Text</p> <h2>Heading 2</h2> <p>Text</p> <h3>Heading 3</h3> <p>Text</p> <p>Normal text here with some <strong>strong</strong> and <strong>bold</strong> text.</p> <p>There is also text that could be <u>underlined</u>.</p> <p>Or of course we could have <em>em-wrapped</em> or <em>i-wrapped</em> text</p> <p>A special test could be a <u><em><strong>bold, underlined and italic</strong></em></u> text at the same time!</p> <p>For the mathematicians we also have calculations x<sup>2</sup> and chemical stuff H<sub>2</sub>O</p> <p>We also have lists that needs to be shown. For example an unordered and an ordered list.</p> <p>If there is alot of text we might also want to use a line break <br> to continue on the next line.</p> <ul> <li>UL Item 1 <ul> <li>UL Item 1.1</li> <li>UL Item 1.2</li> </ul> </li> <li>UL Item 2</li> <li>UL Item 3</li> </ul> <ol> <li>UL Item 1</li> <li>UL Item 2</li> <li>UL Item 3</li> </ol> <p>Last but not least. We have images.</p> <img src="/images/testimages/image1.png" /> <img src="/images/testimages/image2.png" >';

    $Override = array(
        array('tag' => 'img', 'extract' => 'src', 'replace' => '\begin{center}\includegraphics[scale=1]{$1}\end{center}'),
        array('tag' => 'body', 'extract' => 'value', 'replace' => '$1 \newline '),
    );

    $LatexString = (new LaraTeX)->convertHtmlToLatex($HTMLString, $Override);

This example would return the following LaTeX String:

\section{Heading 1} Text \newline \subsection{Heading 2} Text \newline \subsubsection{Heading 3} Text \newline Normal text here with some \textbf{strong} and \textbf{bold} text. \newline There is also text that could be \underline{underlined}. \newline Or of course we could have \textit{em-wrapped} or \textit{i-wrapped} text \newline A special test could be a \underline{\textit{\textbf{bold, underlined and italic}}} text at the same time! \newline For the mathematicians we also have calculations x\textsuperscript{2} and chemical stuff H\textsubscript{2}O \newline We also have lists that needs to be shown. For example an unordered and an ordered list. \newline If there is alot of text we might also want to use a line break \newline to continue on the next line. The br tag can have a leading slash too. \newline \begin{itemize} \item UL Item 1 \begin{itemize} \item UL Item 1.1 \item UL Item 1.2 \end{itemize} \item UL Item 2 \item UL Item 3 \end{itemize} \begin{enumerate} \item UL Item 1 \item UL Item 2 \item UL Item 3 \end{enumerate} Last but not least. We have images. \newline \begin{center}\includegraphics[scale=1]{/images/testimages/image1.png}\end{center} \begin{center}\includegraphics[scale=1]{/images/testimages/image2.png}\end{center} \newline

Listening to events

Whenever a pdf is succesfully generated, it fires the event LaratexPdfWasGenerated. Similarly whenever the PDF generation fails it fires the event LaratexPdfFailed.

These events are important if you need to perform some actions depending on the generation status, like updating the database. But mostly these PDF files have some metadata like the user the PDF belongs to or to which order the PDF belongs. You can pass these metadata while instantiating LaraTeX as a second argument.

This metadata is then passed back to you from the fired event, which makes it much more meaningful to listen. The metadata can be anything, it can be a string, numeric, an array, an object, a collection and so on. You can pass the metadata depending on your desired logic.

// $user will be our metadata in this example
$user = Auth::user();

(new LaraTeX('latex.tex', $user))->with([
    'Name' => 'John Doe',
    'Dob' => '01/01/1990',
    'SpecialCharacters' => '$ (a < b) $',
    'languages' => [
        'English',
        'Spanish',
        'Italian'
    ]
])->savePdf(storage_path('app/pdf/test.pdf'));

Then you can define a listener like :

<?php

namespace App\Listeners;

use Ismaelw\LaraTeX\LaratexPdfWasGenerated;

class LaratexPdfWasGeneratedConfirmation
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  LatexPdfWasGenerated  $event
     * @return void
     */
    public function handle(LaratexPdfWasGenerated$event)
    {
        // Path  of pdf in case in was saved
        // OR
        // Downloaded name of pdf file in case it was downloaded in response directly
        $pdf = $event->pdf;

        // download OR savepdf
        $action = $event->action;

        // metadata $user in this example
        $user = $event->metadata;

        // Perform desired actions
    }
}

Garbage Collection

When you export the PDF, a few extra files are generated by pdflatex along with your PDF (e.g. .aux, .log, .out etc.). The package takes care of the garbage collection process internally. It makes sure that no files are remaining when the PDF is generated or even when any error occures.

This makes sure the server does not waste it's space keeping those files.

Error Handling

We are using the application pdflatex from texlive to generate PDFs. If a syntax error occures in your tex file, it logs the error into a log file. Or if it is turned off, it shows the output in the console.

The package takes care of the same logic internally and throws ViewNotFoundException. The exception will have the entire information about the error easily available for you to debug.

Contribution

Please feel free to contribute if you want to add new functionalities to this package.

Credits

This Package was inspired alot by the laravel-php-latex package created by Techsemicolon Later I started my own version of laravel-php-latex ismaelw/laravel-php-latex because of missing support on the other package.

For better compatibility and better configuration handling I decided to create this package.

Changelog

Please see CHANGELOG for more information about any major change.

License

The MIT License (MIT). Please see License File for more information.

Comments
  • Ability to get the PDF contents and inline response

    Ability to get the PDF contents and inline response

    I think two very useful features, that are very easy to implement, should be added:

    1. the ability to get the generated PDF contents as a string, for example through a getContent() method.
    2. the ability to display the PDF inline, through an inline() method, just like the download() method downloads the generated PDF.
    enhancement 
    opened by gjm 8
  • Exception is thrown when a string containing 'less than' sign (<) is passed from controller to blade .

    Exception is thrown when a string containing 'less than' sign (<) is passed from controller to blade .

    Hi @ismaelw

    The package is throwing exception when we pass a string containing 'less than ' character (<) from controller to blade tex file.

    Kindly check following controller and blade files. These are not working and exception is thrown.

    Controller

         public function laratex()
          {
                $data = "$ (a < b) $";
    
                return (new LaraTeX('tex'))->with([
                            'data' => $data,
                      ])->download( 'test.pdf');
          }
    

    Blade

    
    \documentclass[a4paper,9pt,landscape]{article}
    
    \usepackage{adjustbox}
    \usepackage[english]{babel}
    \usepackage[scaled=.92]{helvet}
    \usepackage{fancyhdr}
    \usepackage[svgnames,table]{xcolor}
    \usepackage[a4paper,inner=1.5cm,outer=1.5cm,top=1cm,bottom=1cm,bindingoffset=0cm]{geometry}
    \usepackage{blindtext}
    \geometry{textwidth=\paperwidth, textheight=\paperheight, noheadfoot, nomarginpar}
    
    \renewcommand{\familydefault}{\sfdefault}
    
    \pagestyle{fancy}
    \fancyhead{}
    \renewcommand{\headrulewidth}{0pt}
    \fancyfoot{}
    \fancyfoot[LE,RO]{\thepage}
    
    \fancyfoot[C]{\fontsize{8pt}{8pt}\selectfont Above document is auto-generated.}
    \renewcommand{\footrulewidth}{0.2pt}
    
    
    \begin{document}
     
          {{  $data }}
    
    \end{document}
    
    

    Exception

    Ismaelw\LaraTeX\LaratexException
    
    
    Misplaced alignment tab character &. l.27 $a & lt; b$ ? ! Emergency stop. l.27 $a & lt; b$ ! ==> Fatal error occurred, no output PDF file produced! 
    
    

    Ismaelw\LaraTeX\LaraTeX::parseError

    image

    But if I use 'less than' symbol (<) directly in blade, then it is working fine and PDF is generating.

    For example - below code is working fine

    Controller

      public function raw()
      {
               return (new LaraTeX('tex'))->download( 'test.pdf');
      }
    
    

    Blade

    
    \documentclass[a4paper,9pt,landscape]{article}
    
    \usepackage{adjustbox}
    \usepackage[english]{babel}
    \usepackage[scaled=.92]{helvet}
    \usepackage{fancyhdr}
    \usepackage[svgnames,table]{xcolor}
    \usepackage[a4paper,inner=1.5cm,outer=1.5cm,top=1cm,bottom=1cm,bindingoffset=0cm]{geometry}
    \usepackage{blindtext}
    \geometry{textwidth=\paperwidth, textheight=\paperheight, noheadfoot, nomarginpar}
    
    \renewcommand{\familydefault}{\sfdefault}
    
    \pagestyle{fancy}
    \fancyhead{}
    \renewcommand{\headrulewidth}{0pt}
    \fancyfoot{}
    \fancyfoot[LE,RO]{\thepage}
    
    \fancyfoot[C]{\fontsize{8pt}{8pt}\selectfont Above document is auto-generated.}
    \renewcommand{\footrulewidth}{0.2pt}
    
    
    \begin{document}
     
       $ a < b $
    
    \end{document}
    
    

    Kindly help, how can I pass string containing less than sign (<) from controller to blade and render them in PDF.

    Thank you

    help wanted 
    opened by dhruva81 5
  • This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.7.30) (preloaded format=pdflatex.fmt) restricted \write18 enabled.

    This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.7.30) (preloaded format=pdflatex.fmt) restricted \write18 enabled.

    I want to run dryRun(), but get the errormessage above. May you can explain me why. Pdflatex works.

    Controller public function download(){ return (new LaraTeX)->dryRun(); }

    web.php Route::controller(FinposController::class)->group(function () { Route::get('download', 'download')->name('finpos_download'); });

    latex.php

    'pdflatex', // binPath' => 'c:\Users\itbaecker\AppData\Local\Programs\MiKTeX\miktex\bin\x64\pdflatex', // Folder in your storage folder where you would like to store the temp files created by LaraTeX 'tempPath' => 'app/laratex', // boolean to define if log, aux and tex files should be deleted after generating PDF 'teardown' => true, ]; help wanted 
    opened by MrBaker10 4
  • Execute binary twice for toc

    Execute binary twice for toc

    To have a working table of contents you have to execute the binary twice. Not sure if this should be optional but I didn't see any problem by just adding it right there.

    enhancement 
    opened by 0s1r1s 3
  • Package ismaelw/laratex at version  has a PHP requirement incompatible with your PHP version,

    Package ismaelw/laratex at version has a PHP requirement incompatible with your PHP version,

    Hi

    I am getting following exception when installing on server with PHP version 8.0.6

    [InvalidArgumentException]
      Package ismaelw/laratex at version  has a PHP requirement incompatible with your PHP version, 
      PHP extensions and Composer version
    

    Kindly upgrade this package to support PHP v8.

    Thank you.

    bug 
    opened by dhruva81 3
Releases(v1.0.0)
Owner
Ismael Wismann
Development, Film & Design - Since 2013 Automation Enthusiast
Ismael Wismann
Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using Gravity Forms.

Gravity PDF Gravity PDF is a GPLv2-licensed WordPress plugin that allows you to automatically generate, email and download PDF documents using the pop

Gravity PDF 90 Nov 14, 2022
Magento 2 Invoice PDF Generator - helps you to customize the pdf templates for Magento 2

Magento 2 Invoice PDF Generator - helps you to customize the pdf templates for Magento 2. If you have an enabled template and a default template for the store you need your template the system will print the pdf template.

EAdesign 64 Oct 18, 2021
Magento 2 Module for creating PDF's based on wkhtmltopdf

Magento 2 PDF generator Magento 2 module to ease the pdf generation using wkhtmltopdf features Installation composer require "staempfli/magento2-modul

Stämpfli AG 56 Jul 7, 2022
Simple wrapper package around MPDF's setProtection method that allows you to set password on PDF files

Laravel PDF Protect (fork) Simple wrapper package around MPDF's setProtection method that allows you to set password on PDF files. Installation You ca

Raphael Planer 2 Jan 23, 2022
PHP library generating PDF files from UTF-8 encoded HTML

mPDF is a PHP library which generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF (see CREDITS), with a number of enhancement

null 3.8k Jan 2, 2023
Pdf and graphic files generator library written in php

Information Examples Sample documents are in the "examples" directory. "index.php" file is the web interface to browse examples, "cli.php" is a consol

Piotr Śliwa 335 Nov 26, 2022
Sign PDF files with valid x509 certificate

Sign PDF files with valid x509 certificate Require this package in your composer.json and update composer. This will download the package and the depe

Lucas Nepomuceno 175 Jan 2, 2023
Convert HTML to PDF using Webkit (QtWebKit)

wkhtmltopdf and wkhtmltoimage wkhtmltopdf and wkhtmltoimage are command line tools to render HTML into PDF and various image formats using the QT Webk

wkhtmltopdf 13k Jan 4, 2023
Convert HTML to PDF using Webkit (QtWebKit)

wkhtmltopdf and wkhtmltoimage wkhtmltopdf and wkhtmltoimage are command line tools to render HTML into PDF and various image formats using the QT Webk

wkhtmltopdf 13k Jan 9, 2023
Rapidly Generate Simple Pdf, CSV, & Excel Report Package on Laravel

Laravel Report Generators (PDF, CSV & Excel) Rapidly Generate Simple Pdf Report on Laravel (Using barryvdh/laravel-dompdf or barryvdh/laravel-snappy)

Jimmy Setiawan 513 Dec 31, 2022
Laravel package to convert HTML to PDF, supporting multiple drivers.

eve/pdf-converter A Laravel package to help convert HTML to PDF. Supports multiple drivers. Requirements and Installation eve/pdf-converter requires L

eve.io 11 Feb 15, 2022
Laravel Snappy PDF

Snappy PDF/Image Wrapper for Laravel 5 and Lumen 5.1 This package is a ServiceProvider for Snappy: https://github.com/KnpLabs/snappy. Wkhtmltopdf Inst

Barry vd. Heuvel 2.3k Jan 2, 2023
Generate PDF invoices for your customers in laravel

What is Invoices? Invoices is a Laravel library that generates a PDF invoice for your customers. The PDF can be either downloaded or streamed in the b

Erik C. Forés 399 Jan 2, 2023
HTML to PDF converter for PHP

Dompdf Dompdf is an HTML to PDF converter At its heart, dompdf is (mostly) a CSS 2.1 compliant HTML layout and rendering engine written in PHP. It is

null 9.3k Jan 1, 2023
PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage

Snappy Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. It uses the excellent webkit-based wkhtmltopd

KNP Labs 4.1k Dec 30, 2022
Official clone of PHP library to generate PDF documents and barcodes

TCPDF PHP PDF Library Please consider supporting this project by making a donation via PayPal category Library author Nicola Asuni [email protected] co

Tecnick.com LTD 3.6k Jan 6, 2023
TCPDF - PHP PDF Library - https://tcpdf.org

tc-lib-pdf PHP PDF Library UNDER DEVELOPMENT (NOT READY) UPDATE: CURRENTLY ALL THE DEPENDENCY LIBRARIES ARE ALMOST COMPLETE BUT THE CORE LIBRARY STILL

Tecnick.com LTD 1.3k Dec 30, 2022
PdfParser, a standalone PHP library, provides various tools to extract data from a PDF file.

PdfParser Pdf Parser, a standalone PHP library, provides various tools to extract data from a PDF file. Website : https://www.pdfparser.org Test the A

Sebastien MALOT 1.9k Jan 2, 2023
Convert html to an image, pdf or string

Convert a webpage to an image or pdf using headless Chrome The package can convert a webpage to an image or pdf. The conversion is done behind the sce

Spatie 4.1k Jan 1, 2023