For a limited chunk size, can I write in the same PDF file? For example, I have 12MB of data that I have to write 4 times as split records to a PDF file and I have to append new in EOF.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You cannot open an existing PDF with TCPDF so using only that will not suffice. See http://sourceforge.net/projects/tcpdf/forums/forum/435311/topic/4575080
But you can import pages with FPDI which as of v1.2.1 can also be used with TCPDF and there’s example code
Alternatively you can generate seperate pdf documents and use something like pdftk to merge them.
As for processing large files located on disk with PHP. You can use fopen, fread and friends. There’s a good article on this on ibm developerworks and I another on SO too