i want to know how like a moment to me to insert an image to keep the document with the image in the server
so that the function (save) does not work to me attached I cosay
----------------------------------------------------------------------------------
Dim doc As Document = New Document(System.IO.Path.Combine(DocPath, DOC_))
Dim builder As DocumentBuilder = New DocumentBuilder(doc)
Dim image As System.Drawing.Image = System.Drawing.Image.FromFile(System.IO.Path.Combine(MyBase.ImagenPath, firma_))
builder.MoveToDocumentEnd()
builder.InsertImage(image)
doc.Save(doc_, SaveFormat.FormatDocument) '(a)
---------------------------------------------------------------------------------
'(a) : but this function does not keep the document with the image need that this is made to be able to buy this component it can be that this option of doc.(save) is qualified with a license
waiting for its quick answer …
Mauro Moreno
head of department development www.r9.cl
Please let me know what exactly the problem is. Does the image fail to be inserted into the document, or the document is not saved in the specified path? Do you get any exception in the process?
Best regards,
hello, i try to explain the problem…
we need to get a word document, insert an image, seve the document (at the same file, same name) then get the file (with other user) insert a new image, seve the document (at the same file, same name) and finally get the document and convert it to PDF file.
The problem is, we can insert the first image at the document, the application it asks if we want to open or save file, we open the document and we can see it, but after that it’s necessary press a “save button” (it’s doesn’t work a “doc.Save(doc_, SaveFormat.FormatDocument)” instruction) but we need save de document or open whitout press a button (save).
When we insert a second image and try to convert a document, the document who had a image is a new docuemt (different name)
so when get a document to convert to PDF file, it convert a document without a second image.
In summary, the problem is save the document.
I send you a code again. If you find something, please tell me to try it.
----------------------------------------------------------------------------------
Dim doc As Document = New Document(System.IO.Path.Combine(DocPath, DOC_))
Dim builder As DocumentBuilder = New DocumentBuilder(doc)
Dim image As System.Drawing.Image = System.Drawing.Image.FromFile(System.IO.Path.Combine(MyBase.ImagenPath, firma_))
builder.MoveToDocumentEnd()
builder.InsertImage(image)
doc.Save(doc_, SaveFormat.FormatDocument) '(a)
Hi,
Sorry but your case still seems not clear enough. What application or buttons do you mean? Why the Document.Save method does not work for you?
Your code looks correct. Please do the following to let us help you with resolving the issue. Compose a small console project doing the task. Include your document templates there. Next, zip the project and attach it to your post. Then specify what document is erroneous (losing an image or something). We will reply to you shortly then.
Or, if you don’t want to bother, just elaborate your question and explain what buttons you imply + attach your document templates here.
Thank you for understanding.