WPCubed Product Support

Canvas.DrawString with DrawMetafile Problem

The MetaFile was emailed to your address specified in the forums last week.

#3 ♥ 0
7.5k Views 2 users read 1 min
support

Hi,

that can have to do with the metafile- can you send it to me?

Julian Ziersch

#2 ♥ 0

I'm using the wPDF Control in .NET. I'm having a problem using Canvas.DrawString along with DrawMetafile. I want to overlay some text after the metafile has been rendered.

If I do:

pdfControl1.StartPage(wPDF.ePage.Letter, false);pdfControl1.DrawMetafile(tern1.TerPageMetafile(page),300,300);pdfControl1.Canvas.DrawString("Hello World",new Font("Comic Sans MS", 24),new SolidBrush(Color.Black),40, 50);pdfControl1.EndPage();

the text from the drawstring is never rendered.

If I do a simple:

pdfControl1.StartPage(wPDF.ePage.Letter, false);
pdfControl1.Canvas.DrawString("Hello World",new Font("Comic Sans MS", 24),new SolidBrush(Color.Black),40, 50);
pdfControl1.EndPage();

the text is is rendered just fine on a blank page.

Any ideas as to why the disconnect here? Is there something I need to do differently or a property I need to change?

Thanks.

#1 ♥ 0