Giter Club home page Giter Club logo

pdf's People

Contributors

anthonymontebrun avatar cconard96 avatar cedric-anne avatar rom1-b avatar yllen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pdf's Issues

Screenshot on ticket aren't generated on Pdf

Hello,

We use "Impression PdF" in french for generate printing format and add on meeting's report.
But screenshot added on ticket aren't generated on PdF.

Can you help us ?
Tks and have a good day

Christelle

Cannot print Changes with items

GLPI 10.0.9
PDF 3.0.0

When printing a Change and include the items tab you get a white page (no output), in debugging mode the following error is shown:

Uncaught Exception TypeError: Toolbox::stripTags(): Argument #1 ($str) must be of type string, null given, called in /glpi_root/marketplace/pdf/inc/change_item.class.php on line 122 in /glpi_root/src/Toolbox.php at line 3162

Uncaught Exception Error: Call to undefined method ComputerVirtualMachine::getUUIDRestrictRequest()

GLPI Version: 9.5.7
Plugin version: 2.0.0

I'm getting this error using the plugin Uninstall, and this one reference to plugin PDF, I don't know in which one is the error:

Uncaught Exception Error: Call to undefined method ComputerVirtualMachine::getUUIDRestrictRequest() in /var/www/html/glpi/plugins/pdf/inc/computervirtualmachine.class.php at line 104

image

This is the log from php-error.log

PDF: don't know how to display _main_ tab\n2022-03-24 17:30:54 [7@glpi]
PDF: don't know how to display Impact$1 tab\n[2022-03-24 17:30:56] glpiphplog.CRITICAL:   *** Uncaught Exception Error: Call to undefined method ComputerVirtualMachine::getUUIDRestrictRequest() in /var/www/html/glpi/plugins/pdf/inc/computervirtualmachine.class.php at line 104
  Backtrace :
  plugins/pdf/inc/computer.class.php:136             PluginPdfComputerVirtualMachine::pdfForComputer()
  plugins/pdf/inc/common.class.php:382               PluginPdfComputer::displayTabContentForPDF()
  marketplace/uninstall/inc/replace.class.php:104    PluginPdfCommon->generatePDF()
  marketplace/uninstall/front/action.php:54          PluginUninstallReplace::replace()

Add fields to pdf

Hello,

Some fields are not print in the pdf, for example in Help/change the content of fields "plans" or "list of verifications" are not print.
How can i add these fields to the print please ?

Generated PDF comes blank

Hi there,
I'm running GLPI v9.5.7 on Debian and PHP 7.3.27.
I made an fresh install of PDF plugin on my HOM environment and I'm facing the problem below:

On bulk printing (tickets or assets) the generated PDF comes blank, only showing the page numbers but the body comes empty.
Returning to GLPI central it shows an error notification popup that says "Failed Operation".
On my ../glpi/files/_log/php-errors.log I get the errors below while attemping to generate PDFs:

[2022-05-10 08:51:51] glpiphplog.WARNING: *** PHP Warning (2): Invalid argument supplied for foreach() in /var/www/html/glpi/plugins/pdf/inc/common.class.php at line 373
Backtrace :
plugins/pdf/front/export.massive.php:64 PluginPdfCommon->generatePDF()

I already tried to enforce write attributes to the plugin's directory and full permissions to apache user, but the error stands still.

Request for an update: Add pdf hook for Suppliers

Hi Yllen and everyone,
Would it be possible to extend the use of the PDF plugin on SUPPLIER objects. It 's to extract a global view of a supplier, its contacts, its contracts, its orders...
Thanks :)

Object not found - 404 error

Hi!

I faced with the issue. I have fresh installation of glpi 10.0.6 and pdf 3.0.0. After install it worked ok, but after ~1 moth of not using I tried Print to PDF function and server returns "Object not found" 404 error.

I have noticed, that similar to the issue #27 the print from Action button is not working, while Print to PDF works ok from menu on the left in the ticket.

I have searched in php_error.log. As expected, it's clean.

Reinstallation of plugin does not help. However I have noticed, that during uninstllation of the plugin it gives some errors in php-error.log. See it below:

