Giter VIP home page Giter VIP logo

tcpdf_using_streams's Introduction

TCPDF using streams

TCPDF is a good library for generating small PDFs on the fly. However, the page and file content buffers are stored in RAM through variables, which makes the library unsuitable for heavy processing. It is often necessary to increase the PHP memory limit to avoid exceeding it.

This is fixed in this fork. Storing the file and pages in variables is replaced with writing into stream (through the php://temp mechanism, which automatically decides to use RAM or a file). It is now possible to write very large PDF files, save them and display the content, without impacting memory.

Installing

composer require garsaud/tcpdf_using_streams
# instead of composer require tecnickcom/tcpdf

Usage

$pdf = new TCPDF();

// various modifications...

$stream = $pdf->Output('STREAM');

echo get_resource_type($stream); // "stream"

The original library

https://github.com/tecnickcom/TCPDF

tcpdf_using_streams's People

Contributors

baptistepillot avatar cedric-anne avatar daeroni avatar defrance avatar dilyanpalauzov avatar dominiqueferet avatar findus23 avatar garsaud avatar gemal avatar jakuje avatar jausions avatar jonasnutz avatar leofeyer avatar mvorisek avatar nicolaasuni avatar nicolaasuni-vonage avatar niklasbr avatar paulholden avatar remicollet avatar rvanginneken avatar stchr avatar supervirus avatar tanelt avatar thorsten avatar tofandel avatar vincentlanglet avatar wenzhengjiang avatar westhouseit avatar williamdes avatar woytam avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.