Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tray update
Message
De
26/10/2004 06:08:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00952356
Message ID:
00954479
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform