PDFファイルの読み取りに使用されるphpコードにhtmlタグを追加しようとしています。ページの下部にリンクを追加したいのですが、このリンクpdfファイルの上に表示されます。しかし、これを行う方法が見つかりません。この画像のようなものを作りたい..
PDFファイルを表示するためのインラインスクローラーが必要であり、次に他のPDFファイルへのリンクが必要です。
ここに私のコード:
<?php
$filename=base64_decode($_REQUEST['file2']);
$new_id=base64_decode($_REQUEST['id2']);
$line = "<html>";
$line .= "<head>";
$line .= "<title>PDF test</title>";
$line .= "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>";
$line .= "</head>";
$line .= "<body><div style='position:absolute; overflow:scroll;height:100px !important'>";
$file = WEB_ROOT."/admin/images/plastic_sandesh/pdffile/".$filename;
$length = filesize($file);
header("Content-type: application/pdf");
header("Content-Disposition: inline; filename=".$file);
header("Content-Length: ".$length);
@readfile($file);
$line .= "</div></body>";
$line .= "</html>";
?>
<iframe style='border:1px solid #FEFEFE; width:100px; height:100px;'>
<div style="position:absolute; overflow:scroll;height:100px !important">
<?php
$Qry2 =mysql_query( "select * from `tbl_plasticsandesh_pages` where `sandesh_id`='$new_id' order by `order`") or die(mysql_error());
$j=1;
$cnt=mysql_num_rows($Qry2);
while($res2 = mysql_fetch_array($Qry2))
{
$file_name2=base64_encode($res['pdf_page']);
?>
<a href="readpdf.php?act=view&file=<?php echo $file_name2;?>$id2=<?php echo $_REQUEST['id2'];?>" style="color:#111"><?php echo $j;?></a><br />
<?php
$j++;
}
?>
</div>
</iframe>
しかし、問題は唯一のpdfファイルが表示され、他のPDFファイルへのリンクがないことです。
前もって感謝します。