New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCPDF Integration #10
Comments
From luca.pri...@gmail.com on May 20, 2009 18:42:17 |
From ryan.mas...@gmail.com on May 20, 2009 18:46:01 |
From eclecticgeek on May 20, 2009 18:51:46 |
From luca.pri...@gmail.com on May 20, 2009 22:16:35 |
From luca.pri...@gmail.com on May 22, 2009 22:56:04
|
From luca.pri...@gmail.com on May 25, 2009 20:51:09 All the DOMPDF samples run, but the output not always looks exactly the same as TCPDF does not seem to support template objects. I have tried a couple of So far, I have tested using only Helvetica and Times-Roman fonts. TCPDF also does not seem to distinguish between lines and fill transparency, so that I am still testing. At which point should I submit the source code? An attachment |
From gaplev...@gmail.com on July 27, 2009 20:06:27 |
From carlshol...@gmail.com on April 09, 2010 15:49:45 |
From luca.pri...@gmail.com on April 19, 2010 18:49:08 The TCPDF version I used is 4.9.012. The DOMPDF version was taken from the SVN on I have added the following files and directories to the project tree: include/tcpdf_adapter.cls.php (the TCPDF adapter) I have also made some minor changes to the DOMPDF files, essentially to take into In the tests/ dir you will find a python script (tests.py) that runs all the tests I have also added a couple of command line options to dompdf.php to help the debugging. This library must be considered a very very very ... early work. I have worked There are few implementation details to point out:
In the end I hope that this can be of some use to someone Bye Luca |
From luca.pri...@gmail.com on April 24, 2010 08:40:11 |
From fabien.menager on April 24, 2010 10:28:06 |
From d.sandi...@gmail.com on April 21, 2011 04:31:28 |
From fabien.menager on April 21, 2011 06:16:02 |
From d.sandi...@gmail.com on April 21, 2011 06:35:47 But it does not render "©" that means copy right symbol and it prints |
From eclecticgeek on April 21, 2011 18:44:56 $text2 = html_entity_decode("Copyright © 2011 MiningIQ. All rights reserved.", ENT_QUOTES, 'UTF-8'); (if UTF-8 doesn't work, try 'iso-8859-1') |
From d.sandi...@gmail.com on April 22, 2011 09:33:22 $text2 = html_entity_decode("Copyright © 2011 MiningIQ. All rights reserved.", ENT_QUOTES, 'iso-8859-1'); and it wors for me!. |
From d.sandi...@gmail.com on April 22, 2011 09:35:57 |
From eclecticgeek on April 22, 2011 14:12:24 However, a minor change to the adapter written by Luca should help with your particular issue. Add the following code to the class definition contained within tcpdf_adapter.cls.php: function get_pdflib() { return $this->_pdf; } Now, in your inline script you can access the TCPDF class (and all its methods and properties) directly: $pdf->get_tcpdf(); Or from the script where you instantiate DOMPDF (after you call $dompdf->render()): $dompdf->get_canvas()->get_tcpdf(); |
From d.sandi...@gmail.com on April 25, 2011 05:08:27 def("DOMPDF_PDF_BACKEND", "TCPDF"); and in tcpdf_adapter.cls.php , I have used this code:- function get_pdflib() { return $this->_pdf; } but gives me this error:- " Fatal error: Declaration of TCPDF_Adapter::get_text_width() must be What should I do now? |
From sandipgh...@indusnet.co.in on May 02, 2011 12:44:45 |
From rakesh.g...@gmail.com on November 10, 2011 13:44:52 |
I can't see the point in integrating TCPDF, as I find this library too much heavy and really badly written. CPdf suits largely better for dompdf. |
@PhenX I think it'd be nice to support a wider range of rendering libraries, but I'm inclined to agree. You're not the first to comment on the difficulty of supporting TCPDF. Few people using dompdf will need a library other than CPDF or PDFLib (though obviously there's a contingent out there that would still like to see TCPDF supported). |
@bsweeney in fact I dont see the point in supporting other libraries. If Cpdf is not enough, why not work on it? |
@PhenX don't get me wrong. I don't disagree. There's little point right now in devoting efforts on supporting other libraries when we have so much other work to do. I guess I look at it as more of a nice possibility, especially if a library similar to PDFLib (but perhaps open source) can be integrated. But I look at this as more of an academic value (the modularization of the back end) not something we need to continue working on to the detriment of other needs. |
…owed path(s) Hello! So I had a weird error in my Laravel project using the libs `dompdf/dompdf`, `barryvdh/laravel-dompdf` and `laraveldaily/laravel-invoices` The function `Dompdf\\Cpdf->openFont()` were called with an empty $font, it was on shared hosting with open_basedir restrictions. Here is the full stacktrace: ``` [2021-10-20 20:23:47] production.INFO: FONT LOADED: /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/fonts/Helvetica [2021-10-20 20:23:47] production.INFO: FONT LOADED: /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/fonts/DejaVuSans [2021-10-20 20:23:47] production.INFO: FONT LOADED: /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/fonts/Times-Bold [2021-10-20 20:23:47] production.INFO: FONT LOADED: /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/fonts/DejaVuSans-Bold [2021-10-20 20:23:47] production.INFO: FONT LOADED: [2021-10-20 20:23:47] production.ERROR: file_exists(): open_basedir restriction in effect. File(/.ufm) is not within the allowed path(s): (/:/tmp/) {"userId":1,"exception":"[object] (ErrorException(code: 0): file_exists(): open_basedir restriction in effect. File(/.ufm) is not within the allowed path(s): (/:/tmp/) at /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/Cpdf.php:3341) [stacktrace] #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError() dompdf#1 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/Cpdf.php(3341): file_exists() dompdf#2 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/Cpdf.php(3549): Dompdf\\Cpdf->openFont() dompdf#3 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/Adapter/CPDF.php(1030): Dompdf\\Cpdf->selectFont() dompdf#4 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/FontMetrics.php(327): Dompdf\\Adapter\\CPDF->get_text_width() dompdf#5 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/FontMetrics.php(294): Dompdf\\FontMetrics->getTextWidth() dompdf#6 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/PhpEvaluator.php(53) : eval()'d code(6): Dompdf\\FontMetrics->get_text_width() dompdf#7 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/PhpEvaluator.php(53): eval() dompdf#8 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/PhpEvaluator.php(61): Dompdf\\PhpEvaluator->evaluate() dompdf#9 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/Renderer.php(293): Dompdf\\PhpEvaluator->render() dompdf#10 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/Renderer.php(138): Dompdf\\Renderer->_render_frame() dompdf#11 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/Renderer.php(194): Dompdf\\Renderer->render() dompdf#12 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/FrameReflower/Page.php(148): Dompdf\\Renderer->render() dompdf#13 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(895): Dompdf\\FrameReflower\\Page->reflow() dompdf#14 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/Dompdf.php(838): Dompdf\\FrameDecorator\\AbstractFrameDecorator->reflow() dompdf#15 /httpdocs/plugins/invoicepro/vendor/barryvdh/laravel-dompdf/src/PDF.php(208): Dompdf\\Dompdf->render() dompdf#16 /httpdocs/plugins/invoicepro/vendor/barryvdh/laravel-dompdf/src/PDF.php(155): Barryvdh\\DomPDF\\PDF->render() ``` The `FONT LOADED` part was to log the current font and was placed just above where the error was at `Cpdf.php(3341)`
…owed path(s) Hello! So I had a weird error in my Laravel project using the libs `dompdf/dompdf`, `barryvdh/laravel-dompdf` and `laraveldaily/laravel-invoices` The function `Dompdf\\Cpdf->openFont()` were called with an empty $font, it was on shared hosting with open_basedir restrictions. Here is the full stacktrace: ``` [2021-10-20 20:23:47] production.INFO: FONT LOADED: /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/fonts/Helvetica [2021-10-20 20:23:47] production.INFO: FONT LOADED: /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/fonts/DejaVuSans [2021-10-20 20:23:47] production.INFO: FONT LOADED: /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/fonts/Times-Bold [2021-10-20 20:23:47] production.INFO: FONT LOADED: /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/fonts/DejaVuSans-Bold [2021-10-20 20:23:47] production.INFO: FONT LOADED: [2021-10-20 20:23:47] production.ERROR: file_exists(): open_basedir restriction in effect. File(/.ufm) is not within the allowed path(s): (/:/tmp/) {"userId":1,"exception":"[object] (ErrorException(code: 0): file_exists(): open_basedir restriction in effect. File(/.ufm) is not within the allowed path(s): (/:/tmp/) at /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/Cpdf.php:3341) [stacktrace] #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError() dompdf#1 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/Cpdf.php(3341): file_exists() dompdf#2 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/lib/Cpdf.php(3549): Dompdf\\Cpdf->openFont() dompdf#3 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/Adapter/CPDF.php(1030): Dompdf\\Cpdf->selectFont() dompdf#4 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/FontMetrics.php(327): Dompdf\\Adapter\\CPDF->get_text_width() dompdf#5 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/FontMetrics.php(294): Dompdf\\FontMetrics->getTextWidth() dompdf#6 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/PhpEvaluator.php(53) : eval()'d code(6): Dompdf\\FontMetrics->get_text_width() dompdf#7 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/PhpEvaluator.php(53): eval() dompdf#8 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/PhpEvaluator.php(61): Dompdf\\PhpEvaluator->evaluate() dompdf#9 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/Renderer.php(293): Dompdf\\PhpEvaluator->render() dompdf#10 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/Renderer.php(138): Dompdf\\Renderer->_render_frame() dompdf#11 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/Renderer.php(194): Dompdf\\Renderer->render() dompdf#12 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/FrameReflower/Page.php(148): Dompdf\\Renderer->render() dompdf#13 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(895): Dompdf\\FrameReflower\\Page->reflow() dompdf#14 /httpdocs/plugins/invoicepro/vendor/dompdf/dompdf/src/Dompdf.php(838): Dompdf\\FrameDecorator\\AbstractFrameDecorator->reflow() dompdf#15 /httpdocs/plugins/invoicepro/vendor/barryvdh/laravel-dompdf/src/PDF.php(208): Dompdf\\Dompdf->render() dompdf#16 /httpdocs/plugins/invoicepro/vendor/barryvdh/laravel-dompdf/src/PDF.php(155): Barryvdh\\DomPDF\\PDF->render() ``` The `FONT LOADED` part was to log the current font and was placed just above where the error was at `Cpdf.php(3341)`
Original author: ryan.mas...@gmail.com (April 29, 2009 18:07:12)
What would you like dompdf to do:
Use TCPDF (http://sourceforge.net/projects/tcpdf) instead of
R&OS because the former supports UTF-8.
Original issue: http://code.google.com/p/dompdf/issues/detail?id=3
The text was updated successfully, but these errors were encountered: