Automatic Printing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Marius
    Junior Member
    • Jun 2025
    • 8

    #1

    Automatic Printing

    Hello

    My business is using EspoCRM with a Sales Pack.

    We create over 50 orders a day, and everyone of those orders needs to be printed through our thermal printer. What my eployees are doing is they are using 'Print to PDF' option on a delivery order as you can see on a screenshot.

    I was wondering if there is a way to do this automatically? We are now at 14000 orders so it would be amazing if we can save some clicks.

    Thank you for any help.
    Attached Files
  • emillod
    Active Community Member
    • Apr 2017
    • 1536

    #2
    It would require some kind of adjustments.
    1. It's possible to add button in detail view which would automatically open PDF view, instead of going through Print to PDF, etc.
    2. It's possible to use Print to PDF option from list view and print labels for multiple records at once.

    Second option is already available.

    Comment


    • item
      item commented
      Editing a comment
      Hi emillod,

      simple extension, integration :

      $printerIp = '192.168.1.50'; // IP
      $printerPort = 9100; // 9100
      $pdfPath = '/home/www/espocrm/data/uploads/id.pdf';

      a workflow, a event for create pdf and send direct to the printer. (no user interaction)

      $pdfContent = '';

      $fp = fsockopen("192.168.10.30", 9100, $errno, $errstr, 10);
      if ($fp) {
      fwrite($fp, $pdfPath);
      fclose($fp);
      return ['success' => true];
      }
      or
      shell_exec("lpr -H $printerIp -P raw $pdfPath");

      There are many solution
  • Marius
    Junior Member
    • Jun 2025
    • 8

    #3
    Hi emillod

    Yes, understood, but that is still a manual interaction. I was wondering if it can be done automatically, ie. when DO is created it automatically prints.

    It would be a small improvement to an already impressive system that is EspoCRM to be sure, but that would make our lives a lot easier.

    Cheers

    Comment

    • shalmaxb
      Senior Member
      • Mar 2015
      • 1801

      #4
      I have one installation, where I print automatically by formula. You need an email template beforehand. Than you can execute a formula, which creates the email, attaches the PDF. And if you want, you may also save the PDF in a folder in documents for the respective client. I use it to confirm a subscription to a workshop. When the subscription is confirmed, the customer gets the contract by mail and a copy of the contract is saved in the documents folder of that client. It can then be displayed in the documents panel of the customer.
      I trigger this by a button. But it should also be possible to do that automatically by some conditional field.
      It would be important to disable the process once the document is sent, to not send it again.

      Comment

      Working...