C# .NET - how to insert remote image(html imgtag src as remote) in word document using aspose.words?

Asked By deepi singh on 22-Jun-12 03:06 AM
Earn up to 30 extra points for answering this tough question.
here iam getting image from remote serve url....i too used latest version aspose.words 11.4.0.0 version..actually aspose.words downloads images before isnerting into word document.....the url which u have given works fine.......but here iam getting image from server thts the probs..in tht case aspose.words is not downloading image from remote server ..i think thts y iam geting cross mark in final output word document or pdf......


how to insert remote image in word document using documentbuilder.inserthtml in aspose.words?

When the URL for the image is "localhost," the image displays correctly in the document.  When the url is a remote host, the image does not display.  It is replaced with a small box containing an x. 

How do I get a remote image to display correctly?  The image displays fine in IE or Outlook, just not a document created from Aspose.

iam unable to give tht sample remote image url..becoz it will be accessble from here only..not from other systems....if any one try to access tht remote image url from outside systems....then no image will display...

Vikram Singh Saini replied to deepi singh on 22-Jun-12 10:09 PM
See my 4th comment as solution to this problem at http://www.eggheadcafe.com/community/csharp/2/10457802/insert-html-image-in-word-document-using-docbuilder-not-working.aspx
help
see my below code iam not able to write html image into word document and also in pdf? when i kept image tag src as c: \ winter.jpg it is working . . .if i kept image tag src as url i mean 'http: / / wkt002:20649 / SelectImage.aspx?ImageID = 8 it is oImgChkDocument.Save( @"C: \ htmlimage.docx" ); oImgChkDocument.Save( @"C: \ out.pdf" ); i want using docbuilder and aspose.words? check this conversion and let me know any update . . . . http: / / www.aspose.com / community / forums
Hi All, I want to generate word document on the fly. I do not have office installed on server so I would like to create word document using XML and send that XML as word document to client. Also, I want to include charts in that document. Please let me or point me to some references to achieve this. Thanks, Mahesh ASP.NET Discussions Microsoft Word (1) Office (1) ASP.NET (1) VSTO (1) Aspose.Words (1) ASPInsider (1) OpenXML (1) Image (1) It is a lot of work to write such code in a scalable way
text conversion .NET Framework Hello, I have a asp.net application storing pdf files and word documents into db. The problem appears when trying to show a preview of a document the format of the document is not necessary. If it is not possible, maybe an image preview of the document (i.e. the first page of it) is more suitable and easier. Thanks in advance! ASP.NET Discussions Office 2007 (1) Word 2007 (1) Word (1) ASP.NET (1 Aspose.Words (1) Control (1) Database (1) KeyID (1) Perhaps not an "optimal" solution in terms of COM objects for this? A PDF document you can easily embed into a page. A Word document you could, on the server, load into the Word application, save as a temporary pdf file, and then embed that into the page. If
Open, edit and save the word doc in browser or application usin asp.net ASP.NET 28-Oct-12 07:36 I have a requirement to develop an asp.net web application that will open a word document from the server in the browser and the user will be editing the document advance. Regards, Hemananthan.S Hi , Thanks for your inquiry. First of all please note that Aspose.Words for .NET is a class library that enables your applications to perform a great range of document processing tasks. Aspose.Words supports DOC, DOCX, RTF, HTML, OpenDocument, PDF, XPS, EPUB and other formats. With Aspose.Words you can generate, modify, convert, render and print documents without utilizing Microsoft Word®. For more
hi , i want insert image in ms word using asp.net, , how can do this pls suggest me thanks Follow these steps • add reference to (Word 10.0 or 11.0 object library) within COM tab of Add reference dialog box After adding reference, add this directive using Microsoft.Office.Interop.Word Code namespace WindowsFormsApplication53 { public partial class createworddocument : Form { public createworddocument() { InitializeComponent(); } private void button1_Click(object missing, ref missing, ref missing, ref missing); WordApp.Visible = true; WordApp.ActiveWindow.ActivePane.View.SeekView = Word.WdSeekView.wdSeekPrimaryHeader; rng.InlineShapes.AddPicture(@"D: \ logo.Gif", ref missing, ref missing, ref missing); } catch the partial class here 'Somewhere in a sub where you actually want to show the image in word. . . . . HttpContext.Current.Response.Clear() HttpContext.Current.Response.Charset = "" HttpContext.Current.Response.ContentType = "application
Hello, I need to copy images from a folder and copy to a word document. I have done as follows. . but It copies only last image. Can any one of you help me in this. . Private Sub Page_Load(ByVal sender As FileName In FileList Image1.Style.Item("Height") + = 50 Image1.ImageUrl = FileName Label1.Text = "this is Image No:" & i Label1.Style.Item("Height") + = 50 i = i + 1 Next End Sub ASP.NET Discussions ASP.NET (1) PowerPoint (1) EventArgs (1) Excel (1) Image (1) AddHeader (1) GetFiles (1) Disposition (1) Looks very much like you are populating the Image1) each time you loop through FileList. . . Yes. . But I tried to Dynamically create the Image (dim img as Image) then assign the values. . img.ImageURL = FileName still the same result. . Er, well there is right there. . .! Post your changed code. . . I have changed the code to dyanamically create the Image. Still No success. The Changed code is: Private Sub Page_Load(ByVal sender As System.Object
Hi All, I have created a Word Doc file using C#. . .Now i also want to create header and footer inside the Word DOC file. The content of the header may be image / Text. . Plz share. . . Thanks, Arth Hi MSDN made sample for this, Here sample for Footer and header to word document. http: / / msdn.microsoft.com / en-us / library / ms178795.aspx thank you try this Public Sub Page_Load(sender as Object, e as EventArgs) ' build the content for the dynamic Word document ' in HTML alongwith some Office specific style properties. Dim strBody As New System.Text o = 'urn:schemas-microsoft-com:office:office' " & _ " xmlns:w = 'urn:schemas-microsoft-com:office:word'" & _ " xmlns = 'http: / / www.w3.org / TR / REC-html40'> " & _ " <head> <title> Time< / title> " ) ' The Now & " < / I> < / p> " & _ " < / div> < / body> < / html> " ) ' Force this content to be downloaded ' as a Word document with the name of your choice Response.AppendHeader( " Content-Type" , " application / msword" ) Response.AppendHeader
Hi , I am using word Automation to export to word . I am getting a exception like ex.message gives :- Command only available in print layout view. ex.stacktrace gives :- at Word.View.set_SeekView(WdSeekView prop) My code is I am trying to add a Image to Header . . . oWord.ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekCurrentPageHeader; logoCustom = oWord.Selection.HeaderFooter.Shapes.AddPicture ActiveWindow.ActivePane.View.SeekView = WdSeekView.wdSeekMainDocument; Can you please help me out. . . I am using word 2003 and windows server 2003 Can you please help me out. . . ASP.NET Discussions WdSeekView ActivePane.View.SeekView (1) WdShapePosition.wdShapeLeft (1) OWord.Selection.HeaderFooter.Shapes.AddPicture (1) Office (1) Word (1) ASP.NET (1) Server-side Office automation is not recommended, and not supported, by US;q257757#kb2 - note specifically the paragraph in bold. . . If you need to create true Word documents in an ASP.NET solution, you need this: http: / / www.aspose.com / categories / .net
how to convert word to pdf file anybody help me. . . . . . . . There is no direct methos to convert text file use third party tool. Using Aspose you can do your task. Add reference to MS.Word private Microsoft.Office.Interop.Word.ApplicationClass MSdoc; / / Use for the parameter whose type are not known or say Missing object Unknown = Type.Missing; private void word2PDF(object Source, object Target) { / / Creating the instance of Word Application if (MSdoc = = null)MSdoc = new Microsoft.Office.Interop.Word.ApplicationClass(); try { MSdoc.Visible = false; MSdoc.Documents.Open(ref Source, ref Unknown, ref Unknown, ref ref Unknown, ref Unknown, ref Unknown); MSdoc.Application.Visible = false; MSdoc.WindowState = Microsoft.Office.Interop.Word.WdWindowState.wdWindowStateMinimize; object format = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF; MSdoc.ActiveDocument.SaveAs(ref Target, ref format, ref Unknown, ref Unknown, ref Unknown