tcpdf

How to skip over corrupt files with PHP libraries TCPDF and FPDI by modifying error handling?

大兔子大兔子 提交于 2019-12-10 18:22:36
问题 I am using the PHP libraries TCPDF and FPDI to combine PDF documents, and am getting the following error: TCPDF ERROR: Unable to find object (10, 0) at expected location I have the commercial version of FPDI. It appears that the issue is only happening with PDF Version 1.3 (Acrobat 4.x) files. Here is a screenshot of a file's document properties that is creating the error. http://imagebin.org/215041 I'd like to skip over any files with errors instead of letting the script die. I have modified

TCPDF page borders?

北战南征 提交于 2019-12-10 17:13:03
问题 I'm trying to achieve simple 1px solid red border around each page generated in TCPDF. Previously using other PDF scripts I was forced to draw a rectangle after doing some rough calculations with getting the page width and height and -20px (to allow for 10px indentation on each side). However I'm unsure how I can achieve a similar result with TCPDF. Does anyone have any experience? 回答1: Here you go (this will draw a black line of 15 points around the current page) $pdf = new TCPDF(PDF_PAGE

PHP TCPDF Export for Standard Address Labels

允我心安 提交于 2019-12-10 16:54:31
问题 Standard label which are printed on a special sheet of paper fit on 3 columns with 10 rows on each sheet. However the blocks have to be set in a specific size in order for the labels to display correctly on the sheet once you peel off the address. i have setup my HTML which i print with TCPDF writeHTML function. However, i'm trying to get the height as exact as possible but TCPDF does not seems to support height measurement. Is there a standard template that i could use that would output the

how to generate pdf using blade view with tcpdf laravel 5?

旧巷老猫 提交于 2019-12-10 15:28:48
问题 I'm trying to create a pdf using laravel 5 and https://github.com/elibyy/laravel-tcpdf i have a form of 20 pages writing in laravel blade when my client fill the form and click submit i want to generate pdf for him and save it i try to do it like this in my controller public function createPDF() { $pdf = Input::get('pdf',null); $company = Input::get('company',null); $branch = Input::get('branch',null); $sub_branch = Input::get('sub_branch',null); $form_type = Input::get('form_type',null);

TCPDF: Clip text to Cell width

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 15:15:36
问题 I am generating PDF report using TCPDF's Cell method extensively. Text printed with Cell method spills beyond width specified in method. I want to print only as much part of the text that fits in the specified width but not to spill beyond or wrap to next line. I do not want font stretch strategy. I searched a lot but could not find a solution. Is there any other method/way to handle this? (I used setfillcolor(255) to achieve the visual effect. But the text is still there, invisible; gets

TCPDF don't display image with writeHTML

橙三吉。 提交于 2019-12-10 15:11:57
问题 this question seems an evergreen on TCPDF... I have an issue that's driving me crazy. I have an html code that I use as "template" for my PDF, here I have my company logo. Everything works fine on localhost (Windows), but when I move online, the image is not shown. Pay attention: I don't get any error (ie the Unable to get image error) on my PDF the image is simple blank! Infact if I click on the PDF on the position where the images it's supposed to be, I can select it, and Adobe enables the

Attach footer at very bottom to every page in tcpdf

拥有回忆 提交于 2019-12-10 12:30:32
问题 I need to attach footer at the very bottom of every page. I am using tcpdf for generating pdf's. i tried many solution on google but did not found any luck. My current framework is yii and i am using tcpdf extension. 回答1: you need to write Footer method in your class for example // Page footer public function Footer() { // Position at 15 mm from bottom $this->SetY(-15); // Set font $this->SetFont('helvetica', 'I', 8); // Page number $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.

Set cell borders as dashed in tcpdf WriteHTML

元气小坏坏 提交于 2019-12-10 11:58:26
问题 Hi i want to make the border of table cells as dashed lines in TCPDF writehtml()... I have tried using border=1 for tables but only a thick border comes .. also i have tried using css like style="border-style: dashed;border-width: 1px; " however the border remains the same... Can anyone point me in the right direction? 回答1: According to the docs, if you’d use writeHTMLCell() , the 6th argument represents the border style. A dashed border would look like: TCPDF::writeHTMLCell( …, array( 'LRTB'

how to control page breaks in tcpdf

烂漫一生 提交于 2019-12-10 11:57:45
问题 i'm generating a pdf document for an invoice using TCPDF library in yii php. after the address data there a part with the list of bought items. that list is of variable lenght which makes it hard to predict where the next part will render. and at the end there is a part with payment, taxes, shipping etc. i would like to know how to make that last part be unbreakable. so it's either entirely on the first page or entirely on the second page. is that even doable? in case it helps here's the code

TCPDF: sometime add new page then next page content overflows

最后都变了- 提交于 2019-12-10 10:45:02
问题 I have to create one pdf with using tcpdf library. I am facing issue regarding content overflow on next page. sometime add new page then next page content overflows. that issue is generated few pages. MY PHP CODE public function getPdfToAllEmpReport(){ //header("Content-type:application/pdf"); $user_id = Auth::user()->get()->id; $company_id = Auth::user()->get()->company_id; $input = Input::all(); if(!isset($input) && empty($input)){ $input = array(); } // Company based Userlist $userData =