Mike,

 

The command:

 

LAUNCH CMD_PRINT|lab.pdf HIDE

 

Will work on version 9.5 only. If you want to print a PDF file using 9.1 and
you have the PDF file open in a form using the PDF viewer then you can place
the following code on a button:

 

PROPERTY PDFVIEWER PRINT 'HIDE_DIALOG'

 

And it will print the file displayed. There are other Property options that
allow you to print page ranges and so on.

 

If you want to print a PDF file without opening it first, the you have to
use the Acrobat switches.

You can create a batch file on the run:

 

-- define variables

-- vFileName holds the name of your PDF File

SET VAR vCommand TEXT = ('CALL START /MIN AcroRd32.exe /h /p' & .vFileName)

 

-- Create a batch file to print your file

DELETE PrintPDF.bat

OUTPUT PrintPDF.bat

WRITE .vCommand

OUTPUT SCREEN

 

LAUNCH PrintPDF.bat

RETURN

 

That should do it. You might need to tweak the code to make sure you don't
leave open versions of Acrobat..

 

Javier,

Javier Valencia, PE

O: 913-829-0888

H: 913-397-9605

C: 913-915-3137

 

From: [email protected] [mailto:[email protected]] On Behalf Of Michael J.
Sinclair
Sent: Monday, May 28, 2012 8:18 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Having a problem with LAUNCH cmd_print in version 9.5
(correction)

 


(correction, I am using the | sympbol but I get the same error)


Hi All,

 

I think I found my answer to my previous question about how to print a file,
but I am having problems with the syntax.

 

Assuming the file is located in the working directory of Rbase (C:\filer),
and the filename is lab.pdf

 

I can display the file like this...

 

LAUNCH lab.pdf

 

But if I try to send the file to a printer, any printer like this...

LAUNCH cmd_print | lab.pdf 

or

LAUNCH cmd_print | c:\filer\lab.pdf

or

LAUNCH cmd_print | 'c:\filer\lab.pdf'

 

I get an error message.... "The specified file was not found"

 

What am I doing wrong?

 

Mike SInclair

 

Reply via email to