yllen / pdf Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
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 :)
Hi!
Is it possible to allow the PDF plugin to display the FIELDS plugin fields?
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
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 (
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 (
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
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.
Printing images are not printed;
I'm on GLPI version 10.0.5 and 10.0.6;
The pdf plugin version 3.0.0
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?
Version 3.0.0 with GLPI 10.0.10:
Steps to reproduce:
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
Hi not show pictures from ticket.
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:
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
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.
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.
TCPDF ERROR: [Image] Unable to get the size of the image
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.
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
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.
Any predictions for the release of a new version of the PDF plugin with GLPI 10 compatibility?
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 )
I have this error in this url : MyIP/glpi/marketplace/pdf/front/export.php
and If i refresh this page, i have the blanck page with a message "Missing context"
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
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
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()
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.
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.
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.
Is it possible to add a feature to sign documents electronically from PDF plugin?
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
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
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
+}
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.
Hi,
The url is always https://forge.glpi-project.org/projects/pdf in the plugin interface of glpi :)
Thank you :)
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()
Good morning,
It would be possible or if it will be implemented in the future that the PDF plugin allows the printing of only the fields that we have in a ticket or request.
Or if in your case it is going to be implemented that we can select from all the fields of a ticket those that we want to print.
Thank you.
Hi,
any idea when the GLPI 10 compatible plugin will be released?
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"
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.
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!
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
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 ?
Hi, How to change PDf chars (language) to PL
The default font don't have PL (polish) chars?
Hello,
I would like to customize the content of the pdf export but I don't know how to go about it.
Can you help me please.
Cordially
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.