Tung,..ham,..ham.tung....48....6486@yo..mail.com
(original text: Tung,Pham,pham.tung2348236486@yopmail.com)
This is the code:
- Code: Select all
private static readonly PdfTrueTypeFont Font = new PdfTrueTypeFont(new Font("Arial", 11), true);
private static readonly PdfSolidBrush Brush = new PdfSolidBrush(Color.Blue);
// I create a new layer and drawString on this layer
var layer = pdfDoc.Layers.AddLayer("Layer1", Spire.Pdf.Graphics.Layer.PdfVisibility.On);
PdfCanvas graphic = layer.CreateGraphics(pdfDoc.Pages[i].Canvas);
// the drawing code
graphic.DrawString(text, Font, Brush, new PointF(x, textTop));
It does not happen every time. When I restart the app using it, it suddenly works well. But I want to make sure it will work stably.
Could you please help on that?
Thanks a lot!