[ https://issues.apache.org/activemq/browse/CAMEL-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52588#action_52588 ]
Ashwin Karpe commented on CAMEL-1675: ------------------------------------- Hadrian, Claus, I did some research on a Mock Printer API that would simulate/unit test printers, but did not find any readily available. However, I did find the following things. a> Microsoft has a Generic Text only printer driver that can write to a file. It can be installed as a regular windows printer and the port can be directed to a file. b> I could not find an equivalent capability on Linux/Mac OS-X for the same. I can validate that the printer will print text based out to the generic printer if set up as default or as a named printer. At the moment unfortunately, this is the best option. Another option is to modify the PrinterOperations.print() operation to redirect the output to a log file if an option such as test is set in the printer component URL. This will provide an option log the job details and be one line away from issuing the job to the printer. Please advise if this is something you would prefer... Cheers, Ashwin... > Created a new camel printer component that supports document/image printing > with copies, stationary and sides choices. > ---------------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-1675 > URL: https://issues.apache.org/activemq/browse/CAMEL-1675 > Project: Apache Camel > Issue Type: New Feature > Environment: Works on both Windows and UNIX > Reporter: Ashwin Karpe > Fix For: 2.1.0 > > Attachments: camel-printer.patch, camel-printer.zip > > > I have developed a camel printer component (producer) that facilitates > printing of documents and images when a Printer URL is speified on a route. > The component is developed using the standard javax.print package and uses > the standard java JDK packages to print to all manner of printers. > The Printer URL looks like the following: > " > lpr://localhost/default?copies=1&flavor=DocFlavor.BYTE_ARRAY&mimeType=AUTOSENSE&mediaSize=na-letter&sides=one-sided" > The component allows you to set the following parameters: > - copies > - flavor > - mimeType > - mediaSize > - sides > All the values are setting against the javax.print.attribute.standard > properties. > Can the committers, please review, comment and commit as apropriate. > Cheers, > Ashwin Karpe > Principal Consultant - Professional Services > Progress Software... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.