AD
Administrator
Syncfusion Team
June 8, 2006 03:00 PM UTC
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.
AD
Administrator
Syncfusion Team
June 9, 2006 09:02 AM UTC
>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
AD
Administrator
Syncfusion Team
June 9, 2006 04:50 PM UTC
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.
AD
Administrator
Syncfusion Team
June 9, 2006 06:47 PM UTC
>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.
AD
Administrator
Syncfusion Team
June 9, 2006 06:54 PM UTC
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?
AD
Administrator
Syncfusion Team
June 12, 2006 09:41 AM UTC
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?
AD
Administrator
Syncfusion Team
June 14, 2006 02:17 PM UTC
Perfect, thank you very much for the help.
TD
Tony Daniels
January 16, 2008 06:56 PM UTC
>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!
AD
Antony Daniels
January 16, 2008 07:00 PM UTC
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!
SO
Sorso
January 16, 2008 08:11 PM UTC
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.
VK
Vishnu Kumar
Syncfusion Team
January 22, 2008 10:36 AM UTC
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
gi
January 26, 2008 09:23 PM UTC
>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.
VK
Vishnu Kumar
Syncfusion Team
January 28, 2008 12:29 PM UTC
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.
DH
Daniel Hoult
January 28, 2008 06:35 PM UTC
>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
BW
bhuvana wp
Syncfusion Team
January 31, 2008 08:53 AM UTC
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
AD
Administrator
Syncfusion Team
May 6, 2008 12:29 PM UTC
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.zipPlease let me know if you have any questions.
Regards,
Asem.
SR
SubhaSheela R
Syncfusion Team
May 6, 2008 12:56 PM UTC
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
YG
Yavanaarasi G
Syncfusion Team
May 6, 2008 12:56 PM UTC
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
SA
sahithi
June 12, 2012 04:36 AM UTC
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
DY
Dyana
December 20, 2012 03:12 AM UTC
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 :)