PHP Classes

What is the best PHP pdf creation class?: CREATE PDF

Recommend this page to a friend!
  All requests RSS feed  >  What is the best PHP pdf creation class?  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

What is the best PHP pdf creation class?

Edit

Picture of Adrian by Adrian - 8 years ago (2017-03-25)

CREATE PDF

This request is clear and relevant.
This request is not clear or is not relevant.

+5

I need to create PDF documents.

  • 1 Clarification request
  • 1. Picture of Liji by Liji - 3 years ago (2021-11-06) Reply

    Hi I am using this code but while converting to PDF the Language Spelling is not correct. Can anyone guide me how to fix this. (Language Tamil, Font used is Latha)

    <?php header('Content-type: text/html; charset=UTF-8') ;//chrome require_once('tcpdf.php'); // create new PDF document $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);

    $pdf->setFontSubsetting(true); $pdf->SetFont('Latha', '', 12); $pdf->AddPage();

    $utf8text = ' <html><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body> <p>கரூர் பதிவு மாவட்டம், கிருஷ்ணராயபுரம் சார்பதிவகம், வட்டம், போத்துராவுத்தன்பட்டி, மேலவெள்ளாளப்பட்டியில் நத்தம் சர்வே எண். பாதைக்கு கிழக்கு, முருகன் வகையறா நிலத்திற்கு ---தெற்கு, பிச்சை மனைக்கு --- மேற்கு, சீட்டியம்மாள் நிலத்திற்கு இதன்மத்தியில் வடபுரம் கிழமேல் அடி 96 ½ , தென்புரம் கிழமேல் அடி சமீ </body></html>'; $pdf->writeHTML($utf8text, true, 0, true, true); $pdf->Output('example_008.pdf', 'I');

    ?>

    Ask clarification

    3 Recommendations

    PHP Chrome PDF: Generate PDF or images of HTML pages with Chrome

    This class can generate PDF or images of HTML pages with Chrome(headless).

    It can take the URL of Web page or a local HTML page file and runs the Chrome(headless) browser to display the given page.

    The class can make Chrome generate a PDF file or an image file from the opened page.
    This recommendation solves the problem.
    This recommendation does not solve the problem.

    +1

    Picture of Dawood Ikhlaq by Dawood Ikhlaq package author package author Reputation 65 - 7 years ago (2017-07-10) Comment

    you can also try this new library which uses chrome-cli as browser so no more problems with html,css problems , very simple interface give it a try


    TCPDF Warper: Create PDF documents using TCPDF fluent interface

    This class can create PDF documents using fluent interface around the TCPDF library.

    It provides several classes and traits that can be used to compose and render PDF documents using the TCPDF package.

    Currently it provides wrappers for adding text, images, barcodes and cell elements.
    This recommendation solves the problem.
    This recommendation does not solve the problem.

    +1

    Picture of zinsou A.A.E.Mose by zinsou A.A.E.Mose Reputation 6835 - 7 years ago (2017-06-02) Comment

    as you use the term create and not convert you can use this class but https://www.phpclasses.org/package/9615-PHP-Convert-HTML-to-PDF-using-pdflayer-API.html has more options like Dave smith told you...


    Convert HTML to PDF PHP Library: Convert HTML to PDF using pdflayer API

    This class can convert HTML to PDF using pdflayer API.

    It can send HTTP requests to the pdflayer API Web server to convert a given HTML document to PDF. The HTML may be passed literally or as the URL of a given page to convert.

    The class retrieves the converted HTML document and displays the PDF document as the current request output or serve it for download.

    The class can pass conversion options like:

    - Standard and custom page sizes and orientation
    - Viewport page sizing and zooming
    - Customized page headers and footers
    - Margins
    - Stamps and watermarks
    - Encryption
    - Owner and user password protection
    - PDF file permissions to save, print, etc..
    - PDF Meta data
    This recommendation solves the problem.
    This recommendation does not solve the problem.

    +4

    Picture of Dave Smith by Dave Smith package author package author Reputation 7620 - 7 years ago (2017-04-30) Comment

    There are a couple packages out there that are no longer being maintained that can generate PDF files, namely fpdf and tcpdf.

    This package will take a HTML document and convert it to pdf using an API service which supports html5 and css3.


    Recommend package
    : 
    :