PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Add image to section
https://forum.pdfsharp.net/viewtopic.php?f=2&t=4123
Page 1 of 1

Author:  brucey54 [ Sun Apr 05, 2020 6:58 pm ]
Post subject:  Add image to section

Hi, I tried to use some of the code from http://www.pdfsharp.net/wiki/HelloMigraDoc-sample.ashx


Image image = section.AddImage("../../images/Logo landscape.png");

Receiving an error "Cannot implicitly convert type MigraDoc.DocumentObjectModel.Shapes.Image to System.Drawing.Image"

What I'm doing wrong!!

Cheers,
brucey54

Author:  TH-Soft [ Mon Apr 06, 2020 2:00 pm ]
Post subject:  Re: Add image to section

Too many usings.

Change this to "MigraDoc.DocumentObjectModel.Shapes.Image image = [...]" to make it work.
Or just "var image = [...]" for brevity.

Author:  brucey54 [ Mon Apr 06, 2020 3:42 pm ]
Post subject:  Re: Add image to section

Thanks

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/