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.
Unfortunately, activation email could not send to your email. Please try again.

Reading HTML

Thread ID:

Created:

Updated:

Platform:

Replies:

45005 Jun 8,2006 08:17 AM Dec 19,2012 10:12 PM ASP.NET Web Forms (Classic) 20
loading
Tags: DocIO
Richard James Bacon
Asked On June 8, 2006 08:17 AM

I''ve got a simple WYSIWYG javascript that outputs the code as pure html. Is there a way of rendering this output ("

this
is
a
test

") in DocIO in the correct format? Thanks in advance. Everything else works well.

Administrator [Syncfusion]
Replied On June 8, 2006 11:00 AM

Hi Richard, Thank you for your interest in Essential DocIO. I am not sure if I understand your requirement is correct, however if you are trying to convert pure HTML code generated by your JavaScript to MS Word Document then we do have support for converting the HTML code to MS Word Document. Here is a sample which does this : HTMLToDoc.zip Please take a look and let me know if you have any queries. Thanks, Prabhu. >I''ve got a simple WYSIWYG javascript that outputs the code as pure html. > >Is there a way of rendering this output ("

this
is
a
test

") in DocIO in the correct format? > >Thanks in advance. Everything else works well.

Administrator [Syncfusion]
Replied On June 9, 2006 05:02 AM

>Hi Richard, > >Thank you for your interest in Essential DocIO. I am not sure if I understand your requirement is correct, however if you are trying to convert pure HTML code generated by your JavaScript to MS Word Document then we do have support for converting the HTML code to MS Word Document. > >Here is a sample which does this : HTMLToDoc.zip > >Please take a look and let me know if you have any queries. Excellent. I can generate a doc from html and save now. What I''m trying to do though is to bring this perfectly formatted text into a template. I can copy the text using the code below, but can I bring in an *exact* copy? I.e. doc.Open("D:\Websites\21cm\templates\Proposal.doc") '' general information dbconn.Open() Dim cmdGetQuoteData = New SqlCommand("SELECT tbl_Quotes.fld_QuoteID, tbl_Quotes.fld_ContactID, tbl_Quotes.fld_Quote_Title, tbl_Quotes.fld_Date, tbl_Quotes.fld_Status, tbl_Quotes.fld_active, tbl_Quotes.fld_Background, tbl_Quotes.fld_Brief, tbl_Quotes.fld_Production, tbl_Quotes.fld_Creative, tbl_Quotes.fld_Specific, tbl_Quotes.fld_artistic, tbl_Quotes.fld_hwwotq, tbl_Quotes.fld_noq, tbl_Quotes.fld_sdp,tbl_Quotes.fld_last_modified, cast (tbl_Quotes.fld_value as float) as fld_value, tbl_Quotes.fld_product_type, tbl_Quotes.fld_Product_Mechanism, tbl_Quotes.fld_discounts, tbl_Quotes.fld_Notes, tbl_Contacts.fld_Company,tbl_Quotes.fld_set_reminder, tbl_Contacts.fld_Forename + '' '' + tbl_Contacts.fld_Surname AS fld_Fullname FROM tbl_Quotes INNER JOIN tbl_Contacts ON tbl_Quotes.fld_ContactID = tbl_Contacts.fld_ContactID WHERE (tbl_Quotes.fld_QuoteID = " & QuoteID & ")", dbconn) Dim dtr_general_data = cmdGetQuoteData.executeReader() While dtr_general_data.read() ''define Dim sClientCompany As String = dtr_general_data("fld_company").ToString() Dim sClientName As String = dtr_general_data("fld_fullname").ToString() '' dim contactname Dim sDate As String = dtr_general_data("fld_last_modified").ToString() Dim sBackground As String = dtr_general_data("fld_background").ToString '' Dim tempdoc As IWordDocument = New WordDocument() Dim convertor As HTMLToDLS = New HTMLToDLS convertor.Convert(tempdoc, dtr_general_data("fld_background")) tempdoc.Save("D:\Websites\21cm\docs\proposals\test.doc") '' get section Dim tempsection As IWSection = tempdoc.Sections(0) '' get pos of background for proposal Dim bgsection As IWSection = doc.Sections(1) ''Adding a new paragraph to the section For iCount As Integer = 0 To (tempsection.Paragraphs.Count() - 1) '' get section (temp) Dim tempparagraph As IWParagraph = tempsection.Paragraphs(iCount) '' get section (template) Dim bgparagraph As IWParagraph = bgsection.AddParagraph() '' clone section bgparagraph.AppendText(tempparagraph.Text) Next

Administrator [Syncfusion]
Replied On June 9, 2006 12:50 PM

Hi Richard, I am not sure as I understand you correctly. However, Are you trying to clone the output formatted document [ Generated by converting HTML to word document ] to another document? If so, Can you refer this sample. Also here is sample that shows paragraph and section cloning. Please take a look at the samples under the following folder, C:\Program Files\Syncfusion\Essential Studio\4.2.0.37\Web\docio.web\Samples\1.1\Advanced Features Please let you know if you have any questions. Thanks, Prabhu.

Administrator [Syncfusion]
Replied On June 9, 2006 02:47 PM

>Hi Richard, > >I am not sure as I understand you correctly. However, Are you trying to clone the output formatted document [ Generated by converting HTML to word document ] to another document? Yup. That''s basically it (read into temp doc, clone the formatted copy into a template). Using the above code, I can take the text from the generated html and insert it into a template paragraph by paragraph, but without the individual formatting. your example might be what I''m looking for, but it''s going to be monday before I can test it. Thanks very much for the support, it''s much appreciated.

Administrator [Syncfusion]
Replied On June 9, 2006 02:54 PM

Although one thing that springs to mind is that is looks like it uses a lot of native C code ("MemoryStream") Is it possible to perform your example (which looks perfect by the way) in VB.net, as that''s what the project is being written in?

Administrator [Syncfusion]
Replied On June 12, 2006 05:41 AM

Hi Richard, Sorry for delaying in getting back to you. Essential DocIO is build from scratch in C#. Here is a sample in VB.NET that converts pure HTML tags into document and stored it to the stream [ Template document ] and then creates a new document and clones the all paragraphs from the template document and merges it into the new created document. Sample : HTMLToDoc.zip Please take a look and let me know if you have any questions. Thanks, Prabhu. >Although one thing that springs to mind is that is looks like it uses a lot of native C code ("MemoryStream") > >Is it possible to perform your example (which looks perfect by the way) in VB.net, as that''s what the project is being written in?

Administrator [Syncfusion]
Replied On June 14, 2006 10:17 AM

Perfect, thank you very much for the help.

Tony Daniels
Replied On January 16, 2008 01:56 PM



>Perfect, thank you very much for the help.

The code sample in the zip file you attached does not work! It throws the following error: 'Unable to cast object of type 'Syncfusion.DocIO.DLS.WordDocument' to type 'Syncfusion.DLS.IDocument'

I amusing Visual Studio 2005, asp.net 2.0 and the latest release of Syncfusion Essential Studio: '6.1.0.34'

Regards,
Tony Daniels

PS - It would be really easy to insert HTML if it were easy to replace as string in a document with a formatted string. For example: Replace 'This text is bold' with the text: 'This text is bold' but formetted as BOLD. The Syncfusion documentation is so basic I have struggled for days to wade through it and not really found out how to do this. None of the example or tutorials cover this!


Antony Daniels
Replied On January 16, 2008 02:00 PM

Sorry, but the text in my last post remove the HTML formatting braces <> around my first text sample and formatted it in BOLD.... Anyway - any ideas how to replace a text string in a document with the same string BUT formatted as Bold or Italic or Underlined? Some walkthroughs on basic stuff like this would be really useful!

>

>Perfect, thank you very much for the help.

The code sample in the zip file you attached does not work! It throws the following error: 'Unable to cast object of type 'Syncfusion.DocIO.DLS.WordDocument' to type 'Syncfusion.DLS.IDocument'

I amusing Visual Studio 2005, asp.net 2.0 and the latest release of Syncfusion Essential Studio: '6.1.0.34'

Regards,
Tony Daniels

PS - It would be really easy to insert HTML if it were easy to replace as string in a document with a formatted string. For example: Replace 'This text is bold' with the text: 'This text is bold' but formetted as BOLD. The Syncfusion documentation is so basic I have struggled for days to wade through it and not really found out how to do this. None of the example or tutorials cover this!





Sorso
Replied On January 16, 2008 03:11 PM

I think this is close to what I am trying to achieve. I have a database column of HTML data type and if I send it to DocIo document,
DocIo document should show the correct HTML format not show the Html tags.

For example:

htmlColumn = "This text is bold";

then on docIo document, it should look "This text is bold" in bold format.


Vishnu Kumar [Syncfusion]
Replied On January 22, 2008 05:36 AM


Hi Sorso,

I regret to let you know that currently Essential DocIO does not provide support to insert html text with tags in to document and convert to HTML format. Sorry for the inconvenience caused.

Please let me know if you have any concerns.

Regards,
Vishnu.


gi
Replied On January 26, 2008 04:23 PM



>Hi Richard,
>
>Thank you for your interest in Essential DocIO. I am not sure if I understand your requirement is correct, however if you are trying to convert pure HTML code generated by your JavaScript to MS Word Document then we do have support for converting the HTML code to MS Word Document.
>
>Here is a sample which does this : HTMLToDoc.zip
>
>Please take a look and let me know if you have any queries.
>
>Thanks,
>Prabhu.
>
>
>>I've got a simple WYSIWYG javascript that outputs the code as pure html.
>>
>>Is there a way of rendering this output ("

this
is
a
test

") in DocIO in the correct format?
>>
>>Thanks in advance. Everything else works well.



Vishnu Kumar [Syncfusion]
Replied On January 28, 2008 07:29 AM

Hi Gi,

We have stopped providing support for converting HTML to word document from version 4.4 onwards. Sorry for the inconvenience caused.

Please let me know if you have any other concerns.

Regards,
Vishnu.


Daniel Hoult
Replied On January 28, 2008 01:35 PM



>Hi Gi,

We have stopped providing support for converting HTML to word document from version 4.4 onwards. Sorry for the inconvenience caused.

Please let me know if you have any other concerns.

Regards,
Vishnu.



Vishu,
I am currently evaluating this product. I need a solution that will allow me to open an html file using the Syncfusion api and save the output as word. Are you saying that you're ceasing support for doing such a thing?

Thanks
Daniel


bhuvana wp [Syncfusion]
Replied On January 31, 2008 03:53 AM

Hi Daniel,

Thanks for evaluating Syncfusion products.

HTML to Doc conversion

As we provided in the last update, currently we do not provide support for HTMLToDoc conversion and this functionality has been removed from v4.4 onwards. In older version we have used complex “HTMLConveter” which was having problem in fixing issues with some basic tags and was causing confusion.

The new HTMLToDoc implementation is under development. In our new version, it actually parses and replaces the html tags with equivalent format using DocIO. It doesn’t use any converter to convert the HTML file. This feature will be available in the future release version.

Please let me know if you have any other questions.

Best Regards,
Bhuvana



Administrator [Syncfusion]
Replied On May 6, 2008 08:29 AM


Hi Alex,

Thanks for your update.

If you want to enable to hold the HorizontalScroll and scroll, you can achieve this behavior by setting VerticalThumbTrack to true. Please refer the following code snippet that shows how we can set VerticalThumbTrack to true.


this.gridDataBoundGrid1.VerticalThumbTrack = true;


Please refer the modified sample in the below link that illustrates the above.

http://files.syncfusion.com/support/samples/Grid.Windows/72504D/GDBG_Selection1.zip

Please let me know if you have any questions.

Regards,
Asem.


SubhaSheela R [Syncfusion]
Replied On May 6, 2008 08:56 AM

Hi Karsten,

Thanks for your interest in Syncfusion products.

You can set the height of the GridGrouping Control by calling the ResizeToFit method of the TableModel . Below is the code snippet:


this.gridGroupingControl1.TableModel.RowHeights.ResizeToFit(GridRangeInfo.Table());

Here is the sample:

http://files.syncfusion.com/support/samples/Grid.Windows/Grid_WF_GGCHeight_F73378/GGCHeight.zip

Please have a look into the above sample and let me know with more details if I am misunderstand anything.

Regards,
Subhasheela R




Yavanaarasi G [Syncfusion]
Replied On May 6, 2008 08:56 AM

Hi KLilley,

Sorry for the delay in responding.

Could you please let me know what is usage of Scripting.Dictionary objects in your project. So that we can understand the issue and provide you the solution?

Regards,
G.Yavana




sahithi
Replied On June 12, 2012 12:36 AM

Hi..
I want to cast an object of type object to syncfusion.Docio.DLS.WordDocumet object
i tried many casting methods but was unable to perform casting and was getting invalid casting exception
Could you please me provide me any sample or example for casting
Thanks & Regards
-Sahithi

Dyana
Replied On December 19, 2012 10:12 PM

can you give me the sample in C#? It can't open in my visual studio and I can't run this program too. Thanks :)

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.

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.

;