tcpdf

Confused about prestashop PDF generated process. Where is the code to handle the logic?

走远了吗. 提交于 2019-12-22 08:33:55
问题 I want to deep understand prestahop inside structure and amend some parts. I am stoped in the PDF. I want can't find the controller used to handle the AdminPdf and generateDeliverySlipPDF {if $order->delivery_number} <a class="btn btn-default _blank" href="{$link->getAdminLink('AdminPdf')|escape:'html':'UTF-8'}&submitAction=generateDeliverySlipPDF&id_order={$order->id}"> <i class="icon-truck"></i> </a> {/if} Who can help me figure out the inside processes? I can't find the methods to handle

TCPDF set different headers for different pages in one document

前提是你 提交于 2019-12-20 19:46:58
问题 Is there a way to have a different header logo for the 1st page in a document and different for the 2nd page? I thought that changing the header data between adding pages might do the trick, but in my tests it seems that setting the header after adding the first page has no effect: /* other stuff $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF

PDF library tcpdf in landscape orientation and pdf->SetXY doesn't work as expected?

房东的猫 提交于 2019-12-20 06:48:25
问题 I can not figure this one out how tcpdf recalculates x and y coordinates if orientation is landscape. The only way i can get a bit of control is to put text in a writeHTML // QR code $style = array( 'border' => false, 'padding' => 'auto', 'fgcolor' => array(0,0,0), 'bgcolor' => false ); $pdf->SetXY(0, 0); $pdf->write2DBarcode('http://www.google.com/', 'QRCODE,H', 0, 1, 40, 40, $style, 'N'); // set text content $pdf->SetXY(2, 37); //$pdf->SetXY(30, 7); $pdf->SetFontSize(10); $textData = '<p

Download tcpdf manually without using composer in Laravel 4

放肆的年华 提交于 2019-12-20 06:39:46
问题 I'm trying to download TCPDF library to my project using Composer (Laravel 4), but I can't. Sometimes this error occurs (http://i.stack.imgur.com/aaPDz.jpg) and sometime this error (http://i.stack.imgur.com/quXMB.jpg) I want to download it and add it in laravel manually without using composer. 回答1: When you say "without using composer ", I'm going to assume you mean "without using composer for the download". With the following solution you'll still need to invoke a composer command, but its

How can I create Malayalam PDF using TCPDF in PHP?

半腔热情 提交于 2019-12-20 03:57:09
问题 I am trying to create malayalam pdfs using TCPDF. As per the manual, i had converted the fonts (using http://fonts.snm-portal.com/) and had added them. It is working but is not working correctly. The words like 'ന്യൂഡല്ഹി, ഉത്തരവിട്ടെന്നും, എത്രയും'. are displayed as 'ന^യൂഡല്ഹി, ഉത^തരവിട^ടനെനും, എത^രയും'. I am using 'kartika.ttf' font now and had tried some other malayalam fonts. The database, tables, fields and the site are in 'utf-8' format. Is there any solution for this problem? Is it

PHPWord to PDF not able to load library

六眼飞鱼酱① 提交于 2019-12-20 03:47:10
问题 I have been trying all day to get this to work. Right now I am able to save the document as .docx file but I wanted to be able to save the document as PDF I have tried with DOMPDF and TCPDF but I keep getting error 'Unable to load PDF Library' I confirmed the path is correct. Am I missing something? thank you for your help $rendererName = \PhpOffice\PhpWord\Settings::PDF_RENDERER_TCPDF; $rendererLibrary = 'tcpdf.php'; $rendererLibraryPath = dirname(__FILE__) .'/plugins/tcpdf/' .

How to get total no of pages in TCPDF?

孤者浪人 提交于 2019-12-20 02:19:06
问题 I used getNumPages() function to get the total number of pages in tcpdf, but I didn't get the correct output. What should I do to get the correct number? 回答1: Hi I just wanted to add for anyone reading this, that I was using getNumPages() like you in the footer and it was giving me trouble because it was showing me the number of pages inserted up to now . So I was getting 1/1, 2/2, 3/3, etc. This is what I tried at first: $this->getPage().'/'.$this->getNumPages() I looked at example number 3

In TCPDF, this getAliasNbPages return value {:ptp:} so How can i get integer

末鹿安然 提交于 2019-12-19 12:01:58
问题 In TCPDF vthis function show value {:ptp:} so How can i get interger. So please help me. I need this value because i need apply some condition. I have lot of checked documentation. But i can't found the solution. 回答1: You only can get an alias because you not know the total page number until the end of the document. TCPDF replace the placeholder alias at $pdf->Output() with the correct number. 来源: https://stackoverflow.com/questions/51761325/in-tcpdf-this-getaliasnbpages-return-value-ptp-so

TCPDF ERROR: Unable to find object (8, 0) at expected location

妖精的绣舞 提交于 2019-12-18 17:05:22
问题 I am getting an error while deleting a page from an scanned pdf using TCPDF & FPDI. Other pdf are working fine. ERROR: Unable to find object (8, 0) at expected location 回答1: Your file might be corrupted. Some scanners will produce corrupted PDF's, But nothing to worry there. You can recreate pdf if you are using linux with shell_exec function pdf_recreate($f) { rename($f,str_replace('.pdf','_.pdf',$f)); $fileArray=array(str_replace('.pdf','_.pdf',$f)); $outputName=$f; $cmd = "gs -q -dNOPAUSE