I just committed the patch[1] of it into the trunk. Please check out the camel-2.11-SNAPSHOT to verify the patch.
[1]http://svn.apache.org/viewvc?rev=1387889&view=rev -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: willemjiang On Thursday, September 20, 2012 at 11:57 AM, Willem jiang wrote: > I think we can add a printer prefix option on the camel-printer endpoint to > help us find the right printer we want. > I just fill a JIRA[1] for it. > > [1]https://issues.apache.org/jira/browse/CAMEL-5630 > -- > Willem Jiang > > Red Hat, Inc. > FuseSource is now part of Red Hat > Web: http://www.fusesource.com | http://www.redhat.com > Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) > (English) > http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese) > Twitter: willemjiang > Weibo: willemjiang > > > > > > On Thursday, September 20, 2012 at 6:09 AM, jmh wrote: > > > thanks Babak > > > > But I have another problem on Windows 2008 server. > > > > services (printers) are prefixed by "Win32 Printer :" > > > > i.e :[Win32 Printer : Microsoft XPS Document Writer, Win32 Printer : > > \\nrbnrw0264\nrbco006] > > > > But when I look the source code, I realize that it can never be equal to the > > config :-( > > > > > > <pre> > > PrintService printService; > > 085 > > 086 if ((config.getHostname().equalsIgnoreCase("localhost")) > > 087 && > > (config.getPrintername().equalsIgnoreCase("/default"))) { > > 088 printService = > > PrintServiceLookup.lookupDefaultPrintService(); > > 089 } else { > > 090 PrintService[] services = > > PrintServiceLookup.lookupPrintServices(null, null); > > 091 setPrinter("\\\\" + config.getHostname() + "\\" + > > config.getPrintername()); > > 092 int position = findPrinter(services, printer); > > 093 if (position < 0) { > > 094 throw new PrintException("No printer found with name: > > " + printer + ". Please verify that the host and printer are registered and > > reachable from this machine."); > > 095 } > > 096 printService = services[position]; > > 097 } > > 098 return printService; > > 099 } > > 100 > > 101 private int findPrinter(PrintService[] services, String printer) > > { > > 102 int position = -1; > > 103 for (int i = 0; i < services.length; i++) { > > 104 if (printer.equalsIgnoreCase(services[i].getName())) { > > 105 position = i; > > 106 break; > > 107 } > > 108 } > > 109 return position; > > 110 } > > </pre> > > > > J-M > > > > > > > > -- > > View this message in context: > > http://camel.465427.n5.nabble.com/print-a-PDF-with-camel-printer-tp5719615p5719631.html > > Sent from the Camel - Users mailing list archive at Nabble.com > > (http://Nabble.com). >