Java coupon printing

Asked

Viewed 1,341 times

1

How I do coupon printing in java, both in dot matrix printer, and both in tax-free thermal printer?

And covering all manufacturers... has as?

Programming changes depending on the manufacturer?

  • 1

    Unfortunately your question is too wide for an objective question and answer site. Try starting something here: http://answall.com/search?q=cupom+fiscal and as you focus your doubts on more specific issues, ask isolated questions for each step of the development. Here are some tips to elaborate your question: [Ask] - If you want to detail the current question better, making it clearer what you already know and which parts you don’t know, you can click [edit] and add information.

  • So, not that anything about code, my question is whether I need to program for every nontax printer manufacturer or has how to cover all, in just one way..

2 answers

1

Each tax printer manufacturer releases their sdk for developers. You will have to develop individually, because the functions depends on how each company set up. If you do it for Daruma and Bematech you will already have covered much of the market. But there are still other brands like Elgin, etc.. Regarding to cover all manufacturers you can assemble an interface with some standard methods, but there are many methods and with different signatures(Opens coupon, Closes coupon, etc...)then I think you better implement for these two brands and then gradually you advance the project.

  • You can start at the Daruma website: http://www.developerssdaruma.com.br/home/index.php

1

The printing of coupons depends on various factors and state where the sale is made, I will try to explain in general.

The coupon can be 3 types:

  1. Coupon Normal
  2. NFC-e, Electronic Consumption Invoice
  3. SAT

Item 1 - Normal coupon, depends on a tax printer (sealed). Each manufacturer releases a DLL to send commands to the printer, simplifying development. The command list of this type of printer is theoretically the same between models and manufacturers, but changes only the name of each function.

Item 2 and 3 - Can be printed on any type of printer. It has Qrcode and other complex elements, and if you are going to use coupon printer that does not need to be sealed, you will have to use the manufacturer’s DLL to access the functions.

Solution

To do something centralized, you will need to make an interface, with the commands you want to use and implement for each printer using the manufacturer’s DLL.

Remembering that the DLL may differ between printer models from the same manufacturer.

  • Normal coupon does not need DLL on almost all brands, you can command the printer directly. The DLL is just a facilitator (except in the case of the SAT, because the bureaucrats - to put it mildly - instead of creating a standard protocol, determined that the interface is the DLL, linking the developer to specific Oses).

  • I understood, in the case of the SAT, that SAT manufacturers are obliged to follow a standardization for the functions of Dlls. Suppose I program for the Bematech SAT, then to run the Dimep SAT, for example, just change the DLL? Because the signature of the functions in the Dlls are standardized...

  • @Rodrigolima does it. You make the interface unique, and call the same functions in different DLL. But your case is print, so if it’s item 1 or 2 I put in, it could be any printer, it doesn’t have to be coupon.

  • I get it, so in case I want to print a nontax coupon on a Bematech and Daruma nontax thermal printer, for example, I have to program for both Dlls?

  • @Rodrigolima excuses the delay to answer, depends, but with 95% sure yes. Because the SAT and CF-e coupon, has Qrcode and other particularities that only the manufacturer’s DLL does. For example in the company I work, we send to the printer the image of Qrcode that was mounted on the outside. This is why the use of interfaces is so important in this project.

  • Got it, but in case this Qrcode that was generated on the outside is dependent on the DLL from the manufacturer?

  • In this case no, but was using another DLL feature which is to print an image. But theoretically all new printers have Qrcode support, and this case was a special situation.

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.