From 13313f56be0cfe0cddbf040dd7aa6d4acfe5b988 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Sat, 11 Oct 2025 13:01:49 +0200 Subject: [PATCH] NEW The check file feature can limit check on unalterable files only --- dev/build/generate_filelist_xml.php | 29 +-- htdocs/admin/system/filecheck.php | 195 ++++++++++++------- htdocs/core/lib/files.lib.php | 2 +- htdocs/includes/mike42/escpos-php/doc/FAQ.md | 142 -------------- htdocs/langs/en_US/admin.lang | 4 + 5 files changed, 149 insertions(+), 223 deletions(-) delete mode 100644 htdocs/includes/mike42/escpos-php/doc/FAQ.md diff --git a/dev/build/generate_filelist_xml.php b/dev/build/generate_filelist_xml.php index 9853f860c08..9f57fbfdd18 100755 --- a/dev/build/generate_filelist_xml.php +++ b/dev/build/generate_filelist_xml.php @@ -49,16 +49,18 @@ $includecustom = 0; $includeconstants = array(); $buildzip = 0; +print '***** '.$script_file.' *****'."\n"; + if (empty($argv[1])) { - print '***** '.$script_file.' *****'."\n"; + print "Usage: ".$script_file." release=auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n"; + print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n"; + print "\n"; print "Generate the file filelist-x.y.z[-mybuild].xml with signature of files. "; print "This includes the 3 sections:\n"; print "- dolibarr_htdocs_dir\n"; print "- dolibarr_scripts_dir\n"; print "- dolibarr_unalterable_files (only files inside the scope of the unalterable module)\n"; print "\n"; - print "Usage: ".$script_file." release=auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n"; - print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n"; exit(1); } @@ -75,12 +77,6 @@ while ($i < $argc) { if (!empty($result["includecustom"])) { $includecustom = $result["includecustom"]; } - if (!empty($result["includeconstant"])) { - $includeconstants[$i] = $result["includeconstant"]; - } - if (!empty($result["buildzip"])) { - $buildzip = 1; - } if (preg_match('/includeconstant=/', strval($argv[$i]))) { $tmp = explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str() if (count($tmp) != 3) { @@ -89,6 +85,9 @@ while ($i < $argc) { } $includeconstants[$tmp[0]][$tmp[1]] = $tmp[2]; } + if (!empty($result["buildzip"])) { + $buildzip = 1; + } $i++; } @@ -167,7 +166,7 @@ if (file_exists($fileforgit)) { $fileforgitcontent = file_get_contents($fileforgit); } if (empty($fileforgitcontent)) { - print "Failed to get the last commit ID. Are you on the branch for the release (branch name ".$branchname.") ?\n"; + print "Failed to get the last commit ID (are you on the branch for the release branch name ".$branchname." ?). We will use an empty value for gitcommit.\n"; } $gitcommit = trim($fileforgitcontent); @@ -411,22 +410,26 @@ fputs($fp, ''."\n\n"); fputs($fp, ''."\n"); fclose($fp); +print "\n"; + if (empty($buildzip)) { - print "File ".$outputfile." generated\n"; + print "File ".$outputfile." generated.\n"; } else { if ($buildzip == '1' || $buildzip == 'zip') { $result = dol_compress_file($outputfile, $outputfile.'.zip', 'zip'); if ($result > 0) { dol_delete_file($outputfile); - print "File ".$outputfile.".zip generated\n"; + print "File ".$outputfile.".zip generated.\n"; } } elseif ($buildzip == '2' || $buildzip == 'gz') { $result = dol_compress_file($outputfile, $outputfile.'.gz', 'gz'); if ($result > 0) { dol_delete_file($outputfile); - print "File ".$outputfile.".gz generated\n"; + print "File ".$outputfile.".gz generated.\n"; } } } +print "\n"; + exit(0); diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 0b16d7555ec..f18e8e79aa9 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -39,9 +39,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; - $langs->load("admin"); +$mode = GETPOST('mode', 'aZ09'); + if (!$user->admin) { accessforbidden(); } @@ -139,7 +140,7 @@ if (dol_is_file($xmlfile)) { } else { print ' '; + print '
'.$langs->trans("AvailableOnlyOnPackagedVersions").''; print '
'; } @@ -158,7 +159,14 @@ if ($enableremotecheck) { } print ''; -print '
'; +// Option unalterable log +print '
'; +if ($mysoc->country_code == 'FR') { + print ''; + print '
'; +} +print ''; +print '
'; print ''; print '
'; print '
'; @@ -230,8 +238,9 @@ if (empty($error) && !empty($xml)) { $i = 0; foreach ($xml->dolibarr_constants[0]->constant as $constant) { // $constant is a simpleXMLElement - $constname = $constant['name']; + $constname = (string) $constant['name']; $constvalue = (string) $constant; + $constvalue = (empty($constvalue) ? '0' : $constvalue); // Value found $value = ''; @@ -240,7 +249,7 @@ if (empty($error) && !empty($xml)) { } $valueforchecksum = (empty($value) ? '0' : $value); - $checksumconcat[] = $valueforchecksum; + $checksumconcat[$constname] = $valueforchecksum; $i++; $out .= ''; @@ -260,10 +269,20 @@ if (empty($error) && !empty($xml)) { $out .= '
'; } + + $onlymodifiedorremoved = 0; + if ($mode == 'unalterable') { + $listoffilestoanalyze = $xml->dolibarr_unalterable_files[0]; + $onlymodifiedorremoved = 1; + } else { + $listoffilestoanalyze = $xml->dolibarr_htdocs_dir[0]; + $onlymodifiedorremoved = 0; + } + // Scan htdocs - if (is_object($xml->dolibarr_htdocs_dir[0])) { + if (is_object($listoffilestoanalyze)) { //var_dump($xml->dolibarr_htdocs_dir[0]['includecustom']);exit; - $includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']); + $includecustom = (empty($listoffilestoanalyze['includecustom']) ? 0 : $listoffilestoanalyze['includecustom']); // Define qualified files (must be same than into generate_filelist_xml.php and in api_setup.class.php) $regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$'; @@ -271,14 +290,17 @@ if (empty($error) && !empty($xml)) { $scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude); // Fill file_list with files in signature, new files, modified files - $ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', DOL_DOCUMENT_ROOT, $checksumconcat); // Fill array $file_list + $ret = getFilesUpdated($file_list, $listoffilestoanalyze, '', DOL_DOCUMENT_ROOT, $checksumconcat); // Fill array $file_list '@phan-var-force array{insignature:string[],missing?:array,updated:array} $file_list'; - // Complete with list of new files - foreach ($scanfiles as $keyfile => $valfile) { - $tmprelativefilename = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', $valfile['fullname']); - if (!in_array($tmprelativefilename, $file_list['insignature'])) { - $md5newfile = @md5_file($valfile['fullname']); // Can fails if we don't have permission to open/read file - $file_list['added'][] = array('filename' => $tmprelativefilename, 'md5' => $md5newfile); + + // Complete with list of new files into $file_list['added'] + if ($onlymodifiedorremoved) { + foreach ($scanfiles as $keyfile => $valfile) { + $tmprelativefilename = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', $valfile['fullname']); + if (!in_array($tmprelativefilename, $file_list['insignature'])) { + $md5newfile = @md5_file($valfile['fullname']); // Can fails if we don't have permission to open/read file + $file_list['added'][] = array('filename' => $tmprelativefilename, 'md5' => $md5newfile); + } } } @@ -371,53 +393,55 @@ if (empty($error) && !empty($xml)) { $out .= '
'; // Files added - $out .= load_fiche_titre($langs->trans("FilesAdded")); + if (empty($onlymodifiedorremoved)) { + $out .= load_fiche_titre($langs->trans("FilesAdded")); - $totalsize = 0; - $out .= '
'; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''."\n"; - $tmpfilelist3 = dol_sort_array($file_list['added'], 'filename'); - if (is_array($tmpfilelist3) && count($tmpfilelist3)) { - $i = 0; - foreach ($tmpfilelist3 as $file) { - $i++; - $out .= ''; - $out .= ''."\n"; - $out .= '
#'.$langs->trans("Filename").''.$langs->trans("ExpectedChecksum").''.$langs->trans("CurrentChecksum").''.$langs->trans("Size").''.$langs->trans("DateModification").'
'.$i.''.dol_escape_htmltag($file['filename']); - if (!preg_match('/^win/i', PHP_OS)) { - $htmltext = $langs->trans("YouCanDeleteFileOnServerWith", 'rm '.DOL_DOCUMENT_ROOT.$file['filename']); // The slash is included int file['filename'] - $out .= ' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helprm'.$i); + $totalsize = 0; + $out .= '
'; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''."\n"; + $tmpfilelist3 = dol_sort_array($file_list['added'], 'filename'); + if (is_array($tmpfilelist3) && count($tmpfilelist3)) { + $i = 0; + foreach ($tmpfilelist3 as $file) { + $i++; + $out .= ''; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; // @phan-suppress-current-line PhanTypeInvalidDimOffset + $out .= ''."\n"; + $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); + $totalsize += $size; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= "\n"; } - $out .= ''."\n"; - $out .= ''."\n"; // @phan-suppress-current-line PhanTypeInvalidDimOffset - $out .= ''."\n"; - $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); - $totalsize += $size; - $out .= ''."\n"; - $out .= ''."\n"; + $out .= ''; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; $out .= "\n"; + } else { + $out .= ''; } - $out .= ''; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= "\n"; - } else { - $out .= ''; + $out .= '
#'.$langs->trans("Filename").''.$langs->trans("ExpectedChecksum").''.$langs->trans("CurrentChecksum").''.$langs->trans("Size").''.$langs->trans("DateModification").'
'.$i.''.dol_escape_htmltag($file['filename']); + if (!preg_match('/^win/i', PHP_OS)) { + $htmltext = $langs->trans("YouCanDeleteFileOnServerWith", 'rm '.DOL_DOCUMENT_ROOT.$file['filename']); // The slash is included int file['filename'] + $out .= ' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'helprm'.$i); + } + $out .= ''.dol_escape_htmltag((string) $file['expectedmd5']).''.dol_escape_htmltag($file['md5']).''.dol_print_size($size).''.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']), 'dayhour').'
'.dol_escape_htmltag((string) $file['expectedmd5']).''.dol_escape_htmltag($file['md5']).''.dol_print_size($size).''.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']), 'dayhour').'
'.$langs->trans("Total").''.dol_print_size($totalsize).'
'.$langs->trans("None").'
'.$langs->trans("Total").''.dol_print_size($totalsize).'
'.$langs->trans("None").'
'; + $out .= '
'; } - $out .= '
'; - $out .= '
'; } else { print '
'; print 'Error: Failed to found dolibarr_htdocs_dir into content of XML file:
'.dol_escape_htmltag(dol_trunc($xmlfile, 500)); @@ -436,11 +460,18 @@ if (empty($error) && !empty($xml)) { }*/ + // Section Globalchecksum asort($checksumconcat); // Sort list of checksum - //var_dump($checksumconcat); - $checksumget = md5(implode(',', $checksumconcat)); - $checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum); + $checksumget = md5(implode(',', $checksumconcat)); + + if ($mode == 'unalterable') { + $nameofsection = 'dolibarr_unalterable_files_checksum'; + $checksumtoget = trim((string) $xml->dolibarr_unalterable_files_checksum); + } else { + $nameofsection = 'dolibarr_htdocs_dir_checksum'; + $checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum); + } //var_dump(count($file_list['added'])); //var_dump($checksumget); //var_dump($checksumtoget); @@ -450,19 +481,22 @@ if (empty($error) && !empty($xml)) { $outexpectedchecksum = ($checksumtoget ? $checksumtoget : $langs->trans("Unknown")); if ($checksumget == $checksumtoget) { - if (is_array($file_list['added']) && count($file_list['added'])) { + if (empty($onlymodifiedorremoved) && is_array($file_list['added']) && count($file_list['added'])) { $resultcode = 'warning'; $resultcomment = 'FileIntegrityIsOkButFilesWereAdded'; - $outcurrentchecksum = $checksumget.' - '.$langs->trans($resultcomment).''; + $outcurrentchecksum = $checksumget; + $outcurrentchecksum .= '

