如何在php或html中显示许多pdf文件

时间:2015-03-15 17:08:14

标签: html5

我是php的初学者,我有一个项目,我需要在一个html页面中显示几个pdf文件。我认为用户可以在服务器上传文件,然后我会创建一个页面,就像电子书一样,每个pdf都将被连接起来。我需要在那里进行一些编辑(徽标,个人数据等) 有人可以帮我吗?

我已尝试使用此代码:

    $file= './upload/podorys_full.pdf';
       $filename='podorys_full.pdf';
       header('Content-type: application/pdf');
       header('Content-Disposition: inline; filename="'.$filename.'"');
       header('Content-Transfer-Encoding: binary');
       header('Accept-Ranges: bytes');
       @readfile($file);

$file= './upload/Projekt_BZSY_full.pdf';
       $filename='Projekt_BZSY_full.pdf';
       header('Content-type: application/pdf');
       header('Content-Disposition: inline; filename="'.$filename.'"');
       header('Content-Transfer-Encoding: binary');
       header('Accept-Ranges: bytes');
       @readfile($file);

但最后不会显示所有页面和连续的pdf文件。

0 个答案:

没有答案