Categories: php, laravel

In laravel How i can split a pdf file(more then 1 page) into multiple pdf file? [closed]

1 answer

I mean useing laravel if i have 10 page pdf, i want each page separated 10 pdf file. With laravel. I am looking for a package. can anyone help? what laravel package is out there?

Received answer to this question:
The best answer according to the author of the question:

You can do it with pdf-tk (https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/). I use it in my Laravel project via console.

sudo apt-get --yes install pdftk 

Or use another command if you have another OS.

After install you can easily split your pdf document

pdftk foo-bar.pdf cat 1-12 output foo.pdf pdftk foo-bar.pdf cat 13-end output bar.pdf 

I suppose you have class for work with pdf document. You can use eval function for running pdftk command in your console.