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.
Asked
Active
Viewed 1,079 times
1
-
what are you using to write your pdf? – Kasia Gogolek May 08 '12 at 13:13
-
2Sorry but I can't understand the question - can you clarify what you want to do and what the problem is that's stopping you from doing it. – Danack Jul 26 '12 at 12:30
1 Answers
1
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

Community
- 1
- 1

Anthony Hatzopoulos
- 10,437
- 2
- 40
- 57
-
1I don't understand what you just said. Have you read the material and seen the examples? What error are you getting now? What data loss is occuring? If you use php and get data from some source what is the problem, whether it is csv files or binary the concept is exactly the same. – Anthony Hatzopoulos Jul 28 '12 at 03:09