1

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.

halfer
  • 19,824
  • 17
  • 99
  • 186
Learner
  • 714
  • 1
  • 5
  • 24

1 Answers1

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
  • 1
    I 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