Printing to Brother Label Printer from a Browser [UPDATED]

I want to print shortcuts from my Brother Label printer from a web browser. I know that DYMO has a JavaScript environment that makes printing from the browser simple. But I have clients with a Brother label printer, so I need to get it working.

I did some tests and some searches, and it is amazing how little information on this.

So far, the only browser I've had success with is Google Chrome, since it doesn't seem to print headers and footers. I installed the printer / drivers and created a custom paper size of 62 x 29 mm.

Custom paper size

When I try to print it breaks the text into 5 labels. I have the following text on the page I'm trying to print:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Print</title> </head> <body> <p style="margin: 0; padding: 0; line-height: 13px; font-size: 11px; font-family: Arial; font-weight: normal; border: 1px solid #000;">Line 1<br /> Line 2</p> </body> </html> 

But it prints 5 pages, as you can see from the sample print queue. A.

Custom paper size

Does anyone solve this earlier or have any suggestions.


UPDATE

After changing the fields listed in the first screenshot above 0, he reached two pages. But there is a huge margin around this:

2 Pages

+7
javascript browser printing
source share
1 answer

This answer will not solve your problem in 100%. I tested it with Safari with custom paper settings - the same as in your example. I tested it for printing in PDF format, so it may be slightly different with the specific printer driver. In your CSS and HTML example, there are no fields and the add-on reset. Here is an example for printing @media:

 @media print { body, html, p { margin: 0pt !important; padding: 0pt !important; } @page { margin: 0pt !important; padding: 0pt !important; } } 

With these settings, 2 lines of text are on the same page, hover over a value that cannot be reduced to 0.

+3
source share

All Articles