
Tue, 08/05/2003 - 13:27
Forums:
I have implemented a sample viewer for viewing geometric files.
I want to plot the output to a standard windows printer.
can anyone help me in this regard?
I have seen the previous questions asked in this forum on printing, but unable to find any solution
Thanks for any help.
Nazeer
Tue, 08/05/2003 - 16:01
I would like to help you, but I need further information. Maybe a Codeexample and what you intend to do on which platform.
MCV
Wed, 08/06/2003 - 07:29
Thanks,
I have writen a viewer which displays some lines and circles read from a text file.
I have to take a print of it.
I am only using the 2d viewer part of opencascade
I am using win2000, with development on VC6 sp4.
Nazeer
Here is a part of code that I actually found in Opencascade forum
it also does not work.
/*SOURCE CODE FOR PRINTING*/
void myAppView::OnViewPrint()
{
CPrintDialog dlg(FALSE, PD_ALLPAGES | PD_HIDEPRINTTOFILE ,NULL);
if (dlg.DoModal() == IDOK)
{
CString theDevice = dlg.GetDeviceName();
Standard_Integer copies = dlg.GetCopies();
LPDEVMODE devmode = dlg.GetDevMode();
Standard_Real scale = devmode->dmScale;
Standard_Integer orientation = devmode->dmOrientation;
enum WNT_OrientationType casOrient;
switch (orientation)
{
case DMORIENT_PORTRAIT:
casOrient = WNT_OT_PORTRAIT;
break;
case DMORIENT_LANDSCAPE:
casOrient = WNT_OT_LANDSCAPE;
break;
}
Handle(WNT_DDriver) myWNTDriver = new WNT_DDriver((Standard_CString)(LPCTSTR)theDevice,"spool.ps",casOrient,scale,copies);
myView->ScreenCopy(myWNTDriver,Standard_True,scale);
myWNTDriver->Spool(Aspect_PM_NPLOTTER,(Standard_CString)(LPCTSTR)theDevice,Standard_True);
myWNTDriver->Close();
}
}
/*END OF CODE FOR PRINT*/
Thu, 08/07/2003 - 12:32
Try to contact these specialists. They really know what to do and they both work on Windows too.
Francois.Lauzon@dbmreflex.com
and
djorge@coimbra.ccg.pt
I hope that I could help you
MCV