'.img_picto('', 'tick').' '.$langs->trans($resultcomment).''; } else { $resultcode = 'ok'; $resultcomment = 'Success'; - $outcurrentchecksum = ''.$checksumget.''; + $outcurrentchecksum = ''.$checksumget.''; + $outcurrentchecksum.= '

'.img_picto('', 'tick').' '.$langs->trans($resultcomment).''; } } else { $resultcode = 'error'; - $resultcomment = 'Error'; - $outcurrentchecksum = ''.$checksumget.''; + $resultcomment = 'FileIntegrityIsKO'; + $outcurrentchecksum = ''.$checksumget.''; + $outcurrentchecksum .= '

'.img_picto('', 'error').' '.$langs->trans($resultcomment).''; } // Show warning @@ -476,12 +510,39 @@ if (empty($error) && !empty($xml)) { } } - print load_fiche_titre($langs->trans("GlobalChecksum")); - print $langs->trans("ExpectedChecksum").' = '.$outexpectedchecksum.'
'; + if ($mode == 'unalterable') { + print load_fiche_titre($langs->trans("UnalterableFilesChecksum")); + + // Print list of files + $outforlistoffiles = ''.$langs->trans("ShowListOfFiles").'
'; + $outforlistoffiles .= ''; + $outforlistoffiles .= '
'; + } else { + print load_fiche_titre($langs->trans("GlobalChecksum")); + } + print $langs->trans("ExpectedChecksum").' = '; + print ''; + print $outexpectedchecksum; + print '
'; print $langs->trans("CurrentChecksum").' = '.$outcurrentchecksum; + print '

