'Print' to screen in Windows environment

Brian K. White brian at aljex.com
Thu Nov 12 11:45:25 PST 2015


On 11/12/2015 1:01 PM, Bob Rasmussen via Filepro-list wrote:
> Thanks for the plug, Bob. Some pointers and clarifications:
>
> * The line starting with "::ptxtfile" (and elsewhere) seems to be
> missing a colon after "C". But I'm unfamiliar with this syntax.

I think you already did know all this, so please don't be insulted when 
you remember and get it 3 words in...

I think that is just the result of pasting the code right from a prc 
file using a text editor instead of rcabe, and there really is a ":" 
there in the code.

prc files use ":" as part of the prc file syntax itself, and so any ":" 
that you want inside text strings are encoded into Ctrl-A in the prc file.

lines are
label:condition:action:
and this line has no label and no condition, so it looks like
::action:

When you then look at that in a text editor, it might display that 
Ctrl-A as a ^A or as an empty box glyph or nothing at all, and then when 
you cut & paste that into an email client it's easy for all trace of the 
^A to be lost.


So, in rcabe you have this line

  12  -------   -   -   -   -   -   -   -   -   -   -   -   -
        ■ If:
        Then: ptxtfile = "C:\stprt\Inv" & 1 & ".txt"


that same line in a text editor looks like

::ptxtfile = "C^A\stprt\Inv" & 1 & ".txt":

or

::ptxtfile = "C█\stprt\Inv" & 1 & ".txt":

or such

And finally cutting and pasting into a mail client, depending on how the 
text editor happens to display non-printing character, and depending on 
how both the text editor and the email client handle the clipboard data 
during cut & paste, and who knows what all else along the way, all trace 
of the ^A can be lost and you're left with:

::ptxtfile = "C \stprt\Inv" & 1 & ".txt":
or
::ptxtfile = "C\stprt\Inv" & 1 & ".txt":

-- 
bkw



> * A command line parameter (CLP) will cause Printwiz.exe to invoke
> AcroRd32 or whatever your designated viewer is. I believe in your
> example you would attach "?view" to the end of pdffile.
> * A different CLP would tell printwiz to delete the input file.
> * A different CLP would tell printwiz to email automatically OR
> interactively. Variations on this would allow deleting the PDF file.
> * The printcodes that get fed to printwiz should be PCL-5. Printwiz can
> translate those.
>
> On Thu, 12 Nov 2015, Bob Simcoe via Filepro-list wrote:
>
>> I used the same technic as Rick to create the text file, but then I
>> use Printwiz to turn it into a PDF, then Adobe Reader displays a PDF
>> on the screen. The PDF can then be printed, emailed, faxed etc. I use
>> this because the txt file doesn't accept the print codes of the
>> filepro outout, printwiz does. The txt to PDF process is not
>> noticeable to the user.
>>
>> Here's a sample of my code to print a pdf of selected Invoice to the
>> screen.
>>
>> ::putenv "invno",1             '1 is the invoice number just entered:
>> ::ptxtfile = "C \stprt\Inv" & 1 & ".txt":
>> ::pdffile = "C \stprt\Inv" & 1 & ".pdf":
>> :'print as txt file to C \stprt directory
>> ::system "\fp\dreport SavedInvoicedLineItems -f InvoiceF2 -v
>> sInvoiceFile -ij -a -p" < ptxtfile:
>> :'use printwiz to generate pdf from txt output
>> ::system "C \Program Files\Rasmussen Software, Inc\Print Wizard
>> 4\printwiz" < ptxtfile < "/pdf /q":
>> :'use Reader to display & process pdf file
>> ::system "start AcroRd32.exe" < pdffile:
>>
>> I use this routine for most of my print outs, it's nice because I can
>> direct the printout to any printer, even my home printers if I'm
>> remote. What's good and bad, is that it does save the txt and pdf files.
>>
>> Bob Simcoe
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: Filepro-list [mailto:filepro-list-
>>> bounces+bob=midcityoffice.com at lists.celestial.com] On Behalf Of Rick via
>>> Filepro-list
>>> Sent: Thursday, November 12, 2015 11:47 AM
>>> To: Filepro-list at lists.celestial.com
>>> Subject: Re: 'Print' to screen in Windows environment
>>>
>>> I have a printer which sends to c:\hardcopy.txt so it's always on the
>>> local
>>> machine.
>>> The script from the menu runs the report than launches notepad
>>> c:\hardcopy.txt
>>>
>>> Rick Mitchell
>>>
>>>
>>>
>>> On Nov 11, 2015, at 7:25 PM, Robert T. Repko via Filepro-list wrote:
>>>
>>>> I have a client running version 5.0.05DN9 on a Windows based PC.  I
>>>> want to
>>> 'print' reports to the screen.  I've done it for years on Unix but
>>> never had to
>>> do it in Windows.  I have the Unix commands cat & less installed on
>>> the PC.  I
>>> tried the same commands I used in Unix:
>>>>
>>>> |cat > c:\temp\view$$ & less c:\temp\view$$, but that failed.
>>>>
>>>> Since I'm not sure of the Windows equivalent of view$$ I tried:
>>>>
>>>> |cat > c:\temp\view.txt & less c:\temp\view.txt, but that also
>>>> failed.  I
>>> received the following error:
>>>>
>>>>
>>>>
>>>> Cannot Open Print Command
>>>>
>>>> |cat > c:\temp\view.txt & less c:\temp\view.txt: No such file or
>>>> |directory
>>>>
>>>>
>>>>
>>>> C:\temp\view.txt does exist.  If I manually populate view.txt I can cat
>>> view.txt and less view.txt without errors so I know those commands are
>>> working.
>>>>
>>>>
>>>>
>>>> In the menu I have -pq to allow selecting screen as a 'print'
>>>> option.  I don't
>>> want to select display, it doesn't display on the screen as nicely as
>>> less.
>>>>
>>>>
>>>>
>>>> Any ideas greatly appreciated.
>>>>
>>>> This email was scanned for viruses by ClamAV AntiVirus.
>>>>
>>>> -------------- next part -------------- An HTML attachment was
>>>> scrubbed...
>>>> URL:
>>>> <http://mailman.celestial.com/pipermail/filepro-list/attachments/20151
>>>> 111/2a8debac/attachment.html>
>>>> _______________________________________________
>>>> Filepro-list mailing list
>>>> Filepro-list at lists.celestial.com
>>>> Subscribe/Unsubscribe/Subscription Changes
>>>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>>>
>>> _______________________________________________
>>> Filepro-list mailing list
>>> Filepro-list at lists.celestial.com
>>> Subscribe/Unsubscribe/Subscription Changes
>>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> Subscribe/Unsubscribe/Subscription Changes
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>>
>
> Regards,
> ....Bob Rasmussen,   President,   Rasmussen Software, Inc.
>
> personal e-mail: ras at anzio.com
>   company e-mail: rsi at anzio.com
>            voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
>              fax: (US) 503-624-0760
>              web: http://www.anzio.com
>   street address: Rasmussen Software, Inc.
>                   10240 SW Nimbus, Suite L9
>                   Portland, OR  97223  USA
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>



More information about the Filepro-list mailing list