thilino / jzebra

Automatically exported from code.google.com/p/jzebra
0 stars 0 forks source link

Parentheses in Printer name #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Newer versions on jZebra does not allow you to print from printers with 
parentheses in their name. Version 1.0.9 does. Not sure which version stopped 
allowing this but, newer versions fail to print.

Original issue reported on code.google.com by rvtecrv...@gmail.com on 15 Mar 2012 at 1:25

GoogleCodeExporter commented 8 years ago
It should allow it, but will require you to escape the characters with a double 
backslash "\\(".  This is an inconvenience introduced with the use of RegEx 
word boundary matches internal to the jZebra find printer function.

Since RegEx in itself is its own language with its own reserved characters, 
this makes a lot of characters invalid.  The impact is minimal since most of 
those characters aren't allowed in an OS printer name, however you found one!

Try this:

document.jzebra.findPrinter("Printer Name \\(back office\\)");

-Tres

Original comment by tres.fin...@gmail.com on 15 Mar 2012 at 4:05

GoogleCodeExporter commented 8 years ago
I put some more thought to this and realized how stupid that functionality is.  
Fixed.

printerName = "\\Q" + (String) o + "\\E";

Try version 1.3.5 from download, this should remedy this problem:
http://code.google.com/p/jzebra/downloads/list?can=3

-Tres

Original comment by tres.fin...@gmail.com on 15 Mar 2012 at 4:42

GoogleCodeExporter commented 8 years ago

Original comment by tres.fin...@gmail.com on 15 Mar 2012 at 4:43

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Windows has a tendency to add in parentheses when there is a duplicate name or 
for printers to identify which driver (ex. (ZPL) or (EPL)).I tried escaping 
parenthesis with backslashes to no avail, before I posted. The new version 
seems to remedy this problem, though. Thanks!

Original comment by rvtecrv...@gmail.com on 15 Mar 2012 at 2:51

GoogleCodeExporter commented 8 years ago
Great!  Marking as closed.

Original comment by tres.fin...@gmail.com on 15 Mar 2012 at 5:26