[2023-05-11` 10:32:07] glpiphplog.WARNING: *** PHP Warning (2): include_once(/srv/www/htdocs/marketplace/pdf/inc/preferences.class.php): failed to open stream: No such file or directory in /srv/www/htdocs/marketplace/pdf/hook.php at line 83
Backtrace :
marketplace/pdf/hook.php:83 include_once()
src/Plugin.php:783 plugin_pdf_uninstall()
front/plugin.form.php:60 Plugin->uninstall()

[2023-05-11 10:32:07] glpiphplog.WARNING: *** PHP Warning (2): include_once(): Failed opening '/srv/www/htdocs/marketplace/pdf/inc/preferences.class.php' for inclusion (include_path='/srv/www/htdocs/marketplace/barcode/vendor/pear/archive_tar:/srv/www/htdocs/marketplace/barcode/vendor/pear/console_getopt:/srv/www/htdocs/marketplace/barcode/vendor/pear/image_barcode:/srv/www/htdocs/marketplace/barcode/vendor/pear/pear:/srv/www/htdocs/marketplace/barcode/vendor/pear/structures_graph:/srv/www/htdocs/marketplace/barcode/vendor/pear/xml_util:.:/usr/share/php7:/usr/share/php7/PEAR') in /srv/www/htdocs/marketplace/pdf/hook.php at line 83
Backtrace :
marketplace/pdf/hook.php:83 include_once()
src/Plugin.php:783 plugin_pdf_uninstall()
front/plugin.form.php:60 Plugin->uninstall()

Change GLPI logo

Change GLPI logo

hi yllen

A proposal to improve the plugin would be to create a field on the plugin's configuration page to allow you to upload an image file to change the original GLPI logo.

It would be possible?

TCPDF ERROR: [Image] Unable to get the size of the image

Hi support team, i have an issue with the lastest pdf plugin (2.0.0) with GLPI 9.5.6

Under some ticket, unable to pdf print, i have this kind of message. I f i choose another table, it's ok
image
image

but even if i chosse ticket or traitement du ticket, i have the issue. I think it is in relationship with images inside ticket

I think there is some bugs with images into the ticket. If i choose another ticket without images it's OK.

Images in the pdf file are not displayed

I would like to suggest a feature or fix for the PDF plugin. Both in version 9.5 to 10.0.2 of GLPi, the images that are attached in the comments of the tickets are not displayed, I can only see the text of the ticket.

image

Include fields plugin with values

Hi there,

I noticed that the additionalfields related to equipment aren't currently being included in the reports.

It would be immensely beneficial for community and potentially other users if these fields could be incorporated into the report generation. The additionalfields provide critical context and data that would enhance the quality and comprehensiveness of the reports.

I understand that there are various considerations when updating functionalities, and I'd be happy to provide further details or examples if needed.

Thank you for your continuous efforts and dedication to improving the tool. I appreciate any consideration you can give to this request.

Problems after updating to GLPI 10.0.11

When sending to print in PDF, it does not translate the Technician in charge and Group in charge fields into Spanish.
uninstall and clean the plugin in GLPI
Perform the installation and activation locally again, downloading the plugin and copying it to the glpi\plugins folder and downloading from the Marketplace, now the plugin does not appear, it literally disappeared, it is installed and activated.

Print to PDF Setup problem

Hello, when the new print to pdf plugin for GLPI 10.0.0... was released, I also updated my old GLPI to version 10.0.0, because this is the only plugin I needed for GLPI. After updating there are some problems. First of all, PDF plugin is not showing in the new GLPI ''Marketplace'', but that is ok, I imported it manually. Secondly in GLPI Setup menu I cannot edit and configure anything, I can only choose Currency for no reason.
Screenshot_1
I tried this plugin with all of new GLPI 10 versions, every one of them has this problem. Now I am wondering, maybe this is how it is supposed to be and I have to configure PDF layout somewhere else ?
Thank you.

Error in plugin

Hello.
I'm having problems with the plugin follow mensage:
"TCPDF ERROR: [Image] Unable to get the size of the image: .../front/document.send.php?docid=571&tickets_id=2022010366"

I already increased the PHP memory but without sucess.
You can help.

Print to PDF not working

Hi,

I get this error when debug mode is turned on:

PHP Notice (8): Undefined index: container in /home/XXXXXXXXXX/public_html/glpi/plugins/pdf/inc/common.class.php at line 517

And then if fails with "Error - Failed operation" popup.

Same on assets, tickets...

GLPI version is 10.0.3
Plugin version is 2.1.0

Please help!

Thanks,
Goran

TCPDF ERROR: [Image] Unable to get the size of the image when trying to export a ticket to PDF

BUG DESCRIPTION

"PDF PRINT: TCPDF ERROR: [Image] Unable to get the size of the image: https://localhost/glpi/plugins/pdf/front/export.php"

Hi support team, i have an issue with the lastest pdf plugin (2.1.0) with GLPI 10.0.1 (downloaded from "https://plugins.glpi-project.org/#/plugin/pdf" ) when trying to export a ticket to PDF.

IMPORTANT:
It only occurs when "Ticket" has attached images, or emails on it--> If I try to generate a PDF file from a ticket that has no e-mails/images attached, the plugin works fine.

image

Could you please help me with this issue, please?
I can sent you logs if you tell me the name of lof file, paths, commands to execute (if necessary)
I remember when I was working with GLPI v9.5 (and pdf v2.0) it worked fine. An it was fantastic!

CLARIFICATION:
I had the SAME problem since I updated to GLPI v10.0.0 with the lastest "pdf plugin (2.1.0)"
In other words, the problem already existed with GLPI v10.0.0 with "pdf plugin (2.1.0)"

So, I tried to update to GLPI v10.0.1 to see if the upgrade to the latest version coud fix that problem with the plugin, but the problem persists.
The PDF conversion plugin is a really fantastic plugin when it is working fine.
I would strongly appreciate it if you could help me solve with this issue.

Thanks in advance!

Mise en page

Bonjour
Nous rencontrons un probléme de mise en page suite à impression PDF de réponse à un ticket.
La mise en page en pdf semble ne pas tenir compte des retours à la ligne.

misenpage1

miseenpagepdf

Merci d'avance pour vos réponses .
Cordialement

insert in the PDF export, a text field

Hello friends, can you help me to be able to introduce a fixed text field in this pluginns, I would like to use this plugins to deliver a document "I hereby state that I received from the company, the following computer equipment, credentials of access to internal systems and cellular equipment for the exclusive use of performing my work activities"

Error in plugin PDF for GLPi

Hi.

I'm having problem with plugin PDF, follow error:
"TCPDF ERROR: [Image] Unable to get the size of the image"

Error print:
Capturar

You can help?

PDF 3.0.0 : Unable to print when selecting a network port

Version GLPI 10.0.7
Version PDF 3.0.0
Version PHP 8.1.18

Hello,

When i select networkport and i click printer ( example printer PDF computer )
image

I have this error in this url : MyIP/glpi/marketplace/pdf/front/export.php
image

and If i refresh this page, i have the blanck page with a message "Missing context"

If i select without networkport its ok, I can print PDF
image

display main item before processing

Hi,

Since upgrade to GLPI 9.5.9 and pdf 2.0.1, order of elements "Tickets", "Traitement du Tickets" are not in same order.
We have now first Tasks and at the end of doc, Ticket description.
Is it possible to change that ?

Thanks for your help.
Regards,
Renoow.

blank page

Hello,
I have a blank page when I want to export to PDF.
Version 2.1.0
GLPI: 10.0.3
Log PHP :
[2022-10-25 09:30:22] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "serial" in /var/www/html/glpi/plugins/pdf/inc/item_ticket.class.php at line 121
Backtrace :
plugins/pdf/inc/ticket.class.php:522 PluginPdfItem_Ticket::pdfForTicket()
plugins/pdf/inc/common.class.php:385 PluginPdfTicket::displayTabContentForPDF()
plugins/pdf/front/export.php:74 PluginPdfCommon->generatePDF()

[2022-10-25 09:30:22] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Toolbox::stripTags(): Argument #1 ($str) must be of type string, null given, called in /var/www/html/glpi/plugins/pdf/inc/item_ticket.class.php on line 121 i$
Backtrace :
plugins/pdf/inc/item_ticket.class.php:121 Toolbox::stripTags()
plugins/pdf/inc/ticket.class.php:522 PluginPdfItem_Ticket::pdfForTicket()
plugins/pdf/inc/common.class.php:385 PluginPdfTicket::displayTabContentForPDF()
plugins/pdf/front/export.php:74 PluginPdfCommon->generatePDF()

[2022-10-25 09:32:13] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "serial" in /var/www/html/glpi/plugins/pdf/inc/item_ticket.class.php at line 121
Backtrace :
plugins/pdf/inc/ticket.class.php:522 PluginPdfItem_Ticket::pdfForTicket()
plugins/pdf/inc/common.class.php:385 PluginPdfTicket::displayTabContentForPDF()
plugins/pdf/front/export.php:74 PluginPdfCommon->generatePDF()

[2022-10-25 09:32:13] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Toolbox::stripTags(): Argument #1 ($str) must be of type string, null given, called in /var/www/html/glpi/plugins/pdf/inc/item_ticket.class.php on line 121 i$
Backtrace :
plugins/pdf/inc/item_ticket.class.php:121 Toolbox::stripTags()
plugins/pdf/inc/ticket.class.php:522 PluginPdfItem_Ticket::pdfForTicket()
plugins/pdf/inc/common.class.php:385 PluginPdfTicket::displayTabContentForPDF()
plugins/pdf/front/export.php:74 PluginPdfCommon->generatePDF()

Can you help me please?
Thank you

PLUGIN ERROR

TCPDF ERROR: [Image] Unable to get the size of the image

Deprecated error with php 8.2 and GLPI 10.0.10

Hello,

Since i updated to 10.0.10, the PDF plugin shows me a "Deprecated" error like

Deprecated: Creation of dynamic property PluginPdfTicket::$pdf is deprecated in D:\Programs\wamp64\www\glpi\plugins\pdf\inc\common.class.php on line 374
TCPDF ERROR: Some data has already been output, can't send PDF file

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in D:\Programs\wamp64\www\glpi\plugins\pdf\inc\preference.class.php on line 93

I did a clean reinstallation of the plugin and it's worse... plugin not even installed or activated and I have PHP errors everywhere. Once installed and activated, the dashboard is also filled with php errors.
I carried out a 2nd installation by installing composer in the plugin folder, no more visible errors, but we return to the basic situation whenever i try to export ticket to pdf...

I opened a query on the GLPI community forum and it turns out that it's because my GLPI is running on PHP 8.2 which was pointed out as the cause. In 7.4 everything works, but unfortunately our system admin does not want us to downgrade to 7.4

Is it possible to modify any file(s) to make the plugin compatible with php 8.2?

Thanks in advance

Best regards

Rights management - cannot add profiles

Hi,
using GLPI 10.0.1
and PDF 3.0.0

in Superuser i can see the plugins,
i cannot see where i can add additional profiles to see it as well.

image

there is no option in profile settings to allow PDF print.

Information between PC sheet and print is different

I tried to print the financial information from a PC but it is different between the job description and the PDF file resulting from the export.

Here is the PC management sheet:
image

And here is the information after export via the plugin:
image

Why is the net book value different?

Thank you so much

Images are not added to the pdf file

Hello. When converting a ticket to a pdf file, images from comments or solutions are not added to the pdf file.
GLPI 9.5.7
Plugin version 2.0.0


image

image

image

Print error with items

Hi,

If ticket has an item attached and I choose to print items, it fails with this error:

Uncaught Exception TypeError: Argument 1 passed to Toolbox::stripTags() must be of the type string, null given, called in /home/getimin5/public_html/glpi/plugins/pdf/inc/item_ticket.class.php on line 122 in /home/getimin5/public_html/glpi/src/Toolbox.php at line 3109

Relevant php-errors.log entry:

[2022-11-02 10:49:48] glpiphplog.CRITICAL: *** Uncaught Exception TypeError: Argument 1 passed to Toolbox::stripTags() must be of the type string, null given, called in /home/getimin5/public_html/glpi/plugins/pdf/inc/item_ticket.class.php on line 122 in /home/getimin5/public_html/glpi/src/Toolbox.php at line 3109
Backtrace :
plugins/pdf/inc/item_ticket.class.php:122 Toolbox::stripTags()
plugins/pdf/inc/ticket.class.php:522 PluginPdfItem_Ticket::pdfForTicket()
plugins/pdf/inc/common.class.php:385 PluginPdfTicket::displayTabContentForPDF()
plugins/pdf/front/export.php:74 PluginPdfCommon->generatePDF()

Please help.

Thanks,
Goran

TCPDF ERROR

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

Visualization error in tasks with tables

Hello!

I discovered a visualization error when generating the pdf.
Tasks containing tables created in GLPI version 10 are partially displayed.
Tables created in GLPI 9 seem to display correctly.
The error appears in version 2.1 and also in version 3 of the pdf plugin.

error-pdf

Electronic Sign

Is it possible to add a feature to sign documents electronically from PDF plugin?

PDF plugin using functions deprecated in PHP 8.2

Version 3.0.0 with GLPI 10.0.10:
Steps to reproduce:

  • e.g. go to Computer
  • select computer item
  • go to Print to pdf tab
  • click Print button
  • new browser window/ tab stops with error message

Error Message:

PHP Deprecated function (8192): Creation of dynamic property PluginPdfComputer::$pdf is deprecated in ...plugins/pdf/inc/common.class.php at line 374
PHP Warning (2): Cannot modify header information - headers already sent by (output started at .../src/Application/ErrorHandler.php:544) in .../plugins/pdf/vendor/tecnickcom/tcpdf/tcpdf.php at line 7700
TCPDF ERROR: Some data has already been output to browser, can't send PDF file

PHP-errors on export

 inc/simplepdf.class.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inc/simplepdf.class.php b/inc/simplepdf.class.php
index 9693301..3ed5913 100644
--- a/inc/simplepdf.class.php
+++ b/inc/simplepdf.class.php
@@ -348,7 +348,7 @@ class PluginPdfSimplePDF {
 
       $this->setColumnsSize(100);
       $text = $name.' '.$content;
-      $content  = Html::entity_decode_deep($text);
+      $content  = Glpi\RichText\RichText::getTextFromHtml($text);
       if (!preg_match("/<br\s?\/?>/", $content) && !preg_match("/<p>/", $content)) {
          $content = nl2br($content);
       }

 inc/document.class.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/inc/document.class.php b/inc/document.class.php
index 85bc8b3..936585c 100644
--- a/inc/document.class.php
+++ b/inc/document.class.php
@@ -78,6 +78,9 @@ class PluginPdfDocument extends PluginPdfCommon {
          $pdf->displayTitle(__('Name'), __('Entity'), __('File'), __('Web link'), __('Heading'),
                             __('MIME type'), __('Tag'), __('Date'));
          foreach ($result as $data) {
+             if (empty($data["link"])) {
+                 $data["link"] = '';
+             }
             $pdf->displayLine($data["name"], $data['completename'], basename($data["filename"]),
                               $data["link"], Dropdown::getDropdownName("glpi_documentcategories",
                                                                        $data["documentcategories_id"]),
@@ -88,4 +91,4 @@ class PluginPdfDocument extends PluginPdfCommon {
       }
       $pdf->displaySpace();
    }
-}
\ No newline at end of file
+}

Plugin not working

Hello. GLPI 10.0.6 plugin installed but not working. Not visible on the application.
image

image

image

bad influence to barcode plugin

Hi,

actual Version 2.1.0 and the prior Version causes the barcode-plugin to fail:
-> pluginsGLPI/barcode#110

As for now we can only use one of both plugins activated.
If pdf-plugin is same time active with barcode-plugin, the barcode-plugin fails.
Maybe related to the new tcppdf?

Would be kind to get some hints to solve the issue.

Visualization error in problems and change tasks with tables

Hello!

I got the same error presented on the issue with problems and changes, where tables are not displayed correctly.

The solution presented on the issue above solved the bug for tickets, we tried the solution for changes and it was successfull, but it doesn't solve the bug on problems.

Added the prints below to better visualize the bug:

How it prints the table:

1


How the table is displayed on GLPI:

2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.