php - Allow contents to be copied of pdf created using tcpdf -
i'm creating pdf file using tcpdf. pdf created, contents not allowed copy.
problem:
what should do,so able copy contents of pdf created. achievable? please guide me same. thanks! code:
require_once('tcpdf_include.php'); $pdf = new tcpdf(pdf_page_orientation, pdf_unit, pdf_page_format, true, 'utf-8', false); $pdf->setprotection($permissions = array('print', 'modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-high'), '', null, 0, null); $pdf->setcreator(pdf_creator); $pdf->setheaderdata(pdf_header_logo, pdf_header_logo_width, 'license export details'); // set header , footer fonts $pdf->setheaderfont(array('helvetica', '', pdf_font_size_main)); $pdf->setfooterfont(array('helvetica', '', pdf_font_size_data)); // set default monospaced font $pdf->setdefaultmonospacedfont(pdf_font_monospaced); // set margins $pdf->setmargins(pdf_margin_left, pdf_margin_top, pdf_margin_right); $pdf->setheadermargin(pdf_margin_header); $pdf->setfootermargin(pdf_margin_footer); // set auto page breaks $pdf->setautopagebreak(true, pdf_margin_bottom); // set image scale factor $pdf->setimagescale(pdf_image_scale_ratio); // set language-dependent strings (optional) if (@file_exists(dirname(__file__).'/lang/eng.php')) { require_once(dirname(__file__).'/lang/eng.php'); $pdf->setlanguagearray($l); } $pdf->setfont('times', '', 16); // add page $pdf->addpage(); //write html $html='================= data=============='; //convert html pdf document $pdf->writehtml($html, true, false, true, false, ''); //close , output pdf document $pdf->output('export_details.pdf', 'd');
i think should delete these 2 lines
$pdf->setprotection($permissions = array('print', 'modify', 'copy', 'annot-forms', 'fill-forms', 'extract', 'assemble', 'print-high'), '', null, 0, null); $pdf->setcreator(pdf_creator);
Comments
Post a Comment