Doc conversion to mht

G

gin

Doc conversion to mht

1. Doc does not have image and then converted to mht
Height returned is prefectly fine

2. Doc have image and text then converted to mht
Height returned is not correct

When converted xls to mht with or without image, it works fine.

Please guide.
 
B

Bob Buckland ?:-\)

Hi Gin,

What version of Word are you using and are you using File=>Save as to create the .MHT file?

Are you saying that when you link to a graphic in a document that the picture dimensions are correct but incorrect when you insert
the image into the file? In what way are they incorrect and how are you checking?

=========
Doc conversion to mht

1. Doc does not have image and then converted to mht
Height returned is prefectly fine

2. Doc have image and text then converted to mht
Height returned is not correct

When converted xls to mht with or without image, it works fine.

Please guide. >>
 
G

gin

Hi Bob,
Thanks for the reply.

My requirement is that i have to set the iframe height by calculating the
height od the document uploaded on a particular link , whose container is an
IFRAME.
We are calculating the height of the file uploaed is this way:
var objFrame=document.getElementById('theiframe');
var objFrameDocument=objFrame.contentWindow ?
objFrame.contentWindow.document:eek:bjFrame.contentDocument;
if(objFrameDocument)
{

//if(objFrameDocument.documentElement=="CSS1Compat" &&
objFrameDocument.compatMode=="CSS1Compat" &&
objFrameDocument.compatMode=="CSS1Compat")
if(objFrameDocument.documentElement && objFrameDocument.compatMode &&
objFrameDocument.compatMode=="CSS1Compat")

intDocHeight=objFrameDocument.documentElement.scrollHeight;
else
intDocHeight=objFrameDocument.body.scrollHeight;
}
intDocHeight=intDocHeight+300
objFrame.style.height=intDocHeight
return (intDocHeight+300)+"px";

This piece od code is working prefect with all the types of files:
xls,doc,pdf,ppt,htm,ppt, xls converted to mht or htm etc.
But when we convert Doc to mht with an image in the doc, the height returned
is not correct.
In all the conversions I am using the Save as option only.

Hope it answers your question.
Please let me know if more input is required.
 
Top