如何将大量PDF blob文件合并为一个PDF,以便随后打印?
<?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;
?>
答案 0 :(得分:1)
如何将大量PDF blob文件合并为一个PDF,以便随后打印?
你没有 - 至少不是简单地组合字节流。您需要处理每个文件,并将它们合并到一个新的PDF文档中。
一些指针,也许是解决方案之一,取决于您所使用的平台,适合您:
答案 1 :(得分:0)
pdftk将合并多个PDF文件以及PDFsam ..