How to print white text and area visible
Moderators: SDS, support, admin
How to print white text and area visible
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.
Re: How to print white text and area visible
Hello!
Sergey.
It is necessary to use it like the following:-I add some CADText in a new layer and i use White color because i choose black color for cadimage background.
Code: Select all
text.Color = CADConst.clNone;
It is necessary to use two lines in addition:- 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.
Code: Select all
this.cadImage.GetExtents();
this.DoResize();
Currently our demos have no respective example. We will inform you when it is ready.- How can i print only area visible on screen not entire map file?
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support