Pdfwriter printing


#1

Hi All,

pdfwriter rocks but me brain does not :slight_smile:
how does one print a pdf object using ruby? i can create it fine using
#save_as. i was looking for something like #print

i’d like to print it in windows and linux env.

thanks and kind regards -botp


#2

On 12/12/05, Peña, Botp removed_email_address@domain.invalid wrote:

Hi All,

pdfwriter rocks but me brain does not :slight_smile:
how does one print a pdf object using ruby? i can create it fine using #save_as. i was looking for something like #print

i’d like to print it in windows and linux env.

thanks and kind regards -botp

Doubt you can print straight from Ruby.

However, in Linux and maybe OS X, you can execute shell commands that
will print stuff. lpr #{ file_name_of_pdf_file } should print the
file to some default printer. No clue about Windows.


#3

From the annoyingly (thought not surprisingly) PDF formatted document
(http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/intro_to_sdk/DeveloperFAQ.pdf):

AcroRd32.exe /p pathname
Executes Adobe Reader and displays the Print dialog box.

AcroRd32.exe /t path “printername” “drivername” “portname”
Initiates Adobe Reader and prints a file, whose path must be fully
specified, while suppressing the Print dialog box. The four parameters
of the /t option evaluate to path, printername, drivername,

HIH
pth