Rendering directly to the Printer question

If you are a VB developer and have questions about using our products from VB, here is the place to post them.
Post Reply
whoit
Posts: 12
Joined: Tue Jul 19 2005

Rendering directly to the Printer question

Post by whoit » Wed Jul 20 2005

I have an app wherein I render directly to the Printer.hDC.

I use this to print to actual printers.

I'm trying to convert this app to print to a pdf.
However, I just get blank pages when I use either Printer.hDC or
cdi.CreateDC.

My basic sequence of events is:
1) Driver init when my app starts
2) Set the page size and orientation (cdi.PaperSize=5, etc)
3) .SetDefaultConfig
4) print from a RichTextBox to DC (rtb.SelPrint Printer.hDC)
5) cdi.DriverEnd when my app quits

Can you help me figure this out?

whoit
Posts: 12
Joined: Tue Jul 19 2005

Post by whoit » Wed Jul 20 2005

I've solved the problem - You can ignore this question.

I had mistakenly commented out the printer initialization code:

Printer.print

Post Reply