Search code examples
phphtmlpdffpdffpdi

Generate several pdf on a page with FPDI in PHP


I'm trying to display a pdf but page by page (separated pages). The thing is that once I generate a page with FPDI, I have 4 options:

  1. download generated pdf
  2. display it directly to the browser (streaming like)
  3. generate an string that represents the pdf
  4. save as a file

What I would like to do is take option 3, put every string generated for each page and display it in different divs. Is it possible?


Solution

  • After a lot of research I gave up with FPDI + PHP solution and I replaced by PDF.js + turn.js, based on https://github.com/blasten/turn.js/issues/82