Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tray update
Message
From
26/10/2004 06:08:09
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00952356
Message ID:
00954479
Views:
14
>Srdjan,
>
>>>I wrote my own higher level printer language *bg*, that got interpretted by VFP to PCL.
>
>Ok I was thinking about another project where I wrote the printer language.
>
>This forms code was started in FPW and since it ran as is in VFP I never bothered converting it to OO.


Hi David:)

Looking at yr code, idea comes to my mind ;

Making class having universal calls for common tasks
like
oPrinter.write_at(nTop , nLeft,'Hello')
oPrinter.draw_box(nTop , nLeft,nDown,nRight,nTick)
oPrinter.paint_box(nTop , nLeft,nDown,nRight, nr,ng,nb )
oPrinter.draw_picture(nTop , nLeft,nDown,nRight, cBmpFile)
etc
.
etc.

While internaly tasks could be dispatched to different methods for
different printer types ...
define class virtual_printer as custom

output_type='PostScript'

procedure open_device
.

procedure close_device
.

procedure write_at   
lparameters nTop , nLeft,cOutpuText

do case

   case this.output_type = 'PCL4' 
        this.pcl4_write_at(lparameters nTop , nLeft,cOutpuText)

   case this.output_type = 'PostScript' 
        this.postsript_write_at(lparameters nTop , nLeft,cOutpuText)

   .
   
   .

endcase



enddefine
It could be sort of 'open source', so who ever hv valid code for controling
certain printer type can contribute in making versatile class
for programatticaly writing to laser printers.


Just Idea :))
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform