Print PDF directly on a VT emulator (Reflection or Powerterm)

Johnson, Harold A EDUC:EX Harold.A.Johnson at gov.bc.ca
Mon Jun 12 10:40:05 CDT 2006


BTW - if anyone is interested, here is the command file that we use from the OpenVMS side of things.


Using this method, the PDF files remain on the web server, unless someone intentionally makes a copy. We also create long, random filenames for the extracted PDF's (like X123Y341233ESD15534.PDF, etc..) so they are not identifiable by the filename. The web site is also setup so no-one can browse the subdirectory. You'd have to know what filename you are looking for to get it.

Before this method, we used to send the actual PDF files through Reflections directly, but this would leave copies of the PDF files on the target machine, which we didn't like.  

Cheers





>From: "Johnson, Harold A EDUC:EX" <Harold.A.Johnson at gov.bc.ca>
>To: Etienne Rompré <erompre at koala-tech.com>,        
><powerh-l at lists.sowder.com>
>Subject: RE: Print PDF directly on a VT emulator (Reflection or 
>Powerterm)
>Date: Thu, 8 Jun 2006 12:44:07 -0700
>MIME-Version: 1.0
>Received: from sowder.com ([207.210.77.31]) by 
>bay0-mc2-f5.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); 
>Thu, 8 Jun 2006 12:52:33 -0700
>Received: from sowder.com (localhost [127.0.0.1])by sowder.com
>(8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k58JjDHf013628for 
><pfbcs at hotmail.com>; Thu, 8 Jun 2006 14:53:05 -0500
>Received: from twig.itsd.gov.bc.ca (twig.itsd.gov.bc.ca 
>[142.32.11.119])by sowder.com (8.13.4/8.13.4/Debian-3sarge1) with ESMTP
>idk58Jiqk4010105(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA 
>bits=168 verify=NOT)for <powerh-l at lists.sowder.com>; Thu, 8 Jun 2006 
>14:45:04 -0500
>Received: from roll.idir.bcgov ([142.32.12.56])by twig.itsd.gov.bc.ca
>(8.12.5-20030917/8.12.5) with ESMTP idk58Ji7uR030822; Thu, 8 Jun 2006
>12:44:11 -0700
>Received: from herd.idir.bcgov ([142.32.12.29]) by roll.idir.bcgov 
>withMicrosoft SMTPSVC(5.0.2195.6713); Thu, 8 Jun 2006 12:44:07 -0700
>X-Message-Info: LsUYwwHHNt3OJmZPjp1rZ7wua0M0RBdXwfq5oGtoA1A=
>X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0
>content-class: urn:content-classes:message
>X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Print PDF directly 
>on a VT emulator (Reflection or Powerterm)
>Thread-Index: AcaLBoD6OjXFX881T92sL4r61bO09wALOj6w
>X-OriginalArrivalTime: 08 Jun 2006 19:44:07.0759 
>(UTC)FILETIME=[E7F16DF0:01C68B33]
>X-DRS-drsmilter-Version: drsmilter CVS $Id: drsmilter.py,v 1.82 
>2006/04/04
>13:38:59 drsmilter Exp $
>X-DRS-drsmilter-Version: drsmilter CVS $Id: drsmilter.py,v 1.82 
>2006/04/04
>13:38:59 drsmilter Exp $
>X-MIME-Autoconverted: from quoted-printable to 8bit by sowder.com
>idk58Jiqk4010105
>X-BeenThere: powerh-l at lists.sowder.com
>X-Mailman-Version: 2.1.5
>Precedence: list
>List-Id: Cognos PowerHouse 4GL <powerh-l.lists.sowder.com>
>List-Unsubscribe: 
><http://lists.sowder.com/mailman/listinfo/powerh-l>,<mailto:powerh-l-re
>quest at lists.sowder.com?subject=unsubscribe>
>List-Archive: <http://lists.sowder.com/pipermail/powerh-l>
>List-Post: <mailto:powerh-l at lists.sowder.com>
>List-Help: <mailto:powerh-l-request at lists.sowder.com?subject=help>
>List-Subscribe: 
><http://lists.sowder.com/mailman/listinfo/powerh-l>,<mailto:powerh-l-re
>quest at lists.sowder.com?subject=subscribe>
>Errors-To: powerh-l-bounces+pfbcs=hotmail.com at lists.sowder.com
>Return-Path: powerh-l-bounces+pfbcs=hotmail.com at lists.sowder.com
>
>We've have done this for the last few years by extracting the PDF from 
>our database (where we have it stored) and copying it on our OpenVMS 
>machine to a subdirectory that is accessible to Apache.  Then we just 
>pass the command and URL through Reflections using the macro language.  
>This then calls up the Internet Explorer which then goes and looks for 
>the PDF at the URL (which then calls up the Adobe Reader or the Reader plugin with IE).
>
>I can send you the VMS command file that we use for passing the URL 
>through Reflections if you want.
>
>Cheers
>
>
>-----Original Message-----
>From: powerh-l-bounces+harold.a.johnson=gov.bc.ca at lists.sowder.com
>[mailto:powerh-l-bounces+harold.a.johnson=gov.bc.ca at lists.sowder.com] 
>On Behalf Of Etienne Rompré
>Sent: Thu, June 8, 2006 7:10 AM
>To: powerh-l at lists.sowder.com
>Subject: Print PDF directly on a VT emulator (Reflection or Powerterm)
>
>Hi to all,
>
>This might be off topic but I'll give it a try anyway...
>
>OpenVMS 7.3
>Powerhouse 8.30
>
>Actually, we used dot matrix printer to print rental agreement in our 
>locations.
>
>Using the proper esc sequence, we print these on pre-printed form via 
>the slave printer on a VT or via the emulation program.
>
>We are looking to to move from plain text to PDF form with the graphics 
>in the PDF to print directly to laser printer.  (That part is Done)
>
>Actually, they can get to theses reports via FTP with a dedicated 
>directly for every user...
>
>Buy now, it's the user that have to start the process manually.
>
>Now here is the question:
>
>Can this be automated from the Alpha side when the report is done so 
>the PDF report would be sent automatically to the PC (reflection or 
>Powerterm or other solution) (no VT here) and launch the PDF reader 
>(Foxit reader if possible...a lot faster than Acrobat) so the rental 
>agent can print it directly?
>
>As anyone done something similar ?
>
>
>I'm sorry if this is off topic.
>
>
>Thanks!
>
>
>
>--
>Etienne Rompré
>
>Koala Technologies
>Québec Canada
>
>tel: (418) 572-4545
>fax: (418) 834-9153
>courriel/email: erompre(at)koala-tech.com
>www:  http://www.koala-tech.com/
>
>
>
>
>--
>= = = = = = = = = = = = = = = = = = = = = = = = = = = = Mailing list: 
>powerh-l at lists.sowder.com
>Subscribe: &quot;subscribe&quot; in message body to 
>powerh-l-request at lists.sowder.com
>Unsubscribe: &quot;unsubscribe &lt;password&gt;&quot; in message body 
>to powerh-l-request at lists.sowder.com 
>http://lists.sowder.com/mailman/listinfo/powerh-l
>This list is closed, thus to post to the list you must be a subscriber.
>Add 'site:lists.sowder.com powerh-l' to your search terms to search the 
>list archive at Google.
>
>
>
>--
>= = = = = = = = = = = = = = = = = = = = = = = = = = = = Mailing list: 
>powerh-l at lists.sowder.com
>Subscribe: &quot;subscribe&quot; in message body to 
>powerh-l-request at lists.sowder.com
>Unsubscribe: &quot;unsubscribe &lt;password&gt;&quot; in message body 
>to powerh-l-request at lists.sowder.com 
>http://lists.sowder.com/mailman/listinfo/powerh-l
>This list is closed, thus to post to the list you must be a subscriber.
>Add 'site:lists.sowder.com powerh-l' to your search terms to search the 
>list archive at Google.

_________________________________________________________________
Find out more about Canada's Real Estate Outlook in Sympatico / MSN's Spring Lending Features  http://spring.finance.sympatico.msn.ca/

--
= = = = = = = = = = = = = = = = = = = = = = = = = = = = Mailing list: powerh-l at lists.sowder.com
Subscribe: &quot;subscribe&quot; in message body to powerh-l-request at lists.sowder.com
Unsubscribe: &quot;unsubscribe &lt;password&gt;&quot; in message body to powerh-l-request at lists.sowder.com http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.


-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: &quot;subscribe&quot; in message body to powerh-l-request at lists.sowder.com
Unsubscribe: &quot;unsubscribe &lt;password&gt;&quot; in message body to powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.


-------------- next part --------------
$!Routine: IMAGE_OUT.COM
$!
$!	1. Launch Internet Browser on the PC and open the file
$!
$!   How it works:
$!
$!   See "SET HOST-INITIATED-COMMANDS" in the Reflection Command Language
$!	Manual for more detail.
$!
$!  P1 is the incoming PDF filename
$!  s_ENVIRONMENT is a symbol indicating which envirnment this procedure is 
$!  running in.
$!
$!**************************************************************************
$! Modifications
$!
$!**************************************************************************
$!
$!   Initialization - Set up some useful symbols
$!
$ ESC[0,8]=%X1B
$ CURSOR_UP=ESC+"M"
$ POSITION=ESC+"[22;1H"
$ CLEAR_LINE=ESC+"[2K"
$ HOME_AND_CLEAR=ESC+"[H"+ESC+"[2J"
$!
$!	Define the WRQ command escape sequences.
$!
$ WRQ1=ESC+"P1234;1{"
$ WRQ0=ESC+"P1234;0{"
$ ST = ESC + "\"
$ CMD=POSITION+WRQ0
$!
$!   6. Now pass the URL to view the file
$!
$LAUNCH_OUT:
$  out_file = P1
$  if s_ENVIRONMENT .eqs. "DEVE"
$  then
$    somefile = "http://deve.env.whatever/" + out_file
$  else
$    if s_ENVIRONMENT .eqs. "TEST"
$    then
$      somefile = "http://test.env.whatever/" + out_file
$    else
$      somefile = "http://prod.env.whatever/" + out_file
$    endif
$  endif
$!
$!$ write sys$output "file " + somefile
$!$ wait 000:00:10
$  write sys$output "Press return if your image does not appear."
$  r_command = WRQ1+"shell START " + somefile + ST
$  write sys$output r_command
$  read/prompt="" sys$command completion_code
$  if completion_code .eqs. "S" then goto exit
$  if completion_code .eqs. "F" then goto exit
$!
$NOT_REFLECTION:
$!
$!      Something is wrong. Reflection isn't responding to commands.
$!      The user will have to press Return to continue.
$!      This would happen if you were using a terminal instead of Reflection.
$!
$ write sys$output "Cannot start internet browser automatically"
$ write sys$output "Cut and paste this URL into your browser to access the image"
$ write sys$output somefile
$ wait 000:00:10
$ exit
$  goto exit
$
$OUT_START_ERROR:
$ write sys$output POSITION
$ inquire answer "Browser Image launch failed, please press return"
$ goto exit
$
$EXIT:
$ write sys$output CMD+"continue off"+ST
$ write sys$output CMD+"set literal-escape '$9'"+ST
$ write sys$output CMD+"set quiet-command '$8'"+ST
$ exit


More information about the powerh-l mailing list