📁
ActiveBooks
  • ActiveBooks Documentation
  • Importing Data in ActiveBooks
    • Downloading Backups
    • Chart of Accounts Importer
    • Data Export
    • Data Import Tools
  • Printing
    • Printing and Branding
    • Print Settings
    • Print Format
    • Print Format Builder
    • Print Style
    • Print Headings
    • Address Template
    • Terms And Conditions
    • Cheque Print Template
    • Custom Translations
    • Raw Printing
  • Workflows
    • Workflows
    • Workflow Actions
    • Workflow State
    • Assignment Rule
    • Email
      • Email
      • Email Domain
      • Email Account
      • Untitled
      • Untitled
      • Untitled
      • Untitled
      • Untitled
      • Untitled
      • Untitled
      • Untitled
      • Untitled
      • Email
  • Email
    • Users and Permissions
      • Basic setup of ActiveBooks
        • Setting up Company in ActiveBooks
        • Setting up Taxes in ActiveBooks
        • Setting up Company's Sales Goals
        • Global Defaults in ActiveBooks
        • System Settings in ActiveBooks
        • Letter Head
      • Adding Users
      • Users and Permissions
      • Role and Role Profile
      • Role Based Permissions
      • User Permissions
      • Role Permission for Page and Report
      • Sharing
      • Limited User
      • Administrator
    • Email
    • Email Domain
    • Email Account
    • Email Inbox
    • Email Template
    • Sending Email from any Document
    • Linking Emails to Documents
    • Email Digest
    • Auto Email Reports
    • SMS Settings
    • Notification
    • Document Follow
    • Email Dropbox
  • System Configuration
    • Settings
    • Show or Hide Modules
    • Naming Series
    • Session Defaults
    • Bulk Renaming of Records
    • Bulk Update
    • Milestone Tracking
    • Auto Repeat
    • Domain settings
    • Energy Point System
  • Data Privacy
    • Personal Data Download
    • Personal Data Deletion
  • Articles
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
    • Untitled
  • Using ActiveBooks
    • Articles
      • Checking Link Between Documents
      • Access Log
      • Duplicate Records
      • To-Do Auto Creation
      • Document Versioning
      • Deleting and Restoring Documents
      • Bulk Rename
      • Renaming Documents
      • Tree Master Renaming
      • Letter Head in the Report
      • Copy Pasting Multiple Records From Excel
      • Adding Attachments to Outgoing Messages
    • Collaboration Tools
      • Assignment
      • Tags
      • Kanban Board
      • Filter by
      • Save Filter
      • Search Filter
      • Collaborating Around Forms
      • Delete Company Transactions
    • Introduction
      • Tools
        • To Do
        • Notes
        • Video
        • Calendar
        • Chat
        • Dashboard
        • Global Search
        • Desktop
  • Automation
    • Automation
    • Assignment Rule
    • Milestone Tracking
    • Auto Repeat
    • Event Streaming
  • Accounts
    • Introduction
      • Setup and Opening
        • Accounting Entries
        • Accounts Settings
        • Company Setup
        • Chart of Accounts
        • Opening Balance in Accounts
        • Cost Center
        • Distributed Cost Center
        • Fiscal Year
        • Accounting Period
        • Finance Book
        • Accounting Dimensions
        • Accounting Dimensions Filters
        • Bank
        • Bank Account
      • Billing
        • Sales Invoice
        • Purchase Invoice
        • Inter Company Invoices
        • Credit Note
        • Debit Note
        • Credit Limit
      • Taxes
        • Item Tax Template
        • Tax Withholding Category
        • Tax Rule
        • Tax Category
      • Pricing
        • Pricing Rule
        • Promotional Scheme
        • Exchange Rate Revaluation
        • Currency Exchange
        • Currency
      • Retail Operations
        • Point of Sale Profile
        • Point of Sale
        • Cashier Closing
      • Tools
        • Bank Reconciliation
        • Payment Reconciliation
        • Period Closing Voucher
        • Payment Order
        • ActiveBooks to QuickBooks Migrator
        • Process Statement of Accounts
      • Accounting Reports
        • Accounting Reports
      • Advanced
        • Multi Currency Accounting
        • Deferred Revenue
        • Deferred Expense
        • Process Deferred Accounting
        • Bank Guarantee
          • Budgeting
        • Loyalty Program
        • Auto Repeat
        • Invoice Discounting
      • Subscription
        • Subscription
        • Subscription Plan
        • Subscription Settings
      • Shareholder Management
        • Share Holder
        • Share Transfer
        • Share Reports
      • Articles
        • Articles
        • Freeze Accounting Entries
        • Post Dated Cheque Entry
        • Adjust Withhold Amount in the Payment Entry
        • Bulk Payment Entry
        • Difference Entry
        • Changing Parent Account
        • Withdrawing Salary from Owner's Equity Account
        • Common Receivable Account
        • Freeze an Account
        • Round of Account Validation Message
        • Purchase Tax or Charges Categories
        • Types in Sales and Purchase Tax Template
        • Manage Foreign Exchange Difference
        • Recurring Orders and Invoices
        • Delivery from Sales Invoice
        • Exchange Rate Field Frozen
        • Fiscal Year Creation
        • How To Customize Cash Flow Report
        • Immutable Ledger In ActiveBooks
        • Purchase Invoice - Account Type Error
        • Fixing Fiscal Year Error
        • Stock and Accounting Module Integration
        • Merging Accounts
  • Stock
    • Basics
      • Introduction
      • Warehouse
      • Item
      • Opening Stock
      • Accounting Of Inventory Stock
      • Price Lists
      • Stock Settings
    • Item Variants
      • Item Variants
      • Item Attribute
    • Setup
      • Item Price
      • Item Group
      • Unit of Measure (UoM)
      • Manufacturer
    • Stock Transactions
      • Material Request
      • Purchase Receipt
      • Delivery Note
      • Stock Entry
      • Packing Slip
      • Shipment
      • Retaining Sample Stock
      • Landed Cost Voucher
      • Pick List
      • Putaway Rule
    • Serial and Batch Number
      • Serial Number
      • Batch
      • Installation Note
    • Tools
      • Quality Inspection
      • Stock Reconciliation
      • Quick Stock Balance
    • Return
      • Sales Return
      • Purchase Return
    • Advanced
      • Delivery Trip
      • Projected Quantity
      • Perpetual Inventory
    • Stock Reports
      • Stock Ledger Report
      • Stock Level Report
      • BOM Explorer
      • Stock Value and Account Value Comparison Report
      • Articles
        • Allow Over Delivery/Billing
        • Auto Creation of Material Request
        • Delivery Note Negative Stock Error
        • Stock Entry Purpose
        • Purpose of Stock Received but not Billed
        • Item Valuation Methods and Transactions
        • Maintain Stock field Frozen in the Item master
        • Managing Rejected Finished Goods Items
        • Return Rejected Items
        • Track Items Using Barcode
        • Item Valuation Fifo And Moving Average
        • Item Codification
        • Serial No. Naming
        • Opening Stock Balance Entry for Serialized and Batch Item
        • Managing Batch wise Inventory
        • Sales Return Management
        • Managing Fractions in UOM
        • Repack Entry
        • Material Transfer from Delivery Note and Purchase Receipt
        • Mode of Payment
        • Migrate To Perpetual Inventory
        • Depreciation Entry
  • CRM
    • Introduction to CRM
    • Sales
      • Lead
      • Opportunity
      • Customer
      • Contact
      • Address
      • Appointment
    • Reports
      • CRM Reports
    • Setup
      • Lead Source
      • Opportunity Type
      • Sales Stage
      • Sales Person
      • Customer Group
      • Email Group
      • Contract
      • Appointment Booking Settings
    • Marketing
      • Campaign
      • Email Campaign
      • Newsletter
      • LinkedIn Settings
      • Twitter Settings
      • Social Media Post
    • Articles
      • Automate Lead Creation
      • CRM Analytics
      • Difference between Lead, Contact and Customer
  • Selling
    • Selling
    • Quotation
    • Sales Order
    • Sales Partner
    • Brand
    • Blanket Order
    • Territory
    • Setup
      • Selling Settings
      • Product Bundle
      • Sales Person Target Allocation
      • Sales Taxes and Charges Template
      • Shipping Rule
      • Party Specific Item
    • Articles
      • Sales Persons in the Sales Transactions
      • Request for Raw Material from Sales Order
      • Applying a Discount
      • Selling in Different Unit (UoM)
      • Adding Margin
      • Amending Sales Order after Submit
      • Drop Ship
      • Calculate Incentive for Sales Team
      • Shipping Rule
      • Close Sales Order
      • Taxes and Charges
      • Print Settings
      • Payment Terms
    • Selling Reports
      • Sales Reports
  • Buying
    • Buying
      • Request for Quotation
      • Purchase Order
      • Purchase Taxes and Charges Template
      • Supplier
      • Supplier Quotation
      • Supplier Scorecard
    • Setup
      • Buying Settings
      • Supplier Groups
    • Articles
      • Maintaining Supplier's Item Code in the Item Master
      • Purchasing in Different Unit (UoM)
      • Amending Purchase Order after Submit
      • Procurement Tracker Report
  • HR
    • Employee
      • Employee
      • Employment Type
      • Branch
      • Department
      • Designation
      • Employee Grade
      • Employee Group
      • Employee Health Insurance
    • Attendance
      • Attendance
      • Employee Attendance Tool
      • Attendance Request
      • Upload Attendance
      • Auto Attendance
    • Leave Management
      • Leaves
      • Holiday List
      • Leave Type
      • Leave Period
      • Leave Policy
      • Leave Policy Assignment
      • Leave Allocation
      • Leave Application
      • Compensatory Leave Request
      • Leave Encashment
      • Leave Block List
      • Leave Ledger Entry
    • Recruitment
      • Recruitment
      • Employee Referal
      • Staffing Plan
      • Job Opening
      • Job Applicant
      • Job Offer
      • Appointment Letter
    • Training
      • Training Program
      • Training Event
      • Training Result
      • Training Feedback
    • Employee Life Cycle
      • Employee Life Cycle Management
      • Employee Onboarding
      • Employee Promotion
      • Employee Seperation
      • Employee Transfer
      • Employee Skill Map
    • Payroll
      • Payroll Setup
      • Payroll Management
      • Payroll Period
      • Income Tax Slab
      • Salary Component
      • Salary Structure
      • Salary Structure Assignment
      • Salary Slip
      • Payroll Entry
      • Additional Salary
      • Retention Bonus
      • Employee Incentive
    • Employee Tax and Benefits
      • Setting Up Income tax Deduction
      • Employee Tax Exemption Declaration
      • Employee Tax Exemption Proof Submission
      • Employee Other Income
      • Employee Benefit Application
      • Employee Benefit Claim
    • Travel and Expense Claim
      • Travel Request
      • Employee Advance
      • Expense Claim
    • Gratuity
      • Gratuity
      • Gratuity Rule
    • Loans
      • Loan Type
      • Loan Application
      • Loan
    • Shift Management
      • Shift Management
    • Fleet Management
      • Fleet Management
      • Vehicle
      • Vehicle Log
    • Setup
      • Human Resource Setup
      • HR Settings
      • Daily Work Summary Group
    • Reports
      • Human Resources Reports
    • Articles
      • Articles
      • Leave Calculation in Salary Slip
      • Workdays Calculation in the Salary Slip
    • Performance
      • Appraisal
  • Projects
    • Project
      • Project and Managing Expenses
      • Salary Slip from Timesheet
      • Activity Type
      • Project Template
      • Timesheet
      • Projects
      • Introduction to the Project Module
      • Project Profitability
      • Project Reports
      • Project Type
      • Project Update
      • Project from Customer Portal
      • Activity Cost
      • Project Costing
      • Project
      • Tasks
      • Project Views
      • Sales Invoice from Timesheet
      • Delayed Tasks Summary
      • Project Profitability Report
    • Articles
      • Make A Colorful Gantt Chart
