Thanks for the response. Let me take a moment to further explain the big picture (I should have done this from the start). I am writing a print job manager to allow users the ability to submit a batch of forms to print in 1 print job. Approximately 95% of the forms submitted are in PCL format and the other 5% are RTF. If printing to a PCL printer, I spool all PCL pages to a spooler directory. When I encounter an RTF page, I load the file into a richedit and tell the richedit to print to a file using the PCL printer driver; this creates a PCL version of the RTF file which I save to the spooler directory with the other PCL pages. After all pages have been spooled, I then send them as ‘RAW’ data to the printer. I’m using windows API functions to perform the printing for PCL (startdocprinter, startdocpage, etc…).
When printing to a non-PCL printer I am using TPrinter from the VCL. This allows me to draw the EMF image (I have a tool that converts PCL to EMF) to the printer canvas. Now, I would like to use the same method of RTF printing for windows printer as I use for PCL. When I encounter an RTF file to be printed, I do the same as with a PCL print job. I load the RTF into a richedit and tell the rich edit to print to file using the Windows printer driver which creates a .PRN file. I then spool the PRN file to the print spooler along with all the EMF pages. After all pages are spooled, I loop through all spooled pages and call printer.canvas.draw(…). However, the draw method does not work for PRN files. Is there a printer.<SOME METHOD> I can call that will send a PRN file? My code would look something like:
If isEMF then
Printer.canvas.draw(…);
Else //isPRN
Printer.<SEND PRN DATA>;
I can not use the richedit’s print method because this creates its own print job which can allow other print jobs to be printed between my EMF print job and the RTF print job.
Thanks,
Scott