Hello community,
where can I change the printer mapping after I linked a printer to a specific doctype?
Can’t find anything with awesome search bar or anything.
thanks in adanvce
Hello community,
where can I change the printer mapping after I linked a printer to a specific doctype?
Can’t find anything with awesome search bar or anything.
thanks in adanvce
no one?
In ERPNext, printer mappings for specific DocTypes are managed through the Print Settings and Print Format configurations. If you have linked a printer to a specific DocType and need to change this mapping, you will need to update the relevant settings.
Access Print Settings:
Modify Printer Settings:
Check Print Format:
If you are using custom scripts or configurations to manage printer mappings for specific DocTypes, you might need to update the configuration in your custom scripts or the respective server-side code.
If a custom script is handling the printer mapping, locate the script and update the relevant lines of code.
Go to Custom Script:
Edit the Relevant Script:
Here is an example of how you might set a printer in a custom script:
frappe.ui.form.on('Sales Invoice', {
print_doc: function(frm) {
// Custom script to set printer
frm.set_df_property('printer', 'options', ['Printer1', 'Printer2', 'Printer3']);
frm.set_value('printer', 'Printer2'); // Set the default printer
frm.print();
}
});
If your printer mapping logic is tied to specific print formats, ensure you update the correct print format.
Navigate to Print Format:
Edit Printer Settings:
bench clear-cache
@AmeerBaathar thank you very much. Unfortunately I can’t see any setting to set printers per document type (see screenshot=
I usually check the Print Settings first to see if I can switch the default printer there. If that doesn’t do it, I dig into the Print Format linked to the doctype and tweak the settings. One time, I had to fix it through a custom script—just searched for “Custom Script,” found the right one, and updated it.
Also, while messing with my setup, I came across some good options for the cheapest dtf printer. If you’re thinking of upgrading, it’s worth a look. Saved me a headache when I needed something reliable.