是否可以在浏览器中编辑pdf并将其作为新的pdf文件保存到服务器? 这就是我查看pdf文件的方式。
<object data="<?=base_url()?>html_public/pdf/ri.pdf" type="application/pdf" width="910" height="400">
<!-- support older browsers -->
<embed src="<?=base_url()?>html_public/pdf/ri.pdf" type="application/pdf" width="910" height="400"/>
<!-- For those without native support, no pdf plugin, or no js -->
<p>It appears you do not have PDF support in this web browser. <a href="<?=base_url()?>html_public/pdf/ri.pdf" target="_blank">Click here to download the document.</a></p>
</object>
<div id="submit"><?php $data = array('name' => 'but', 'id' => 'choose', 'value' => 'true', 'type' => 'submit'); echo form_button($data, 'Update' ); ?> </div>
答案 0 :(得分:0)
创建控制器
并粘贴这个
$ this-&gt; load-&gt; view('您的视图名称');
//获取输出html
$html = $this->output->get_output();
// Load library
`$this->load->library('dompdf_gen');`
// Convert to PDF
`$this->dompdf->load_html($html)`;
`$this->dompdf->render();`
`$this->dompdf->stream("welcome.pdf");`