I am trying to fly on the PDF generator using PhD, but I still have a problem in those pages Trying to generate as a PDF, using a canvas is the bar graph generated by float.
Does anyone have experience with this or how to get a canvas to print a PDF?
I'm just open to the idea of loading a page to my clients using the style page breaks from CSS (Print) page using broken report graph and print made from PDF printers.
// Here is the way to generate HTML in PDF 1 js files jquery.js js / Html2canvas.js js / jquery.plugin.html2canvas.js 2. Change the canvas $ ('. HideDivs') to get html content. Hide $ ('.formdrop'). $ ('Block'). $ ('# Img_val') Val (canvas.toDataURL ("Image / Jpg")); $ ('#' Img_val3 '). Val ($ (' block '). Html ()) // div // form manual}}); 3. PDF with PDF PDF PDF Return to PDF (isset ($ _ REQUEST ['img_val']): // data $ filteredData = substr ($ _ POST ['img_val'], Stropo ($ _ POST ['IMG_val' ], ",", "1"; // string $ unencodedData = base64_decode ($ filtered data); // image $ imgfile = FCPATH.'images / submsnimage _ '. $ This- & gt; session - & gt; Save user data ('admin_id'). '.jpg'; $ painted = file_put_contents ($ imgfile, $ unencodedData); Chmod ($ imgfile, 0777); $ PdfImageFile = SITE_URL () "images / submsnimage _" $ This- & gt; session- & gt; userdata ('admin_id') 'jpg.'. If end; 4 pdf generation ini_set ('max_execution_time ', 300); Need_once (FCPATH.'tcpdf / config / lang / eng.php'); Need_once (FCPATH.'tcpdf / tcpdf.php '); $ axa = new TCPDF (); $ Exa-> Setsetter (PDF_CREATOR); $ Exa- & gt; SetAuthor ('Clay County Admin'); $ Exa- & gt; Settlement ('Clay County Form'); $ Exa- & gt; Setsmack ('Example of TCPDF'); $ Exa- & gt; Set Keywords ('TCPDF, PDF, PHP'); $ Exa-> Set font ('bar', '', 18); $ Exa-> AddPage (); $ Exa-> Image ($ pdfImageFile, 15, 10, 430,630); $ Exa-> AddPage (); $ Exa-> Image ($ pdfImageFile2, 15, 10, 430,630); $ Exa-> AddPage (); $ Exa-> Image ($ pdfImageFile3, 15, 10, 430,630); $ Exa-> SetImageScale (PDF_IMAGE_SCALE_RATIO); $ Exa-> Set JPEG quality (100); $ Root = SITE_URL (); $ Exa-> SetImageScale (1.53); $ Txt = ""; $ Exa-> Write HTML ($ test, true, false, true, false, ''); $ Exa-> Output (FCPATH.uploads / pdf / clayCommunityBullyReport.pdf ',' F '); // Download PDF
Comments
Post a Comment