Got a task to break a single pdf into multiple pdf documents using php. Till now i have not wrote any code because i am not sure which way to follow. But i will try my best to explain the situation here.
I have a pdf document with several pages and all i want is to break this pdf into multiple pdf's by passing the page numbers.
So lets' say i pass starting page as 1 and ending page as 10. The php will read the pdf from page 1 to 10 and will create a new document for these 10 pages.
Hope there will be a way to achieve this
There is no good way to do this in PHP alone; as far as I know, none of the PHP PDF libraries can do this. It's a task for an external tool.
If you are on a Linux server, there's this approach on Unix.SE using Python. Then there's the pdftk
command line tool, the "Swiss army knife for PDFs". Googling "split PDF pages" will give you even more options.