Merge PDF Blob files from MySQL database

How to combine multiple blob PDF files into one PDF file so that you can print later?

<?php include 'config.php'; include 'connect.php'; $session= $_GET[session]; $query = " SELECT $tbl_uploads.username, $tbl_uploads.description, $tbl_uploads.type, $tbl_uploads.size, $tbl_uploads.content, $tbl_members.session FROM $tbl_uploads LEFT JOIN $tbl_members ON $tbl_uploads.username = $tbl_members.username WHERE $tbl_members.session= '$session'"; $result = mysql_query($query) or die('Error, query failed'); while(list($username, $description, $type, $size, $content) = mysql_fetch_array($result)) { header("Content-length: $size"); header("Content-type: $type"); header("Content-Disposition: inline; filename=$username-$description.pdf"); } echo $content; mysql_close($link); exit; ?> 
+1
database mysql pdf blob
source share
2 answers

How to combine multiple blob PDF files into one PDF file so that you can print later?

You do not - at least just not combining byte streams. You need to process each file and combine them into a new PDF document.

Some pointers, perhaps one of the solutions, depending on the platform you are working on, works for you:

  • PHP - How to merge / merge multiple PDF files

  • How to combine images inside pdf according to the program?

  • It is necessary to combine several PDF files into one PDF file with the "Table" section

+1
source share

pdftk will merge several PDF files as well as PDFsam ..

0
source share

All Articles