I Use of tow method for Import/Exort
public RadDocument ImportDocx()
{
RadDocument document = null;
IDocumentFormatProvider provider = new DocxFormatProvider();
OpenFileDialog openDialog = new OpenFileDialog();
openDialog.Filter = "Documents|*.docx";
openDialog.Multiselect = false;
bool? dialogResult = openDialog.ShowDialog();
if (dialogResult == true)
{
using (Stream stream = openDialog.File.OpenRead())
{
document = provider.Import(stream);
}
}
return document;
}
public void ExportToDocx(RadDocument document)
{
DocxFormatProvider provider = new DocxFormatProvider();
SaveFileDialog saveDialog = new SaveFileDialog();
saveDialog.DefaultExt = ".docx";
saveDialog.Filter = "Documents|*.docx";
bool? dialogResult = saveDialog.ShowDialog();
if (dialogResult == true)
{
using (Stream output = saveDialog.OpenFile())
{
provider.Export(document, output);
MessageBox.Show("Saved Successfuly!");
}
}
}
buuuuuuuuuut the size of (output) variable not equal with (document) variable !!!!!!!!!
please help me
public RadDocument ImportDocx()
{
RadDocument document = null;
IDocumentFormatProvider provider = new DocxFormatProvider();
OpenFileDialog openDialog = new OpenFileDialog();
openDialog.Filter = "Documents|*.docx";
openDialog.Multiselect = false;
bool? dialogResult = openDialog.ShowDialog();
if (dialogResult == true)
{
using (Stream stream = openDialog.File.OpenRead())
{
document = provider.Import(stream);
}
}
return document;
}
public void ExportToDocx(RadDocument document)
{
DocxFormatProvider provider = new DocxFormatProvider();
SaveFileDialog saveDialog = new SaveFileDialog();
saveDialog.DefaultExt = ".docx";
saveDialog.Filter = "Documents|*.docx";
bool? dialogResult = saveDialog.ShowDialog();
if (dialogResult == true)
{
using (Stream output = saveDialog.OpenFile())
{
provider.Export(document, output);
MessageBox.Show("Saved Successfuly!");
}
}
}
buuuuuuuuuut the size of (output) variable not equal with (document) variable !!!!!!!!!
please help me