How to print white text and area visible
Posted: 22 Jul 2008, 15:55
Hello,
-I add some CADText in a new layer and i use White color because i choose black color for cadimage background.
When i print with following code, the new text doesn't appear because background of page is white:
PrintingForm prtForm = new PrintingForm();
System.Windows.Forms.PrintPreviewDialog printPrevDlg = new System.Windows.Forms.PrintPreviewDialog();
prtForm.Image = this.cadImage;
prtForm.CreateNewPages();
prtForm.TypePage = DrawingSize.Fit;
printPrevDlg.Document = prtForm.Print(false);
printPrevDlg.ShowDialog();
if (printPrevDlg.Document != null)
printPrevDlg.Document.Dispose();
In orignal dwg file some text exist and appear with white color in cadImage and when i print the file they appear black on print page.
How can i do same think?
Here is code use to add new Text :
CADLayer entLayer = (CADLayer)cadImage.Converter.Layers["TEST"];
CADText text= new CADText();
text.Color = Color.white;
text.Point = ptOrigine;
text.Height = dbHeightText;
text.Rotation = 0;
text.Text = sText;
text.LineWeight = 2;
cadImage.Converter.GetSection(ConvSection.Entities).AddEntity(entity);
cadImage.Converter.OnCreate(entity);
cadImage.Converter.Loads(entity);
text.Layer = entLayer;
- If i add a new CADText at top of the screen it doesn't appear in the preview print screen. As if new objet wasn't use to calcul new size of cadimage.
- How can i print only area visible on screen not entire map file?
Best regards, yannick.
-I add some CADText in a new layer and i use White color because i choose black color for cadimage background.
When i print with following code, the new text doesn't appear because background of page is white:
PrintingForm prtForm = new PrintingForm();
System.Windows.Forms.PrintPreviewDialog printPrevDlg = new System.Windows.Forms.PrintPreviewDialog();
prtForm.Image = this.cadImage;
prtForm.CreateNewPages();
prtForm.TypePage = DrawingSize.Fit;
printPrevDlg.Document = prtForm.Print(false);
printPrevDlg.ShowDialog();
if (printPrevDlg.Document != null)
printPrevDlg.Document.Dispose();
In orignal dwg file some text exist and appear with white color in cadImage and when i print the file they appear black on print page.
How can i do same think?
Here is code use to add new Text :
CADLayer entLayer = (CADLayer)cadImage.Converter.Layers["TEST"];
CADText text= new CADText();
text.Color = Color.white;
text.Point = ptOrigine;
text.Height = dbHeightText;
text.Rotation = 0;
text.Text = sText;
text.LineWeight = 2;
cadImage.Converter.GetSection(ConvSection.Entities).AddEntity(entity);
cadImage.Converter.OnCreate(entity);
cadImage.Converter.Loads(entity);
text.Layer = entLayer;
- If i add a new CADText at top of the screen it doesn't appear in the preview print screen. As if new objet wasn't use to calcul new size of cadimage.
- How can i print only area visible on screen not entire map file?
Best regards, yannick.