I'm using TCPDF v4.6.013 to generate a password-protected PDF with an attached PDF file using annotations. Here's what I want to achieve: Embed an existing PDF (test_doc.pdf) as a file attachment via annotation. Protect the generated PDF using SetProtection so it requires a password to open. Issue: When I use SetProtection , the attached PDF opens as a blank page, or Fails to open in some viewers When I do not use SetProtection, the attached PDF opens and displays correctly. Here’s the relevant part...
2 ways, 1) change image from .png to jpg, 2) chmod to 777 (public) folder cache in /tcpdf/cache if use png Notes: add index.html in folder cache to avoid cache images visible in browser. other way is change php.ini to access write cache folder check php.ini allow_url_fopen = On; allow_url_include = On; tcpdf writes temp images to that folder only if the files are png
Problems with proof-of-concept test-case (see code below, output in attachment) First output: 1. Why is the padding never honored and always ignored? For example, on the cells in first row, or in the nested table? Whatever I try with padding or margin, it just gets ignored, while there is code in TCPDF addressing these CSS attributes. How can I make this work? Can someone provide a proof of concept with this addressed? 2. Why is there green visible? I.e. why does the inner table get a left indent...
Hi everyone, I'm encountering an issue with TCPDF while generating a PDF report with table borders. When the last row of a table does not fit on the current page, the border remains open, and the remaining content moves to the next page without properly closing the border on the first page. What I'd like to achieve is: If the content of a row doesn't fit on the current page, the entire row should automatically move to the next page. Alternatively, if some content fits on the first page, the border...
Hello! First of all – thank you for such great library. In your example 6 - WriteHTML (https://tcpdf.org/examples/example_006/ ) you use image example for centering images. <div style="text-align:center"> <img src="images/logo_example.png" alt="test alt attribute" width="100" height="100" border="0" /> </div> When width/height is less than 300 (for example 250*250) – everything is ok. But when image is bigger (for example 400*400 and more) centering like in your example is not working. Can You please...
If I use a 12 MB svg file, I have this error TCPDF ERROR: SVG Error: No memory at line 59 Is 512 MB not enough to process 12 MB?
I use TCPDF to create printable pdf files from digital artwork. I generate one-page pdf files with embedded svg objects. If the embedded svg is over 4MB, no otput is generated. I administer a 16 core dedicated server with Almalinux OS. I allocated 512 MB of ram, execution time 300 s, max upload size 100 MB, so there are plenty of resources. Generating a 2MB output takes just a few seconds, but TCPDF stops working over 4MB. How can I fix it? Thank you
I'm trying to find a list of the possible name/value pairs for the $prop 4th parameter of the TCPDF TextField method. The documentation shows: $prop (array) javascript field properties. Possible values are described on official Javascript for Acrobat API reference. I've tried to search the Javascript for Acrobat API reference but can't find them. Any guidance appreciated. Thanks
Have you checked out YOURLS? a link shortener that can be called via api to shorten links dynamically.. very easy to setup and call from within a php script etc. https://yourls.org/ https://stackoverflow.com/questions/40313478/getting-shorturl-with-yourls-api
Have you checked out YOURLS? a link shortener that can be called via api to shorten links dynamically.. very easy to setup and call from within a php script etc. https://yourls.org/
I'm creating a custom template for my company's invoice. However, now I have a problem that hasn't been resolved for over a month, I searched in different forums for a long time and this is my last alternative. Here in Brazil we use a payment method called pix, and it can be paid either by a qrCode or a copy and paste code, but this code is too long to put on one line, so in the structure of my invoice it breaks into a few lines however, when I copy I need it to come in one line just to work in the...
pricebuddy
The problem is simple, look the screenshot in attach. When the table arrive to bottom of page, without exceeding the page, tcpdf add a page not need. $row=''; for($i=0; $i<99; $i++){ $row .= ' Contract number '.$i.' Contract type Document date Page '; } $tbl = '<style> td{ padding: 3px; border: 1px solid #0e2b57; border-collapse: collapse; font-size:6pt; font-family: '.$avenirFontRegular.'; color:#0e2b57; } th{ font-weight:bold; background-color:#0e2b57; border: 1px solid #0e2b57; border-collapse:...
can you guys help me? I have code to display data using tcpdf but the results displayed are only 1 record this is the code // Header $tbl = <<<EOD <table border="1" cellpadding="2" cellspacing="0"> <thead> <tr style="background-color:LightGray;color:#000000;"> <td width="70" align="center"><b>TGL TRX</b></td> <td width="70" align="center"><b>PENY KE</b></td> <td width="200" align="center"><b>KETERANGAN</b></td> <td width="100" align="center"> <b>MUTASI DR</b></td> <td width="100" align="center"><b>MUTASI...
Example - https://lexa.pro/blog/php/364/
For #1 - https://lexa.pro/blog/php/364/
I could fix it by adding <span></span> direct before the <img> Tag. <table> <tr> <td><span></span><img src=""></td> </tr> </table>
You can check http://web.archive.org/web/20200513161214/https://tcpdf.org/docs/ to find old documentation about Tcpdf Inviato da Outlook per Androidhttps://aka.ms/AAb9ysg From: discussion@tcpdf.p.re.sourceforge.net discussion@tcpdf.p.re.sourceforge.net on behalf of Matthew Frederico mfrederico@users.sourceforge.net Sent: Sunday, August 27, 2023 8:22:35 PM To: [tcpdf:discussion] 435311@discussion.tcpdf.p.re.sourceforge.net Subject: [tcpdf:discussion] Re: SetFont Looks to me like changing it from roboto...
Looks to me like changing it from roboto to robotocondensed could work? On Sun, Aug 27, 2023, 7:32 AM David Stephens kembreg14@users.sourceforge.net wrote: I used fpdf.org for years. The documenation was great. tcpdf docs?.... Well, I need some help. This line: **$pdf->SetFont('Roboto','B',14) is causing this error: **Could not include font definition file: roboto I have these files in the /tcpdf/fonts folder: RobotoCondensed-Bold.php RobotoCondensed-Bold.ttf **RobotoCondensed-Bold.z I would be very...
I used fpdf.org for years. The documenation was great. tcpdf docs?.... Well, I need some help. This line: $pdf->SetFont('Roboto','B',14) is causing this error: Could not include font definition file: roboto I have these files in the /tcpdf/fonts folder: RobotoCondensed-Bold.php RobotoCondensed-Bold.ttf RobotoCondensed-Bold.z I would be very grateful is somebody could let me know how to resolve this error. Thanks so much. David
I used fpdf.org for years. The documenation was great. tcpdf docs?.... Well, I need some help. This line: **$pdf->SetFont('Roboto','B',14) ** is causing this error: Could not include font definition file: roboto ** I have these files in the /tcpdf/fonts** folder: **RobotoCondensed-Bold.php RobotoCondensed-Bold.ttf RobotoCondensed-Bold.z ** I would be very grateful is somebody could let me know how to resolve this error. Thanks so much. David
I used fpdf.org for years. The documenation was great. tcpdf docs?.... Well, I need some help. This line: **$pdf->SetFont('Roboto','B',14) is causing this error: **Could not include font definition file: roboto I have these files in the /tcpdf/fonts folder: RobotoCondensed-Bold.php RobotoCondensed-Bold.ttf **RobotoCondensed-Bold.z I would be very grateful is somebody could let me know how to resolve this error. Thanks so much. David
To install on Windows and test examples: Download the installation package for the software you want to install. Run the downloaded package to start the installation process. Follow the on-screen instructions and select the desired installation options (e.g., installation directory, additional components). Wait for the installation to complete. Once installed, locate the installed software in the Start menu or on your desktop. Launch the software and navigate to the examples or sample folder. Choose...
Hi Team, I have an issue while displaying SVG in PDF. The SVG image shows black in color in TCPDF. $svgString = '<svg width="142" height="141" viewBox="0 0 142 141" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path=""> <g filter="url(#filter0_d_0_483)"> <path fill-rule="evenodd" clip-rule="evenodd" d="M97.0217 87.8822H44.2512C39.1913 87.8822 35.0884 83.8278 35.0884 78.8321V26.6812C35.0884 21.6811 39.1913 17.6311 44.2512 17.6311H97.0217C102.082 17.6311 106.18 21.6811 106.18 26.6812V78.8321C106.18...
Hi Team, While adding external image in my PDF , it takes lot of time to load https://prnt.sc/89hHToEZJTzp // $img = file_get_contents('https://media.tenor.com/wxC7Hphx6jsAAAAM/test.gif'); // $pdf->Image('@'.$img, 35, 188, 68, 17, 'GIF', '', '', true, 72, '', false, false, 0, false, false, false); // $img = file_get_contents('https://hq.aftontickets.com/tools/assets/images/global/event-default-img.jpg'); // $pdf->Image('@'.$img, 115, 10, 92, 165, 'JPG', '', '', true, 72, '', false, false, 0, false,...
Hi Team, While adding external image in my PDF , it takes lot of time to load https://prnt.sc/89hHToEZJTzp // $img = file_get_contents('https://media.tenor.com/wxC7Hphx6jsAAAAM/test.gif'); // $pdf->Image('@'.$img, 35, 188, 68, 17, 'GIF', '', '', true, 72, '', false, false, 0, false, false, false); // $img = file_get_contents('https://hq.aftontickets.com/tools/assets/images/global/event-default-img.jpg'); // $pdf->Image('@'.$img, 115, 10, 92, 165, 'JPG', '', '', true, 72, '', false, false, 0, false,...
Hi Team, While adding external image in my PDF , it takes lot of time to load https://prnt.sc/89hHToEZJTzp // $img = file_get_contents('https://media.tenor.com/wxC7Hphx6jsAAAAM/test.gif'); // $pdf->Image('@'.$img, 35, 188, 68, 17, 'GIF', '', '', true, 72, '', false, false, 0, false, false, false); // $img = file_get_contents('https://hq.aftontickets.com/tools/assets/images/global/event-default-img.jpg'); // $pdf->Image('@'.$img, 115, 10, 92, 165, 'JPG', '', '', true, 72, '', false, false, 0, false,...
Hi ! Not having found the solution to my problem, I have modified a little bit the native code. I have spaces defined for each tags via setHtmlVSpace function. But on page break, the first element kept its spaces. So i did this : -> Define a protected firsttag variable protected $firsttag = true; -> At the end of AddPage function I assign the value "true" to this variable $this->firsttag = true; -> In writeHTML function I assign the value "true/false" to this variable depending on key tag while ($key...
Hello Since I migrate to php 8.1 and the new versione of tcpdf, it's not possible to add my logo with transparent background to pdf. I tried a lot of versions of my png-logo but without successful results. I read the example 42, but I'm not a crack in imaging and I don't know how I can build a png-logo with alpha-channel. I work with Affinity Photo 1.10.5 or Photoshop Elements 2020. Can anybody help my to create an logo with transparent background, because I need the Logo on different backgrounds....
mi me funciono la solución
any ideia ? Thank you
Hello everyone... i am having a "similar" issue I have a page with a Search on top and a search resault table on the bottom and i need to TCDPF the output of the search bunt i can seem to find a way to doit. can anyone help or give some pointers to a noob? Regards result query <?php if(isset($_GET['from_date']) && isset($_GET['to_date']) && isset($_GET['domain'])) { $from_date = $_GET['from_date']; $to_date = $_GET['to_date']; $domain = $_GET['domain']; $posto = $_GET['posto']; $talao = $_GET['talao'];...
Hello everyone... i am having a "similar" issue I have a page with a Search on top and a search resault table on the bottom and i need to TCDPF the output of the search bunt i can seem to find a way to doit. can anyone help or give some pointers to a noob? Regards result query <?php if(isset($_GET['from_date']) && isset($_GET['to_date']) && isset($_GET['domain'])) { $from_date = $_GET['from_date']; $to_date = $_GET['to_date']; $domain = $_GET['domain']; $posto = $_GET['posto']; $talao = $_GET['talao'];...
I don't know, that this is the solution, but now works in webserver: error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
Dear All! I use TCPDF 6.4.4 happily, but I have a problem. I make a PDF from html text. It works good always in localhost, but when my html go bigger (21KB, not so big...) on the web it gives me a warning message: Warning: Invalid argument supplied for foreach() in /web/leichter/iqom/TCPDF-main/tcpdf.php on line 19689 Warning: Invalid argument supplied for foreach() in /web/leichter/iqom/TCPDF-main/tcpdf.php on line 19721 Array ( [0] => X-Powered-By: PHP/7.0.33 [1] => Expires: Thu, 19 Nov 1981 08:52:00...
Dear All! I use TCPDF 6.4.4 happily, but I have a problem. I make a PDF from html text. It works good always in localhost, but when my html go bigger (21KB, not so big...) on the web it gives me a warning message: Warning: Invalid argument supplied for foreach() in /web/leichter/iqom/TCPDF-main/tcpdf.php on line 19689 Warning: Invalid argument supplied for foreach() in /web/leichter/iqom/TCPDF-main/tcpdf.php on line 19721 Array ( [0] => X-Powered-By: PHP/7.0.33 [1] => Expires: Thu, 19 Nov 1981 08:52:00...
Dear All! I use TCPDF 6.4.4 happily, but I have a problem. I make a PDF from html text. It works good always in localhost, but when my html go bigger (21KB, not so big...) on the web it gives me a warning message: Warning: Invalid argument supplied for foreach() in /web/leichter/iqom/TCPDF-main/tcpdf.php on line 19689 Warning: Invalid argument supplied for foreach() in /web/leichter/iqom/TCPDF-main/tcpdf.php on line 19721 Array ( [0] => X-Powered-By: PHP/7.0.33 [1] => Expires: Thu, 19 Nov 1981 08:52:00...
Here is the html text.
Dear All! I use TCPDF 6.4.4 happily, but I have a problem. I make a PDF from html text. It works good always in localhost, but when my html go bigger (21KB, not so big...) on the web it gives me a warning message: Warning: Invalid argument supplied for foreach() in /web/leichter/iqom/TCPDF-main/tcpdf.php on line 19689 Warning: Invalid argument supplied for foreach() in /web/leichter/iqom/TCPDF-main/tcpdf.php on line 19721 Array ( [0] => X-Powered-By: PHP/7.0.33 [1] => Expires: Thu, 19 Nov 1981 08:52:00...
Hi to all I seek help for one code that I need to adjust , actually to add something. This is the code: <tr height="30" bgcolor="#efefef" style="font-weight:bold;"> <td align="right">'.$_LANG['invoicestotal'].'</td> <td align="center">'.$total.'</td> </tr> So, like you see that displays total sum in PDF invoice. What I need is to create additional field which will display this $total number divided with custom number. For example, if $total is like 100, I need to divide this with 7.53450 and shos...
Hi to all I seek help for one code that I need to adjust , actually to add something. This is the code: '.$_LANG['invoicestotal'].' '.$total.' So, like you see that displays total sum in PDF invoice. What I need is to create additional field which will display this $total number divided with custom number. For example, if $total is like 100, I need to divide this with 7.53450 and shos result in another cell. Is this possible to add and please if someone knows how. Very gratefull Thanks !
You've edited the meta data - not the document. The title that appears on the page is set here: $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING, array(0,64,255), array(0,64,128));
TCPDF seems like a great package and I am glad that it is available. While trying to learn how to use it, I edited example_001.php to see what would happen. I changed the line $pdf->setTitle('TCPDF Example 001'); to $pdf->setTitle('My Test Example'); But when the PDF was created, the title was unchanged. What on earth am I missing??? Gerry Roston Gerry@PairOfDocs.net 734-516-6715
Hii, Here i'm attaching my html content which i'm using to display on pdf, but data:image not loading while open pdf.
No one?
Dear all, is there any chance to use utf-8 in filenames? E.g. $pdf->Output('exampleüäx_065.pdf', 'I'); The result is examplex_065.pdf In Germany we have several names with "ü", "ä" etc in it. User made me offended, if they got a file with wrong name. Regards ratzekahl
Hello! I need to draw two Objects (a text and a barcode) on the same space, partly overlapping. The text color is cyan and magenta only, the barcode is only yellow. Now I want regions where both overlap to be C+Y+M (ideally C+Y+M+K) but I can't find a way to do this. When I draw the blue text, it destroys parts of the barcode. Is there a way to lock the yellow layer when drawing the text? Or to make the text only touch cyan and magenta? Any ideas? Robert
Hello :) Does "vertical-align" property work with TCPDF ?
Pros, I encountered this weird issue. If I set $pdf->Output method to 'I', it displays the results on screen correctly. But when I click the download on the screen, it ignores the file name I specified and will download the whole php source codes. If I set the destination to 'D', then there is no problem at all. Anyone experienced this issue? How to resolve it? TIA.
Hi Nicola I have sucessfully managed to out put a PDF file with a barcode with TCPDF but when I go to print it the barcode becomes corrupt through a Zebra Label printer. The only difference I can see between our examples and my code is that I am using a variable. Any help would be much appreciated. Regards Richard
PieLabel what is $l, $a and $b here? Perhaps, $a and $b are the start and end angles.
PieLabel what is $l, $a and $b here?
PieLabel what is $l here?
i solve this problem with str_repalce $num=123464 $char= '0'=>'0', '1'=>'1', ....... $num=str_replace(array_keys($char),array_values($char),$num) pay attention before write do this also in you can convert in footer number with this way in formatPageNumber()
i solve this problem with str_repalce $num=123464 $char= '0'=>'0', '1'=>'1', ....... $num=str_replace(array_keys($char),array_values($char),$num) pay attention before write do this also in you can convert in footer number with this way in formatPageNumber()
i solve this problem with str_repalce $num=123464 $char= '0'=>'0', '1'=>'1', ....... $num=str_replace(array_keys($char),array_values($char),$num) pay attention before write do this also in you can convert in footer number with this way in formatPageNumber()
i solve this problem with str_repalce $num=123464 $char= '0'=>'0', '1'=>'1' $num=str_replace(array_keys($char),array_values($char),$num) pay attention before write do this also in you can convert in footer number with this way in formatPageNumber()
Hi Nicola Asuni, Thanks for providing this great library. We have created the gs1 data matrix for the pdf labels but its failed in scanners due to the fnc1 character is missing at the beginning. Tried to add the chr(241) at the beginning of the string, but still its not adding the fnc1. We should be able to decode it to the symbol character ]D2 as the fnc1 while reading through the scanners. Is there any solution on this?
I want to implement the function of using css to number the rows of my table automatically in my tcpdf. I do not know why it does not work. I did check it in a regular website it works perfectly. But i do not know why when i added it into my tcpdf it does not work at all. Does anyone know the solution to this problem? Please help me. Any advice will be appreciated. Thanks in advance. $htmlcontent .= '<style> table { counter-reset: rowNumber; } table tr.receiptcontent::before { display: table-cell;...
Is it possible to programmatically attach an action to a TextField using the $opt parameter(annotations array) ? I know it can be set directly in JavaScript: f.setAction( "Validate", 'myFunction(par1, par2...)' ); but I need to attach the action dynamically at the time of field creation. According to PDF32000_2008, section 12.5.6.19 (widget annotations), it appears that an "AA" dictionary refers to "An additional-actions dictionary defining the annotation's behavior in response to various trigger...
Is it possible to programmatically attach an action to a TextField using the $opt parameter (annotations array) ? I know it can be set directly in JavaScript: f.setAction( "Validate", 'myFunction(par1, par2...)' ); but I need to attach the action dynamically at the time of field creation. According to PDF32000_2008, section 12.5.6.19 (widget annotations), it appears that an "AA" dictionary refers to An additional-actions dictionary defining the annotation's behavior in response to various trigger...
I want to create a PDF report that lists the contents of a text field from a database. That database field contains UTF-8 encoded text populated by users from a web form. It could contain text in any language. English, Spanish, Arabic, Hebrew, Greek, Chinese, Japanese, Korean, Emoji etc etc etc. When I come to output that field using TCPDF I have absolutely no idea what language (or languages) is in that field. I'm telling TCPDF to use font arialuni (as per this https://stackoverflow.com/questions/14909006/multiple-language-in-tcpdf)...
Please add $file to alt array if (isset($_SERVER['SCRIPT_URI']) && !preg_match('%^(https?|ftp)://%', $file) && !preg_match('%^//%', $file) ) { $urldata = @parse_url($_SERVER['SCRIPT_URI']); return $urldata['scheme'].'://'.$urldata['host'].(($file[0] == '/') ? '' : '/').$file; $alt[]=$file; }
Please add $file to alt array if (isset($_SERVER['SCRIPT_URI']) && !preg_match('%^(https?|ftp)://%', $file) && !preg_match('%^//%', $file) ) { $urldata = @parse_url($_SERVER['SCRIPT_URI']); return $urldata['scheme'].'://'.$urldata['host'].(($file[0] == '/') ? '' : '/').$file; $alt[]=$file; }
Please add $file to alt array if (isset($_SERVER['SCRIPT_URI']) && !preg_match('%^(https?|ftp)://%', $file) && !preg_match('%^//%', $file) ) { $urldata = @parse_url($_SERVER['SCRIPT_URI']); return $urldata['scheme'].'://'.$urldata['host'].(($file[0] == '/') ? '' : '/').$file; **$alt[]=$file;** }
Answered my own question - the include file is in the examples folder included in the complete download, but not the min version I downloaded.
In the 10 years since this, have the install instructions disappeared? I can find the examples all over the place, but the installation process seems a mystery. example_001.php includes "require_once 'tcpdf_include.php'", but that file isn't included in the download. Running on XAMPP, if that matters/helps Thanks
I haven't this problem, If I use only image in the footer like this: $this->Image($myImage, 10, 280, 180, '', 'PNG', '', 'T', false, 300, '', false, false, 0, false, false, false);
Hello, I am trying to create a pdf with specific hmtl in footer. I add html content to my pdf body like this: $this->writeHTML($myHtml, true, false, true, false, ''); And I have a function to generate my custom footer: public function footer() { $this->writeHTMLCell(0, 0, '', -80, $this->specificHtmlFooter, 0, 1, 0, true, 'top', true); } The pdf body is superimposed on the footer :/ The footer heigth is not correctly calculated ? Any ideas ? thank's in advance
I attempt to draw the road with the spot shade literally and then upload that colour to pdf report with AddSpotColor method link getting no line in PDF however the spot shade affords in PDF supply code.
Sorry, I forgot to use code marks in my previous post ... I'm using TCPDF. I try to justify (left and right) text within a cell of a table with the following HTML code : $txt="<table><tr><td style=\"text-align:justify;\"> blablabla (a long text using several lines) ...</td></tr></table>"; text-align:right and text-align:left and text-align:center work well, but text-align:justify doesn't work. Result is like text-align:left. It should be left AND right aligned ! Is there something wrong on my syntaxe...
Hi I'm using TCPDF. I try to justify (left and right) text within a cell of a table with the following HTML code : $txt = " bla bla bla .... (a long text using several lines)..."; text-align:right and text-align:left and text-align:center work well, but text-align:justify doesn't work. Result is like text-align:left. It should be left AND right aligned ! Is there something wrong on my syntaxe ? Or is it an already known error ? Thanks,
It would be exceptional to see your window.Open javascript code. I became attempting a similar guide technique however I can't give anchor tags an identity or an onclick movement.
?
Hi Simon, no it is an SVG
Conversion from what? If this is html you could perform a regex relace using php.
hello, is it possible to replace a hex color during pdf conversion into a spot color with custom name and cmyk values?
I am stuck with a problem. I am working on a PDF document that displays position values (basically a bill) and now we need to add one line to each page that shows the carry over value like so: Position 1 - $1000 -> Page 1 -> $CarryOver=1000 Position 2 - $1000 -> Page 1-> $CarryOver=2000 Position 3 - $1000 -> Page 1-> $CarryOver=3000 AUTO-PAGEBREAK -> Show "Carry-Over = $3000" in Footer Position 4 - $1000 -> Page 1-> $CarryOver=4000 Position 5 - $1000 -> Page 1-> $CarryOver=5000 Position 6 - $1000...
I am stuck with a problem. I am working on a PDF document that displays position values (basically a bill) and now we need to add one line to each page that shows the carry over value like so: Position 1 - $1000 -> Page 1 -> $CarryOver=1000 Position 2 - $1000 -> Page 1-> $CarryOver=2000 Position 3 - $1000 -> Page 1-> $CarryOver=3000 AUTO-PAGEBREAK -> Show "Carry-Over = $3000" in Footer Position 4 - $1000 -> Page 1-> $CarryOver=4000 Position 5 - $1000 -> Page 1-> $CarryOver=5000 Position 6 - $1000...
Hi, I try to put a backround image in pdf in lettre US format and Landscape $diplomas->Image($img_file, 0, 0, 279, 216, '', '', '', false, 300, '', false, false); The image is in 300dpi, 3300x2550 and for printer 27,94x21,59 but the $w and $h are not applicate. The image stay smaller than it is Regards Chris
darn I tripple checked everything else and I didn;'t see that, thanks mate but I still get the error for some reason, sandbox shows that everything is ok but... Ok so I changed it entirly, I have a page that displays the a customer order with images etc and I have added a button to export this as a pdf. It's a simple table so when I am exporting this to a pdf I get only until the first I do not get the images in the table and also if the output has 2-3...10 table rows it only passes the first one....
darn I tripple checked everything else and I didn;'t see that, thanks mate but I still get the error for some reason, sandbox shows that everything is ok but...
That last line should surely be: return $output;
Hey guys I am having trouble connecting to the database when using TCPDF, the thread is similar that is why I am posting here, I created a button with an input lets say "product name" and send it with post to tcpdf_test.php and I am using code like this then <?php include('functions.php'); require_once('TCPDF/tcpdf.php'); if(isset($_POST["create_pdf"])){ $id=$_POST['id']; function fetch_data($id){ $output=''; $query="SELECT * FROM cart WHERE status= $id"; $proionta=$conn->query($query); foreach($proionta...
Hey guys I am having trouble connecting to the database when using TCPDF, the thread is similar that is why I am posting here, I created a button with an input lets say "product name" and send it with post to tcpdf_test.php and I am using code like this then function fetch_data($id){ $output=''; $query="SELECT * FROM cart WHERE status= $id"; $proionta=$conn->query($query); foreach($proionta as $proion){ $product = $proion['product_id']; $grammatoseira=LTRIM(RTRIM($proion['grammatoseira'])); $logo=LTRIM(RTRIM($proion['logo']));...
Hi I have problem with tcpdf pdf generator. I try to set different kind of bullet images for unordered list items (checklist: checked or unchecked image) my html: <ul> <li class='checked' ></li> <li class='unchecked' ></li> </ul> I can set both bullets with this css and works fine: ul.checked { list-style-type:img|png|5|5|../checked.png; } But this css is not working with list items ul li.checked{ list-style-type:img|png|5|5|../checked.png; } ul li.unchecked{ list-style-type:img|png|5|5|../unchecked.png;...
Hi I have problem with tcpdf pdf generator. I try to set different kind of bullet images for unordered list items (checklist: checked or unchecked image) my html: I can set both bullets with this css and works ok: ul.checked { list-style-type:img|png|5|5|../checked.png; } But this css is not working with list items ul li.checked{ list-style-type:img|png|5|5|../checked.png; } ul li.unchecked{ list-style-type:img|png|5|5|../unchecked.png; } Have anyone solution how to solve this problem with TCPDF...
4 years on and this is still happening, update please!?
Got the same error. Replace the if(is_numeric($c)) block with a simple $c = intval($c); as recommended here https://github.com/deltaaskii/lara-pdf-merger/pull/45/files/ec44e3bf2ae9d47a27ff64ce310c5c7c15e5a4b2 That worked for me.
Got the same error. remove the if(is_numeric($c)) statement then the change from return chr($c); to return chr(ord($c)); worked for me.
Hello how to Rotated Table Column Headers like this: this my party of code: <?php $content.' <table border="0.6" cellpadding="2" cellspacing="2"> <tr> <th></th> <th>texte1</th> <th>texte2</th> <th>texte3</th> <th>texte4</th> </tr> <tr> <td>a<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>b<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>c<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>d<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>e<td> <td><td> <td><td> <td><td> <tr> </tr> <tr>...
Hello how to Rotated Table Column Headers like this: this my party of code: <?php $content.' <table border="0.6" cellpadding="2" cellspacing="2"> <tr> <th></th> <th>texte1</th> <th>texte2</th> <th>texte3</th> <th>texte4</th> </tr> <tr> <td>a<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>b<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>c<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>d<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>e<td> <td><td> <td><td> <td><td> <tr> </tr> <tr>...
Hello how to Rotated Table Column Headers like this: this my party of code: <?php $content.' <table border="0.6" cellpadding="2" cellspacing="2"> <tr> <th></th> <th>texte1</th> <th>texte2</th> <th>texte3</th> <th>texte4</th> </tr> <tr> <td>a<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>b<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>c<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>d<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>e<td> <td><td> <td><td> <td><td> <tr> </tr> <tr>...
Hello how to Rotated Table Column Headers like this: ) this my party of code: <?php $content.' <table border="0.6" cellpadding="2" cellspacing="2"> <tr> <th></th> <th>texte1</th> <th>texte2</th> <th>texte3</th> <th>texte4</th> </tr> <tr> <td>a<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>b<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>c<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>d<td> <td><td> <td><td> <td><td> <tr> </tr> <tr> <td>e<td> <td><td> <td><td> <td><td> <tr> </tr> <tr>...
anyone solve the problem?
(table cellpadding="6" border="1") (tr style="background-color: #c5183d; color: white;")(/tr) (/table)
writeHtml() with tables
I've got the solution for this problem don't know is this the best approach or not but it work. public static function unichr($c, $unicode=true) { if(is_numeric($c)) { if (!$unicode) { return chr($c); } elseif ($c <= 0x7F) { // one byte return chr($c); } elseif ($c <= 0x7FF) { // two bytes return chr(0xC0 | $c >> 6).chr(0x80 | $c & 0x3F); } elseif ($c <= 0xFFFF) { // three bytes return chr(0xE0 | $c >> 12).chr(0x80 | $c >> 6 & 0x3F).chr(0x80 | $c & 0x3F); } elseif ($c <= 0x10FFFF) { // four bytes...
I want to print the statements of a class of 20 students. When I start printing the top of the page only appears on the first reading but does not appear on the other pages. However, space is left for this. How do I make them appear everywhere? An example in attachment
I want to print the statements of a class of 20 students. When I start printing the top of the page only appears on the first reading but does not appear on the other pages. However, space is left for this. How do I make them appear everywhere?