Powered by GitBook
On this page
  • 1. Setting up Raw Printing in ActiveBooks
  • 2. Methods to utilize raw printing in ActiveBooks

Was this helpful?

  1. Printing

Raw Printing

Sending a string of commands to a printer directly in its native language is called Raw Printing.

  • Many thermal printers need these raw commands sent to them in order to perform functions like barcode printing, receipt printing, label printing, etc.

  • Raw Printing bypasses the printer's drivers in most cases, making them very fast and reliable.

  • Raw Printing is also capable of doing some advanced features such as cutting receipt paper, kicking out cash drawers, etc.

1. Setting up Raw Printing in ActiveBooks

1.1 Installing QZ Tray application on the client computer

  • Download and install the QZ Tray application on the computer to which your thermal printer is connected.

  • This application can be found at its official site.

  • Currently, Windows, macOS, and Linux are supported by QZ Tray.

  • During the installation you will be prompted to install Java if not already installed, please install Java to complete the installation.

1.2 Create Raw Commands Print Format

  • To be able to send raw commands to a printer you need to first create a print format in raw commands.

  • Jinja Templating Language is used in raw commands just like in the HTML Custom Print Format.

To create a new print format for Raw Printing:

  1. Go to print format list: Home > Settings > Printing > Print Format

  2. Click on New.

  3. Select the relevant DocType.

  4. Check the Custom format and Raw Printing options.

  5. Fill in the Raw Commands field with the required raw commands to be sent to the printer.

  6. Click Save.

  • Currently, any string-based printer languages can be used in the Raw Commands field in the print format.

  • Writing raw commands requires knowledge of the printer's native language provided by the printer manufacturer.

  • Please refer to the developer manual provided by the printer manufacturer on how to write their native commands.

