PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Jul 18, 2024 3:35 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Image problem MigraDoc
PostPosted: Mon Jan 26, 2015 3:18 pm 
Offline

Joined: Sun Dec 07, 2014 1:03 pm
Posts: 18
Hello !

I just start with pdfsharp and migradoc. I'm working with VB.NET in Visual Studio 2013.
It all went good so far with any text. But when I want to insert pictures I get an error.

I enclose a picture. Error Message is in german, sorry.
This is the sample code. I used a converter to convert C# to VB.NET

mgbig


Attachments:
Fehler Image.png
Fehler Image.png [ 9.82 KiB | Viewed 3792 times ]
Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 26, 2015 4:38 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Hi!

There are several possible solutions:
  • Remove the using for System.Drawing
  • Use the complete MigraDoc class name from the tooltip instead of just Image
  • ...

This could work:
Code:
Dim bild as MigraDoc.DocumentObjectModel.Shapes.Image = [...]
Removing the "using" leads to nicer code though.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 26, 2015 7:17 pm 
Offline

Joined: Sun Dec 07, 2014 1:03 pm
Posts: 18
Hi!

That works fine. (with the long code!)
Because I am a "Greenhorn" in VB.NET, I have no idea how do remove System.Drawings

Thank you so far.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 34 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group