Product : Engine, Version : 5.0.1.1036, ArticleID : 41023844

HowTo : Printing Issue

Article41023844
TypeHowTo
ProductEngine
Version5.0.1.1036
Date Added1/31/2005
Submitted byShannon Davenport
Keywords

Subject

Printing Issue

Summary

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

Solution

Add this before printing:

  VDPro1.ActiveDocument.Printer.MaxBitmapSize = 64
  VDPro1.ActiveDocument.Printer.PrintAsAPIWhenPossible = False