Thank you guys for the information provided, it was really helpful! I'm
going to research a little more in this subject and in the topics you
provided me.

Regards,
Diego Dillenburg Bueno


2014-08-04 16:52 GMT-03:00 Walther <walt...@diechmann.net>:

> You could start CUPS on the local webserver and attach the printer to cups
> and print the receipt in a delayed_job with a system call a la 'lp -d
> printer_name rendered_pdf_file_name'
>
> :)
>
> Med venlig hilsen
> Walther
>
> Den 04/08/2014 kl. 19.31 skrev Eric Saupe <ericsa...@gmail.com>:
>
> I was just thinking about doing something really quick like rendering a
> page that is printer friendly using Rails and just having them hit CTRL+P
> but if you wanted to bypass that and send it straight to the printer that
> works too. From a quick Google search it seems the best way is to issue OS
> commands using Ruby and sending it a generated PDF file. Here is a
> Stackoverflow link about it but I'm sure more searches will reveal better
> information,
> http://stackoverflow.com/questions/1608593/printing-a-file-to-a-printer-in-ruby.
> The only reason I would do it the other way is just to allow the user to
> preview the file before it is sent to the printer but if everything works
> and you don't mind reprinting or whatever then sending it straight to the
> printer would be faster for the user.
>
> Hope that helps.
>
> On Monday, August 4, 2014 11:26:50 AM UTC-6, Diego Dillenburg Bueno wrote:
>>
>> A quick update:
>>
>> it seems that the printer manufacturer provides a integration tool built
>> in a dll file. If that is of any help towards the solution.
>>
>>
>> 2014-08-04 14:22 GMT-03:00 Diego Dillenburg Bueno <diegodi...@gmail.com>:
>>
>>> Hey Eric,
>>>
>>> thanks for the attention, really helped me sorting out on what
>>> technologies to use. We were fearing that it would end out looking like
>>> some kind of "poor job" building it on a local server.
>>>
>>> As of the integration with periphericals I hadn't thought about this
>>> approach, it seems pretty straight forward, but another question that came
>>> up is: is there any known gem to help handling these communication cases?
>>>
>>> Again, thanks for the attention.
>>>
>>> Regards,
>>> Diego Dillenburg Bueno
>>>
>>>
>>> 2014-08-04 12:46 GMT-03:00 Eric Saupe <eric...@gmail.com>:
>>>
>>> Hey Diego,
>>>>
>>>> First, there is nothing wrong with running a local web server and just
>>>> having your browsers access it. Since the only users of your application
>>>> are going to be those on the same network it really doesn't matter if it is
>>>> hosted externally or internally and since the Internet going down is an
>>>> issue I would go ahead with your idea to just host it locally.
>>>>
>>>> Second, since it is a web application and would be accessed through
>>>> browsers it would have access to any peripherals the computer had. In this
>>>> case when you print a web site or PDF it doesn't matter where that came
>>>> from but that it is open in your browser. This means you can generate the
>>>> receipts in a new window/tab and just have them hit print.
>>>>
>>>>
>>>> On Monday, August 4, 2014 6:47:33 AM UTC-6, Diego Dillenburg Bueno
>>>> wrote:
>>>>>
>>>>> Dear Rail Developers,
>>>>>
>>>>> I'm kinda new to the RoR world and would appreciate if someone with
>>>>> the knowledge helped me out sorting some things.
>>>>>
>>>>> I got a new project that I'm supposed to do but came up with some
>>>>> questions, it's basically a system to manage a Pub with basic
>>>>> funcionalities like inventory control, cash flow and client controls
>>>>> (probably with a bar code card).
>>>>>
>>>>> Firstly we thought of doing it desktop based, in something like C# or
>>>>> Java, but came up with the idea of implementing it on a web based system.
>>>>> Then we came up with a couple questions:
>>>>>
>>>>> 1. The business couldn't rely on his ISP stability, as here we have
>>>>> really poor ISP, and the fact of the internet going down would probably
>>>>> ruin the entire night at the pub. The question would be: as if it were
>>>>> developed in Rails, what would be the praticability to run it in a local
>>>>> server primarily, but exporting it to a remote server everyday so it could
>>>>> also be accessed from home. I know it seems to go against some "laws" of
>>>>> web system developing, but would be quite the better solution for us. Or 
>>>>> if
>>>>> there is any other ways to manage it locally, without entirely needing an
>>>>> internet connection, in the worst of the cases.
>>>>>
>>>>> 2. As it is a business, here in Brazil, we have now the option to
>>>>> print the customer's receipt for his IRS declarations. So the other
>>>>> question would be: if possible, how is this integration from RoR with
>>>>> periphericals, such as printers, would follow? Or if should it be done in
>>>>> anything else such as js. Honestly, I have no clues yet on how to do so.
>>>>>
>>>>> Will appreciate any help given!
>>>>>
>>>>> Thanks in advance,
>>>>> Diego Dillenburg Bueno
>>>>>
>>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Ruby on Rails: Talk" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to rubyonrails-ta...@googlegroups.com.
>>>> To post to this group, send email to rubyonra...@googlegroups.com.
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/rubyonrails-talk/fc354f4f-830a-4b3a-b17f-
>>>> 18fae414dd55%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/rubyonrails-talk/fc354f4f-830a-4b3a-b17f-18fae414dd55%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/561195e5-e28e-4e3f-9567-7a44b2ebe505%40googlegroups.com
> <https://groups.google.com/d/msgid/rubyonrails-talk/561195e5-e28e-4e3f-9567-7a44b2ebe505%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/3227DEFF-35A4-4179-89D3-3B95E6F0A628%40diechmann.net
> <https://groups.google.com/d/msgid/rubyonrails-talk/3227DEFF-35A4-4179-89D3-3B95E6F0A628%40diechmann.net?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAOHSkmEBr2xrOC2qUOJz3ZACbDCA0BY8BuiZmj3bf%3DvRyDK%3DEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to