We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Insert FlowDocument into WordDocument

Thread ID:

Created:

Updated:

Platform:

Replies:

93234 Mar 4,2010 03:01 PM UTC Mar 23,2010 06:48 AM UTC ASP.NET Web Forms (Classic) 8
loading
Tags: DocIO
Markus
Asked On March 4, 2010 03:01 PM UTC

Hello,

I've formatted text in form of a FlowDocument, this text I'd like to insert into a WordDocument. Is there any easy way to accomplish this and if not, is there a known workaround that works?

Thanks for the help!

Markus
Replied On March 15, 2010 10:16 AM UTC

Hello,

since there is no answer, i think the docio can't handle this issue directly.

Is there any alternative solution?
E.g.:
I can copy from an richtextbox (WPF) and paste the formatted text into word. All works.
Is it possible to "simulate" that copy&paste with your docio?

Or are there better ways to insert _formatted_ text into a special placeholder in WordDocument. For simple text it works, but we really need formatted text (e.g. bold, numbering etc.).

If there is no solution, we have to switch to other components, sorry.

Best regards
Markus

Vijayakumar S [Syncfusion]
Replied On March 15, 2010 12:16 PM UTC

Hi Markus,

We regret for the delay in responding.

Currently Essential DocIO does not provide support for reading FlowDocuments/RTF contents. Currently DocIO has only provide support for saving as RTF document and not for reading RTF documents. We have a plan to implement this feature for converting RTF into Word document and this feature might be a part of our 2010 volume 3 release. Once this feature is implemented, you are able to read the FlowDocuments through DocIO. We are sorry for the possible inconvenience caused.

We recommend you, to raise your queries through Direct Trac Developer Support System https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well.

Regards,
Vijay

Markus
Replied On March 15, 2010 01:08 PM UTC

Thanks for your answer.
If we won't find a way to cast a formatted text into doc, we we won't be able to use your docio, sorry.

Best regards
Markus

Vijayakumar S [Syncfusion]
Replied On March 15, 2010 06:55 PM UTC

Hi Markus,

Thank you for your update.

We have prepared a sample to convert Flow document into Word document by converting the FlowDocument into HTML contents and then the html contents is converted into word document using DocIO. Could you please have a look at the sample from the below link and let us know if this helps. The routine used for converting the FlowDocument into HTML codes are referred from the below msdn link.

XAML to HTML Conversion Demo:
http://msdn.microsoft.com/en-us/library/aa972129.aspx

Sample link:
http://help.syncfusion.com/support/DocIO.Windows/F93234/FlowDocumentToWordDocument.zip

Please let us know if you have any questions.

Regards,
Vijay

Markus
Replied On March 16, 2010 11:05 AM UTC

Hi Vijay,

thanks again for your help.
I tried your sample and ...
it works.
Not perfect but it does a good job (about 80%). Some formattings seem to be a problem, e.g. List in Lists.
But we give it a try and i will update you.

Regards
Markus

Markus
Replied On March 18, 2010 09:13 AM UTC

One Update from my side:

We tested you sample code and got the followng error
after this line of code: paragraph.AppendHTML(htmltext);

"List level must be less 8 and greater then 0".

The input xaml which is converted to html:
http://schemas.microsoft.com/winfx/2006/xaml/presentation"> Margin="0,0,0,0" TextAlignment="Left" FontFamily="Tahoma[,Arial]" FontSize="14" xml:lang="de-de" NumberSubstitution.CultureSource="User">this is a testnumber1number2testtest2

The output html after converting from xaml (seems to be valid and can be opened in firefox):

this is a test

  • number1

  • number2

  1. test

  2. test2



Did we make anything wrong?
Is there a workaround?

Regards
Markus



Markus
Replied On March 18, 2010 09:34 AM UTC

Hi Vijay,

something like this works fine.

this
is a test




Seems to be only a problem of Lists.

Best regards
Markus

PS: Could you please delete the stacktrace of my last post, there are relevant data in it. Posted to fast :)

Poornima R [Syncfusion]
Replied On March 23, 2010 06:48 AM UTC

Hi Markus,

Thank you for your update.

We are sorry for the long delay in responding. We were able to reproduce the mentioned issue.We suspect this could be a defect. We have forwarded this issue to our development team for further analysis.

Could you please report this issue through Direct Trac Developer Support System (http://www.syncfusion.com/Account/Logon ReturnUrl=%2fsupport%2fdirecttrac), because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Please let me know if you have any queries.

Regards,
Poornima

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;