teambob / docfrac

DocFrac is a document converter that can convert between RTF, HTML and ASCII text. This includes RTF to HTML and HTML to RTF. Supports text formatting (e.g. bold); tables; and most European languages. Available for Windows; Linux; ActiveX and DLL.
GNU General Public License v2.0
13 stars 6 forks source link

[Bug] Random Errors [sf#10] #32

Closed teambob closed 9 years ago

teambob commented 9 years ago

Reported by andrewpunch on 2004-09-13 01:35 UTC This bug report was created on behalf of cforbes at addanet.ca

* Are you using the .NET framework?

No. I'm using Visual Basic for Applications(VBA332.dll). inside MS Access

  1. I do have the .NET framework installed but I'm not using them at all in this application.

* What operating system are you using?

Win 2k Server

* What programming language are you using?

Visual Basic for Applications(VBA332.dll). inside MS Access 97.

* A copy of the section of code where you use the DocFrac

I've wrapped the DOX inside a function call so that I can call in inside a query and display the results on screen. I noticed that it wasn't working so I started doing some further digging. I created a Asci dump and noticed that the Asci Dump window would have results when the conversion window wouldn't so then I copied the conversions results box 2 times and the results were what I expected. It seems like every second time it is run it produces results.

The code for the function call is below.

Function htm2txt(Text As String) As String Dim Dox As New DoxLib Rem Dox.DebugOn

'Set the conversion type Dox.SetInFormat ("html") Dox.SetOutFormat ("txt")

'Do Tidy on HTML Text 'Tidy is another sourceforge project for creating clean HTML Text = DoTidy_on_HTML(Text)

'Fix problem - Convert to " " '( seems to be causing problems with DOX conversion) Text = HTML_Cleanup(Text)

'Do the HTML to Text conversion. Dox.SetInString (Text) Text = Dox.StringConvert()

'Remove Extra Line Feed(Asc(10)) Characters from Output Text = RemoveLF(Text) htm2txt = Text

End Function

I've tested the Text after each function call and it ok until the Dox.ScringConvert so I know it is not one of the other function call that is creating the problem.

The project is converting course description in HTML format to plan text so that we can do a print copy of the information that is current on-line. So I'm feeding HTML text stored in a database into the function for conversion.

Some Texts Follow:

Works on 2nd and 4th calls - Does not work on 1 and 3 call.


<p>An advanced school for students who have completed the Introduction to Birth Attendant School lecture phase. Students will have lectures at their field assignment location and gain further understanding about the midwives in a community. Lecture content includes puerperal sepsis, obstructed labour, postpartum hemorrhage and eclampsia. Student will also be involved in clinical experience and research projects.</p>


Does NOT work the first time (works for 3 consecutive calls after that)


<p>Students have opportunity to make practical application of the principles learned in CCM 346.</p>


Works EVERY time!


<p>Part III of the Applied Biblical Foundations School. See CCM 302</p>


teambob commented 9 years ago

Updated by andrewpunch on 2004-09-13 01:36 UTC

teambob commented 9 years ago

Commented by andrewpunch on 2004-09-13 01:39 UTC Logged In: YES user_id=928005

I believe it is related to this bug: https://sourceforge.net/tracker/index.php?func=detail&aid=982380&group\_id=96923&atid=616364

teambob commented 9 years ago

Commented by andrewpunch on 2004-12-01 11:42 UTC Logged In: YES user_id=928005

Seems to be problem with HTML to RTF or TEXT.

Particularly judging by the similarity to bug 98230.

teambob commented 9 years ago

Commented by nobody on 2004-12-02 20:05 UTC Logged In: NO

Bug fixed in version 3.1.1

Problem was incorrect initialisation of HtmlReader class.

teambob commented 9 years ago

Updated by andrewpunch on 2004-12-02 20:07 UTC