PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MigraDoc - Not able to include Image

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
abhayp



Joined: 24 Dec 2008
Posts: 1

PostPosted: Wed Dec 24, 2008 6:23 am    Post subject: MigraDoc - Not able to include Image Reply with quote

Hi

I have a asp.net web application with the structure as follows

Root
- Images
- App_Code
- Myclass.cs
mypage.aspx

In the app_code folder i have a class that creates the Migradoc object for createing the document and include the image in it

Table newTable = section.AddTable();
newTable.Style = "Table";
newTable.Borders.Color = tableBorder;
newTable.Borders.Bottom.Width = 0.6;
newTable.Borders.Left.Width = 0.0;
newTable.Borders.Right.Width = 0.0;
newTable.Borders.Top.Width = 0.0;
newTable.Rows.LeftIndent = 0;

Column column1 = newTable.AddColumn("3cm");
column1 = newTable.AddColumn("13cm");

Row newrow = newTable.AddRow();
newrow.Cells[0].AddImage("../images/logo.gif");

This always shows "image not found" in the pdf document created


Question Can someone please advice what's wrong in that ?
Back to top
View user's profile Send private message Visit poster's website
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Thu Jan 08, 2009 10:15 am    Post subject: Re: MigraDoc - Not able to include Image Reply with quote

Hi!
abhayp wrote:
Question Can someone please advice what's wrong in that ?

Probably wrong working directory.

You can set the ImagePath at the Document.
IIRC the working directory is not the directory with the ASPX file. But there's a method that returns the physical address of the ASPX file.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Soldier-B



Joined: 14 Oct 2008
Posts: 16
Location: USA

PostPosted: Thu Jan 08, 2009 2:20 pm    Post subject: Re: MigraDoc - Not able to include Image Reply with quote

Thomas Hoevel wrote:
Hi!
abhayp wrote:
Question Can someone please advice what's wrong in that ?

Probably wrong working directory.

You can set the ImagePath at the Document.
IIRC the working directory is not the directory with the ASPX file. But there's a method that returns the physical address of the ASPX file.


Server.MapPath("../images/logo.gif")
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com