Silent Printing
Posted: 05 Jan 2010, 19:24
Hi,
I just downloaded your CADImport.net library yesterday and I've been trying to us it to print DWG files in the background. We are doing this so we can stream line our processes internally and have our paperwork printed pre-grouped.
My first attempt at doing this was using the following code:
I get the prompt to select a printer, I click print, no errors occur BUT nothing prints
Second attempt using the viewer which contains a CADImage object within it
Keep in mind that for this code the viewer was dropped on a form
This returns errors such as error in Draw method: VAlue of 'NaN' is not valid for 'emSize'...
If I run LoadFile wait 3 seconds and then run Print... it all works. Obviously something to do with it completing loading.
By the way, how do you reference XRef paths?
If we can get this to work (silent DWG printing), we will purchase a license for sure.
I just downloaded your CADImport.net library yesterday and I've been trying to us it to print DWG files in the background. We are doing this so we can stream line our processes internally and have our paperwork printed pre-grouped.
My first attempt at doing this was using the following code:
Code: Select all
CADImport.CADImage dwg = new CADImport.CADImage();
dwg.LoadFromFile("c:\\test.dwg");
this.dwg.Print(true, true, "HP Laserjet 1022n");
Second attempt using the viewer which contains a CADImage object within it
Keep in mind that for this code the viewer was dropped on a form
Code: Select all
this.cadViewerControl1.LoadFile("c:\\test.dwg");
this.cadViewerControl1.Image.Print(false, true, "HP Laserjet 1022n");
If I run LoadFile wait 3 seconds and then run Print... it all works. Obviously something to do with it completing loading.
By the way, how do you reference XRef paths?
If we can get this to work (silent DWG printing), we will purchase a license for sure.