'; + print $outforlistoffiles; print '
'; - print '
'; + // Output detail print $out; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index c024fde45a4..900bf0e3214 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -3844,7 +3844,7 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre { global $conffile; - $exclude = 'install'; + //$exclude = 'install'; foreach ($dir->md5file as $file) { // $file is a simpleXMLElement $filename = $path.$file['name']; diff --git a/htdocs/includes/mike42/escpos-php/doc/FAQ.md b/htdocs/includes/mike42/escpos-php/doc/FAQ.md deleted file mode 100644 index 6b7a6247bca..00000000000 --- a/htdocs/includes/mike42/escpos-php/doc/FAQ.md +++ /dev/null @@ -1,142 +0,0 @@ -# Frequently Asked Questions (FAQ) - -## Can I print to File Format X with this? - -If you are trying to generate XPS, PDF or DOCX or HTML files from PHP, then you are most likely in the wrong place. - -The purpose of this driver it to generate binary ESC/POS code, which is understood by many embedded thermal receipt and impact printers. - -## I have Printer X. Can I use this driver? - -If the printer understands ESC/POS, and you know how to get raw binary data to it, then yes. Otherwise, no. - -The [list of printers that are known to work](https://github.com/mike42/escpos-php/blob/development/README.md#printers) is crowd-sourced. We appreciate it when developers try out the driver, then [file information on the bug tracker](https://github.com/mike42/escpos-php/issues/new) with some information about which features worked on their model of printer. - -To see how well your printer works, first check that it supports ESC/POS, then begin by attempting to send the text "Hello World" to your printer on the command-line, from the computer that will run PHP. - -Once you solve this, [try to do the same from PHP](https://github.com/mike42/escpos-php/blob/development/README.md#basic-usage) using the default profile. Further details are in the [README](https://github.com/mike42/escpos-php/blob/development/README.md) file. - -## Can you add support for Printer X? - -Features vary between printers, so we collaborate on an ESC/POS printer compatibility database to collect known differences: [receipt-print-hq/escpos-printer-db](https://github.com/receipt-print-hq/escpos-printer-db). - -If you encounter garbage output when you try to print images or special characters, then please submit a test page and a link to vendor documentation to the `escpos-printer-db` project, so that support can be improved for future versions. - -## I have a printer that does not understand ESC/POS. Can I use this driver? - -No. The purpose of this driver it to generate binary ESC/POS code. If your printer doesn't understand that, then this code wont be much use to you. - -Some printers do have an emulation mode for ESC/POS. The vendor docs will tell if this is the case, and how to enable it. - -## Why do I get this error when I try to print? - -Start by testing that you can send text to your printer outside of escpos-php. The examples linked to in the README are commented with some commands to get you started. - -Generally, initial setup problems seem to have one of these causes: - -1. You are writing to the wrong place. Writing to `LPT1` does not output to parallel port on Linux, and `/dev/ttyS0` is not a serial printer on Windows. -2. The printer has not been set up to accept printing the way you expect. This means permissions on Linux, network printers being configured, and shared printers having user accounts and firewalls set up correctly on the print server. -3. Your printer actually doesn't work (rare but possible). - -To be clear, these are not escpos-php issues: No amount of PHP code can set up your printer for you. Instead, the driver relies on developers determining how their setup is going to work before using a connector to transport data to their printer. - -Once you have a working command to send text to your printer (from the PHP server), you are ready to use escpos-php. You can try to use a PrintConnector now, based on your operating system and printer interface. A table is located in the README to help you select the right one. - -The connectors are- - -- `FilePrintConnector` and `NetworkPrintConnector` directly use files or network sockets. -- `WindowsPrintConnector` and `CupsPrintConnector` tie in with Windows and Unix system printing. -- `DummyPrintConnector` does not connect to a real printer, and can be used to save ESC/POS receipts to a database, for example. - -At this point, you might find that the way you would like to print is not supported by escpos-php. You can post your printing command as a feature request on the issue tracker. - -Lastly, you may run in to the final common trap: - -4. Your PHP is not running with the same sort of permissions as your login account. Again, no amount of PHP code can fix this. For example, on LAMP, your `www-data` user needs to be in the `lp` group, while on WAMP, `Local Service` account may run in to problems. SELinux and firewalls are also worth a look. - -When printing fails, you can expect a PHP Exception that explains what went wrong. They are all clues: - -- `Warning: copy(\\pc\printer): failed to open stream: Permission denied` -- `/dev/usb/lp0: Permission denied` -- `User name or password is incorrect` - -Ensure that while you are developing, you configure PHP to show error messages, so that you can see these problems. - -Please file a bug if you think that there is a specific situation which escpos-php could provide better error messages for. - -## Can I print over the network? - -Certainly, as long as your printer is available over the network. - -- `NetworkPrintConnector` will speak directly to an Ethernet-connected printer on port 9100. - -For USB or Serial printers, you need to install the printer on a computer and then share it, so that it becomes network-accessible. - -- `WindowsPrintConnector` will connect to Windows shared printers from Windows or Linux (Linux users will need Samba). -- `CupsPrintConnector` will connect to CUPS-shared printers from Linux or Mac. - -Always start by testing your shared printer setup outside of escpos-php. The examples linked to in the README are commented with some example commands to get you started. Typically, networks, firewalls and permissions need to be set up. - -Once you have a working command to send text to your printer (from the PHP server), you are ready to use escpos-php. - -If you have any issues at this stage, please ask on the issue tracker, and include the commands that you used to verify your setup. - -## Can I print from my server on the Internet? - -Since PHP is a server-side language, escpos-php is a server-side print library. The driver is able to transport data between a server and a printer in a few different ways, all of them server-side. For example, you may print to a USB printer *connected to the server running PHP*, or an Ethernet printer *on a network accessible to the server*. - -Many developers dream of having an application that is hosted on the public Internet, with POS terminals accessing it, and printing via a web browser. Because the webserver cannot see the printer in this sort of setup, a server-side print driver is not much use. - -Because of this, there are no cut-and-paste recipes available, but here are two top-level approaches you could take: - -1. Architect your application so that the server can see your printer -2. Use an application which runs client-side to deliver print data instead - -### Option 1: Allow the server to print - -Server-side printing is viable if the server can get to the printer. Here are some ways it could work: - -- Run your server on the LAN instead, and read the section above about printing over the network -- Set up a VPN so that your cloud-hosted server can also access the LAN -- Expose the printer via some other secure tunnel to the server, via SSH or TLS - -Please do your own research to determine how these may apply to your setup- the escpos-php issue tracker is not a place where you should be requesting network support. - -### Option 2: Use client software to print - -If you aren't able to set up some network infrastructure to implement the above, then you cannot use a server-side print driver. - -Here are some browser-based printing tools which you may like to consider instead. - -- Use system printing with a vendor driver, and some good `@media print` CSS -- [Chrome Raw Print](https://github.com/receipt-print-hq/chrome-raw-print) app -- [qz](https://qz.io/) -- [ePOS-Device SDK for JavaScript](https://reference.epson-biz.com/modules/ref_epos_device_js_en/index.php?content_id=139). Requires network interface card that supports ePOS (UB-E04/R04) - -Please direct queries about client-side printing products to the appropriate project. - -## Why is image printing slow? - -Three things tend to slow down the image processing: - -1. Slow PHP code -2. Data link -3. The printer itself - -First, ensure you have the Imagick plugin loaded. The driver will avoid a slower image processing implementation once you've got it. - -Next, connect over a faster interface. Serial printers have a low bit-rate, and the printer spends a lot of time waiting for data. If you have USB or Ethernet, then use it (note: storing graphics to the printer memory is not currently implemented). - -Lastly, the printer will go faster if you use less pixels. Since images are two-dimensional, scaling down by 50% removes 75% of the pixels. The driver can then print at a half the density, so that your lower resolution image appears the same size when printed. - -## How can I get the status of the printer? - -This feature is not implemented, but a solution for some Epson printers is planned. - -Only `FilePrintConnector` or `NetworkPrintConnector` will support reading from the printer, ensure that you migrate to those if you would like these features. - -## How do I produce this complex layout? - -ESC/POS "page mode" is not currently supported, which would allow some printers to render some more complex layouts natively - -Since the output is raster anyway, it is suggested that you render your output to an image and print that instead. The driver supports PDF printing via Imagick, and an example that uses `wkhtmltoimage` is available in the repository. diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 4d4a99fcb29..44fe2624c1d 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -16,6 +16,7 @@ FileCheck=Fileset integrity check FileCheckDesc=This tool checks the integrity of your files and application setup by comparing each file with the official version. It also verifies certain setup constants. Use this tool to detect if any files have been modified (e.g., by a hacker). FileIntegrityIsStrictlyConformedWithReference=File integrity strictly matches the reference. FileIntegrityIsOkButFilesWereAdded=File integrity check passed, but some new files were added. +FileIntegrityIsKO=File integrity check failed, some files were modified or removed. See the detail lower... FileIntegritySomeFilesWereRemovedOrModified=File integrity check failed: some files were modified, removed, or added. GlobalChecksum=Global checksum MakeIntegrityAnalysisFrom=Perform integrity analysis of application files from @@ -2722,3 +2723,6 @@ SecurityForConnection=Credentials for connexion AddCredential=Add a credential API_ENABLE_COUNT_CALLS=Enable counting of API calls (slower). The value of API count is visible on the user page. MCPServer=MCP Server +AnalyzeUnalterableScopeOnly=Analyze only files implicated into the feature of the module %s (otherwise all files are scanned) +UnalterableFilesChecksum=Cheksum of unalterable files +ShowListOfFiles=Show list of files...