Unicode Printer Object
(replacement for Vb6 Printer Object)

Updated 14-April-2008 09:21 -0300


04-Mar-2008

 

Features:
  • NO references whatsoever to the existing Vb6 Printer Object.
  • Enumerates installed printers, Retrieve default printer DeviceName.
  • Init, StartDoc, StartPage, EndDoc, EndPage, NewPage, KillDoc, Terminate.
  • Font, ForeColor, TextOut, TextWidth, TextHeight, PrintU, CurrentX, CurrentY, GetPixel, SetPixel, ScaleX, ScaleY.
  • PaintPicture File, StdObject, Array, Handle, Resource, ImageList.
  • Fonts Collection, FontCount.
  • Anti-Aliased DrawLine, DrawRectangle, DrawRoundedRectangle, DrawCircle, DrawRotatedText.
    Can specify DashStyle.
  • Retrieve DevMode structure, DeviceCaps, Printer_Info_2.
  • Retrieve Printer Info - BPP, Width, Height, TwipsPerPixelX, TwipsPerPixelY, ScaleLeft, ScaleTop, ScaleMode. 
  • Dialogs - Advanced Document Properties, PageSetup, Printer.
  • DrawMode, DrawStyle, DrawWidth for backward compatibility. Not used. Superseded by GDI+.
  • Print Preview ViewPort w/API Scrollbars, MouseWheel, High Quality BiCubic Interpolation Zoom,
    Vista Style Rulers (mm, cm, inch10, inch16, pixel, twips), Pan via Mouse Drag or Kybd, Highlighted Margins,
    Restore Form to last run position.
  • Where appropriate some Properties can return a Enumeration item name in lieu of a numeric value if requested.
    Example: m_dm.Orientation ð 1, m_dm.Orientation (True) ð "PORTRAIT"
  • Print Controls (w/Icons + Images): ListView, TreeView, UniListBox, UniListView, UniTreeView, CyberActiveGrid.
    Specify StartCol, EndCol, StartRow, EndRow, RowHeight. Supports Multiple pages when data does not fit on one sheet.
    Render Themed CheckBoxes(Fallback to Owner Draw) to Printer.
  • Tested with Open Source PDFCreator. See screenshot below.
  • 17561 Lines of Code.
Bugs:
  • 'SnagIt 8' DEVMODE from Printer_Info_2 pointer returns incorrect info for dmPrintQuality, dmYResolution (200 DPI). Also does not pick up correct dmOrientation when changing to Landscape. All other Printers (Epson CX3500, HP F4180, PDFCreator) appear to have correct DEVMODE data. We can however change SnagIt 8' programmatically to Landscape and it prints OK.

 

Sample output SnagIt 8 Virtual
Print (600dpi)
PNG Zoom 17%
Sample output HP Deskjet F4100.
PrintScan
(300dpi)PNG Zoom 33%
Sample output PDFCreator (600dpi) Original Photos

 

 

 

Print Preview ViewPort w/API Scrollbars, MouseWheel, High Quality BiCubic Interpolation Zoom,
Rulers (mm, cm, inch10, inch16, pixel, twips), Pan via Mouse Drag or Keyboard, Highlighted Margins.