This worked fine for me, I even had to reload my printer driver and stuff first because working from fresh SSD drive.
I used a graphics screen for easy (for me) manipulation of images.
The printout was the one line down (one page only) about 1/16 th of page from top black print on white background. The font was as crappy looking as in preview (see snapshot) because your page is not scaled with screen, ie different ratios width x height...
Code: (Select All)
'NOTE: THIS ROUTINE DOESN'T WORK ... SUPPOSTED HAVE A WHITE BACKGROUND BUT GETTING AN ALL BLACK INK PAGE
'Printing on the Printer - an example using "_PrintImage" command
'Assumes a menu where an option to print to printer is the letter "p" or "P"
Dim img As Long
Dim Page As Long
Screen _NewImage(800, 600, 32)
PageScale = 2
PageHeight = 297 * PageScale
PageWidth = 210 * PageScale
Page& = _NewImage(PageWidth, PageHeight, 32) ' Page& ready to take an image
a$ = "P"
Text$ = "The Rain in Spain falls mainly in the Plain."
Color _RGB32(0, 0, 0), _RGB32(255, 255, 255)
Cls
Print
Print
Print Text$ 'This text is printing to the screen ok <<<< really? was it black on white back ground?
If a$ = "p" Or a$ = "P" Then ' print it
' screen image to page
_PutImage , 0, Page&
' now check out page&
Screen _NewImage(PageWidth, PageHeight, 32)
_PutImage , Page&, 0
_PrintString (10, 297 - 8), "Does this preview look OK? y/n"
k$ = InKey$
While k$ <> "y" And k$ <> "n"
k$ = InKey$
Wend
If k$ = "y" Then
PageScale = 10
PageHeight = 297 * PageScale
PageWidth = 210 * PageScale
Page2& = _NewImage(PageWidth, PageHeight, 32) ' Page& ready to take an image
_PutImage , Page&, Page2&
_PrintImage Page2& ' this command is supposed to send the img just captured to the printer
End If
End If
I used a graphics screen for easy (for me) manipulation of images.
The printout was the one line down (one page only) about 1/16 th of page from top black print on white background. The font was as crappy looking as in preview (see snapshot) because your page is not scaled with screen, ie different ratios width x height...
b = b + ...