Comments (33)
Hello. Any update on an possible release date ?
from tc-lib-pdf.
What about php 8.0 ???
from tc-lib-pdf.
Hi, thank you for the help offers.
People can contribute either via PR or sending donations following the link in the README.md.
The overall project is almost complete but I struggle to find the time to complete the core functions in the main library.
All the dependency libraries are complete and some of them can also be used with the old TCPDF library:
- tc-lib-barcode
- tc-lib-color
- tc-lib-pdf-image
- tc-lib-pdf-font
- tc-lib-file
- tc-lib-pdf-encrypt
- tc-lib-unicode-data
- tc-lib-unicode
- tc-lib-pdf-page
- tc-lib-pdf-graph
The main library (tc-lib-pdf) can now build a blank page.
The aim is to complete the Output.php file first and then start adding the basic functions to print a text cell, etc.
In the Output file the incomplete functions have an empty body and they are marked with a @todo comment.
from tc-lib-pdf.
That is best project for PDF in php, do you need some help with it?
from tc-lib-pdf.
Any news on this?
from tc-lib-pdf.
@semaex a 3rd party patch is available, but @nicolaasuni has indicated that no patches will be accepted upstream because TCPDF is "frozen"
from tc-lib-pdf.
@gerardreches Using with PHP 7.4 for a long time, not facing any problems with my use cases.
from tc-lib-pdf.
I had a reference to that repository but after double-checking, I'm actually using "tecnickcom/tcpdf": "dev-main",
in my composer.json
files, so the development branch of that package.
from tc-lib-pdf.
The old library should support PHP7, I merged some changes recently.
The new library is currently progressing very slowly because I am quite busy but more than 90% of the code is there (now spread across independent libraries).
from tc-lib-pdf.
Note that the current version of the new library has an example that generates a blank page!
There are some ready methods also to add fonts, graphics and barcodes but some essential methods for text are still missing.
from tc-lib-pdf.
i have been using the old library on php 7.0 in production for months without (php7-related) problems, so yeah, it supports PHP7 just fine.
from tc-lib-pdf.
Thank you for the information.
So its best to use the old version.
Are there still plans to finish this new version?
thank you for all your efforts and best regards
from tc-lib-pdf.
@mklemarczyk the current status, the way i see it (and use it) is: the old lib is production ready, the new lib is not. so yeah, unless you're planning on helping out the development of the new version, use the old version for now.
from tc-lib-pdf.
Hi,
I have a project with old tecnickcom/tcpdf and with new php 7.2 version it doesn't work anymore.
each() method used in tcpdf.php file is deprecated.
@nicolaasuni is possible to update old version? I know is not manteined anymore but I think is a small bug and the new version is not ready yet...
Thanxs for this good library ;)
from tc-lib-pdf.
@semaex you can simply apply this patch:
diff --git a/tcpdf.php b/tcpdf.php
old mode 100755
new mode 100644
index 65196e7..89223d0
--- a/tcpdf.php
+++ b/tcpdf.php
@@ -12582,7 +12582,7 @@ class TCPDF {
$k = $this->k;
$this->javascript .= sprintf("f".$name."=this.addField('%s','%s',%u,[%F,%F,%F,%F]);", $name, $type, $this->PageNo()-1, $x*$k, ($this->h-$y)*$k+1, ($x+$w)*$k, ($this->h-$y-$h)*$k+1)."\n";
$this->javascript .= 'f'.$name.'.textSize='.$this->FontSizePt.";\n";
- while (list($key, $val) = each($prop)) {
+ foreach($prop as $key => $val) {
if (strcmp(substr($key, -5), 'Color') == 0) {
$val = TCPDF_COLORS::_JScolor($val);
} else {
@@ -16545,7 +16545,7 @@ class TCPDF {
// get attributes
preg_match_all('/([^=\s]*)[\s]*=[\s]*"([^"]*)"/', $element, $attr_array, PREG_PATTERN_ORDER);
$dom[$key]['attribute'] = array(); // reset attribute array
- while (list($id, $name) = each($attr_array[1])) {
+ foreach($attr_array[1] as $id => $name) {
$dom[$key]['attribute'][strtolower($name)] = $attr_array[2][$id];
}
if (!empty($css)) {
@@ -16558,7 +16558,7 @@ class TCPDF {
// get style attributes
preg_match_all('/([^;:\s]*):([^;]*)/', $dom[$key]['attribute']['style'], $style_array, PREG_PATTERN_ORDER);
$dom[$key]['style'] = array(); // reset style attribute array
- while (list($id, $name) = each($style_array[1])) {
+ foreach($style_array[1] as $id => $name) {
// in case of duplicate attribute the last replace the previous
$dom[$key]['style'][strtolower($name)] = trim($style_array[2][$id]);
}
from tc-lib-pdf.
Thanxs MacGritsch. I know how to solve this bug but I need the changes persist in oficial repo because my deploy system with composer downloads directly from authors repo.
Any ideas?
from tc-lib-pdf.
@semaex you could create a (private) fork, apply the patch and use that fork in your composer files.
from tc-lib-pdf.
@MacGritsch @divinity76 Thanxs for ideas, I'll do this ;)
from tc-lib-pdf.
Looking forward to the release of the new library. What is the best way to troubleshoot PDF corruption using the old tcpdf? Sometimes the PDF exports correctly and sometimes it is corrupted. No error is generated so I'm stuck as to what is causing it.
from tc-lib-pdf.
Could someone tell me where to look for some basic up-to-date samples? https://tcpdf.org/examples/ are all based on an older version of the library, example in this project only shows creating a blank page, but nothing regarding adding some text, adding some graphics, adding a barcode, ...
from tc-lib-pdf.
@semaex you can also use the official repository and use https://github.com/cweagans/composer-patches to patch the files with composer.
from tc-lib-pdf.
thanxs to everyone ;)
from tc-lib-pdf.
Are there ways to offer some support to this project besides coding?
from tc-lib-pdf.
Any news? :)
from tc-lib-pdf.
@nicolaasuni Do you have any list of release blocker tasks?
from tc-lib-pdf.
@nicolaasuni let us know how we can help, please
from tc-lib-pdf.
Super news, I will take a look in a free time to try to help with finishing the library.
from tc-lib-pdf.
I need to generate PDF certificates on my site using PHP (using PHP 7.4). Does someone know if this library already works or if the old one is compatible with PHP 7.4?
Thanks!
from tc-lib-pdf.
@gerardreches Using with PHP 7.4 for a long time, not facing any problems with my use cases.
Hi Xavier!
Are you talking about this library (the new one under development) or the old one (stable)?
Thanks!
from tc-lib-pdf.
I had a reference to that repository but after double-checking, I'm actually using
"tecnickcom/tcpdf": "dev-main",
in mycomposer.json
files, so the development branch of that package.
I will give it a try then, thank you!
from tc-lib-pdf.
I need to generate PDF certificates on my site using PHP (using PHP 7.4). Does someone know if this library already works or if the old one is compatible with PHP 7.4?
Thanks!
have you a solution ??
from tc-lib-pdf.
@mahouha Please read my answer following the question, from April last year. in short: it works! just use dev-main in your composer.json
from tc-lib-pdf.
Old version also works with PHP 8.x
from tc-lib-pdf.
Related Issues (20)
- PDF/X-4 support planned? HOT 1
- Support for PDF/UA HOT 2
- Feature Request: to support MathML <math> tags
- Raise PHP requirements HOT 3
- This project is abandoned ??? HOT 1
- Is the lib ready to use HOT 4
- Will this library support Urdu language fonts? HOT 2
- pkcs11 based signature is not supported
- how can i install tc-lib-pdf by offline HOT 2
- Is it support PDF/A-3 HOT 2
- Support for multiple digital signature HOT 4
- how do I retrieve a list of all available fonts? HOT 1
- tcpdf cyrillic letters displayed as question marks "?" HOT 1
- External images with presigned url from amazon s3 service fail to load.
- External images with presigned url from amazon s3 service fail to load. HOT 1
- the project is not usable : Missing at least 2 properties HOT 2
- There is no documentations for this project , the exist one is old HOT 1
- Two signatures in the same PDF HOT 5
- Simple text example HOT 2
- How do I add text to a document? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tc-lib-pdf.