Article | 41023844 |
Type | HowTo |
Product | Engine |
Version | 5.0.1.1036 |
Date Added | 1/31/2005 |
Submitted by | Shannon Davenport |
Keywords |
When I run the code below the print spooler gets very large and the
image never prints. If I do not set the transparency it works fine.
Also black and white bmps are not inverting their colors when vdraw
background color is changed from black to white.
Private Sub VDPro1_DblClick()
fn = VDPro1.Utility.GetOpenFileName(9, "", 0)
Dim img As vdImage
Dim imgdef As vdImageDef
Set img = VDPro1.ActiveDocument.Entities.AddImage(fn, Array(0, 0), 1)
Set imgdef = VDPro1.ActiveDocument.Images.FindName(img.ImageFileName)
imgdef.Transparency = &HFFFFFF
img.Display = 25
img.Update
img.Invalidate
Set img = Nothing
Set imgdef = Nothing
VDPro1.CommandAction.Zoom "E", "", ""
VDPro1.ActiveDocument.Printer.Preview
End Sub
Add this before printing:
VDPro1.ActiveDocument.Printer.MaxBitmapSize = 64
VDPro1.ActiveDocument.Printer.PrintAsAPIWhenPossible = False