Skip to content
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 ERROR #41

Open
renatobez opened this issue Feb 16, 2023 · 9 comments
Open

TCPDF ERROR #41

renatobez opened this issue Feb 16, 2023 · 9 comments
Assignees
Labels
question Further information is requested

Comments

@renatobez
Copy link

I installed the plugin and until then it was printing normally glpi, now this error is appearing and I don't know how to solve it:
TCPDF ERROR: Some data has already been output, can't send PDF file

@yllen
Copy link
Owner

yllen commented Mar 7, 2023

Version of GLPI?
Version of the plugin?
Which fields do you want to print in PDF and for which item?

@renatobez
Copy link
Author

GLPI: GLPI 10.0.5
Plugin: 3.0.0
I'm trying to print the page of a ticket, using the side tab of the plugin, when I click on generate pdf, it causes an error.

@yllen
Copy link
Owner

yllen commented Mar 8, 2023

Which part of the ticket do you want to print?

@renatobez
Copy link
Author

image
basically all ticket fields

@yllen
Copy link
Owner

yllen commented Mar 10, 2023

can you give me errors in glpi php-error.log? (in files directory/_logs)

@yllen
Copy link
Owner

yllen commented Mar 17, 2023

You have this error where some data are missing in the export. You have the complete error in glpi logs

@yllen yllen self-assigned this Mar 17, 2023
@yllen yllen added the question Further information is requested label Mar 17, 2023
@renatobez
Copy link
Author

yes basically these are the error messages:

[2023-02-10 08:22:13] glpiphplog.WARNING: *** PHP Warning (2): include_once(): Failed opening '/var/www/html/glpi/plugins/pdf/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/glpi/plugins/pdf/setup.php at line 38
Backtrace :
plugins/pdf/setup.php:38 include_once()
src/Plugin.php:294 plugin_init_pdf()
src/Plugin.php:248 Plugin::load()
inc/includes.php:86 Plugin->init()
ajax/actorinformation.php:39 include()

[2023-02-10 08:22:13] glpiphplog.WARNING: *** PHP Warning (2): include_once(/var/www/html/glpi/plugins/pdf/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/glpi/plugins/pdf/setup.php at line 38
Backtrace :
plugins/pdf/setup.php:38 include_once()
src/Plugin.php:294 plugin_init_pdf()
src/Plugin.php:248 Plugin::load()
inc/includes.php:86 Plugin->init()
ajax/comments.php:37 include()

[2023-02-10 08:22:13] glpiphplog.WARNING: *** PHP Warning (2): include_once(): Failed opening '/var/www/html/glpi/plugins/pdf/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/glpi/plugins/pdf/setup.php at line 38
Backtrace :
plugins/pdf/setup.php:38 include_once()
src/Plugin.php:294 plugin_init_pdf()
src/Plugin.php:248 Plugin::load()
inc/includes.php:86 Plugin->init()
ajax/comments.php:37 include()

[2023-02-10 08:22:15] glpiphplog.WARNING: *** PHP Warning (2): include_once(/var/www/html/glpi/plugins/pdf/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/glpi/plugins/pdf/setup.php at line 38
Backtrace :
plugins/pdf/setup.php:38 include_once()
src/Plugin.php:294 plugin_init_pdf()
src/Plugin.php:248 Plugin::load()
inc/includes.php:86 Plugin->init()
front/helpdesk.public.php:38 include()

@yllen
Copy link
Owner

yllen commented Nov 7, 2023

Which directory had you upload her:https://github.com/yllen/pdf/releases?
You must already upload the first one glpi-pdf-3.0.0.tar.gz

@ratado
Copy link

ratado commented Dec 14, 2023

I´m using GLPI 10.0.10 and plugin Print with version 3.0.0. I had the same error. I fix this including the command bellow in common.class.php file, on line 418:

final function generatePDF($tab_id, $tabs, $page=0, $render=true) {
...
      ob_end_clean(); /* Fix error of TCPDF */
      if($render) {
         $this->pdf->render();
      } else {
         return $this->pdf->output();
      }
}

Could you evaluate this solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants