Hi, I need to create pdf and draw from a vb6 application. I belive the only way to succeed is by working with the graphic handle...
here a sample I can't get working:
var d = new PdfDocument(); var p = d.AddPage(); var g = XGraphics.FromPdfPage(p); g.DrawLine(new XPen(XColor.FromArgb(0)), new XPoint(10, 10), new XPoint(100,10));
var h = g.Graphics.GetHdc(); var gg = Graphics.FromHdc(h); gg.DrawLine(new Pen(Color.FromArgb(0)), new Point(10, 20), new Point(100,20));
d.Save("test.pdf");
Can you help me to draw directly from the hdc?
|