# Printing with ruby under windows

**URL:** <https://www.ruby-forum.com/t/printing-with-ruby-under-windows/141059>\
**Category:** Ruby\
**Created:** [June 21, 2008, 2:37pm UTC](https://www.ruby-forum.com/t/printing-with-ruby-under-windows/141059 "2008-06-21T14:37:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [June 21, 2008, 2:37pm UTC](https://www.ruby-forum.com/t/printing-with-ruby-under-windows/141059/1 "2008-06-21T14:37:37Z")

</div>

Anyone knows if there is an easy, straight-forward way to print a i.e.

foobar.pdf

file on windows?

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [June 21, 2008, 3:20pm UTC](https://www.ruby-forum.com/t/printing-with-ruby-under-windows/141059/2 "2008-06-21T15:20:47Z")

</div>

-------- Original-Nachricht --------

> Datum: Sat, 21 Jun 2008 21:36:02 +0900  
> Von: Marc H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> An: removed\_email\_address@domain.invalid  
> Betreff: Printing with ruby under windows

> Anyone knows if there is an easy, straight-forward way to print a i.e.
> 
> foobar.pdf
> 
> ## file on windows?
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

Dear Marc,

I managed to print something in Vista Ultimate with the following  
command:

system(“C:/Program Files/Adobe/Reader 8.0/Reader/AcroRd32.exe /p  
gpcard.pdf”).

(Still had to press the Ok button in the printer dialog…)

You’ll maybe have to give the full path of both Acroread and of the file  
you want to print.  
And I also had to change the file separators to forward slashes…  
Here’s an old post that describes this and other options :

[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/32861](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/32861)

Best regards,

Axel
