#6 Strange text appended after root in conversion

open
nobody
5
2003-01-31
2003-01-31
Anonymous
No

I'm using html2fo to convert many html files to fo. For
most of the html files, proper xsl fo is created. However,
there is one file in particular for which the xsl fo that is
generated is malformed. For some reason, the
generated file has proper formatting except for at the
very end, where part of a font tag is appeneded after the
root. I have tried converting the problem html file to
xhtml, and also validated the xhtml with several
validators. The html that causes the bug is perfectly
correct! I am including the html file in hopes that you
may be able to fix what is causing this error! Thanks!

Discussion

  • Nobody/Anonymous

    clean and valid xhtml (it is named dirty, but is not)

     
  • Nobody/Anonymous

    Logged In: NO

    As a workaroud to this bug, you may replace the ReadDaten
    function with this one : "strange text" will be replaced by
    white space ignored by the PDF rendering of FO files.

    void ReadDaten(FILE * f)
    {
    long flen;
    int i;
    tPChar fbuf1, fbuf2;

    fbuf = &fbuf1;
    fseek(f, 0, SEEK_END);
    flen = ftell(f);
    fseek(f, 0, SEEK_SET);
    fbuf2 = fbuf1 = (char *) malloc(flen + 5); /*
    one additional byte should also work, but for some reasons. it
    fails sometimes ;-( */
    /* added 20/07/2003 : fills allocated memory with
    white spaces to avoid "Strange text appended after root in
    conversion" (see http://sourceforge.net/tracker/?
    atid=389084&group_id=27031&func=browse bug 678177)
    for (i = 0; i < flen; i++)

    {
    fbuf2[i] = ' ';
    }
    */
    fread(fbuf1, flen, 1, f);
    *(fbuf1 + flen) = '\0';
    fprintf(mylog, "%li\n", flen);
    fbuflen = strlen(fbuf1);
    ReadTree();
    fbufbegin = NULL;
    free(fbuf2);
    }

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks