Print and Print Preview vtkActor2D

Hugues Wisniewski h_wski at yahoo.com
Tue May 9 11:06:09 EDT 2000


--- pahsieh at usgs.gov wrote:
> My guess is that somehow the program is not getting the
> correct size of the printer page, and therefore the "Hello World"
> is clipped. 

Thank you Paul for your help !
But the page size is OK. For those who may have the same trouble, I found the reason.
In the "Print Setup" dialog box we have to Print TrueType fonts as graphics.
If the driver doesn't allow the user to change this value with the dialog box, we can change it by
soft, by overriding CView::OnPreparePrinting, and acting directly on the structure LPDEVMODE
stored in the CPrintInfo class. After getting the pointer to this structure we have to write
something like :

lpDevMode->dmTTOption=DMTT_BITMAP;

Hugues

--- pahsieh at usgs.gov wrote:
> 
> > I just take the example "Sample" that comes with vtk 3.1 and build it
> with Visual C++ 5.0 under
> > windows NT 4.0
> > I can see "Hello World" written in white on the bottom left corner of a
> black rectangle, but it
> > doesn't appear in "print preview" and in "print".
> > It doesn't work on NT4.0, but it works on Windows 98.
> > How can I fix it, because the trouble is the same for texts on scalar bar
> and all other 2D texts ?
> 
> I don't have this problem on Windows NT 4.0 SP5, VC++ 6.0, vtk 3.12.
> My guess is that somehow the program is not getting the
> correct size of the printer page, and therefore the "Hello World"
> is clipped. Try using another printer (maybe the one used
> by the Windows 98 machine) or modifying the code (OnDraw method)
> that calculates the size of the bitmap to be printed.
> 
> Good luck.
> Paul
> 
> 

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list