1.3 Enable Raw Printing in the Print Setting

To enable Raw Printing:

  1. Go to: Home > Settings > Printing > Print Settings > Raw Printing.

  2. Check the Enable Raw Printing option.

  3. Save.

2. Methods to utilize raw printing in ActiveBooks

There are two ways to send Raw Printing commands to your printer.

To print a raw command print format from the Document print view:

  1. Select appropriate print format. For print format in Raw Commands, "No Preview available" message is shown in place of the print preview.

  2. Click on the print button.

  3. Please allow the connection prompt from the QZ Tray for the actions that you initiated (Keyboard Shortcut: Alt + A).

You may be asked to select the "print format - printer mapping".

  • This mapping is used to send the print commands to the appropriate printer.

  • The printer needs to be installed on your computer to be able to map it to a print format.

  • This mapping is stored locally on the same computer and will have to be set on each client machine.

  • You can also edit this by clicking on the Printer Settings button.

2.2 Calling Raw Print functions from a client script

  • It is often a requirement that a print command has to be issued on a certain event (like submit, save, amend, etc.).

  • It is possible to write a client script to do this for you.

Following are the relevant Raw Print functions:

  1. function: frappe.ui.form.qz_connect

    • A connection wrapper to establish a connection with the QZ Tray application.

    • Returns a promise which resolves on successful establishment of a connection.

    • Allows active and inactive connections to resolve regardless. Hence it can be called every time before sending a command.

ere, qz is a global object provided by the qz-tray.js library.

  1. function: frappe.ui.form.qz_get_printer_list

    • Gives you the list of printers available to the QZ Tray application

    • Returns a promise which resolves to a list of printers

    1. function: frappe.ui.form.qz_success

      • Displays a "Print Sent to the printer!" alert to the user. Can be called after the print command is successful.

    2. function: frappe.ui.form.qz_fail

      • Displays the error message to the user. Should be called on failure of QZ Tray connection.

PreviousCustom TranslationsNextWorkflows

Last updated 3 years ago

Was this helpful?

2.1 Clicking print on the print view page

You can also directly access the functions provided by the qz-tray.js library via the qz object. . Note: The qz object is initialized only after calling the frappe.ui.form.qz_connect for the first time. In case you require the qz object before that you can use the frappe.ui.form.qz_init.

Click here for qz-tray.js library documentation