Public bug reported:

I have some trouble with the last pages of my documents.

In one case, i get some ERR011: Unable to parse HTML element on line 49! from 
htmldoc on the last pages.
The strange thing is, that if I re-run the very same htmldoc command dipalyed 
with the --verose --verbosity high level (obviosly not deleting the temporary 
files), the pdf will be complete and no error ERR011 is rised.
It's like the last file written by the conversion before invoking HTMLDOC is 
still open or not completely written!

In an other case, the last page is simply completly missing, without any
error message.

But the code look just fine to me:

            pf=open(filename,'w')
            pf.write(page)
            pf.close

What could be wrong??

Writing a dummy file afterwards before invoking HTMLDOC resolves the
problem, but this seems quite a ugly hack to me (I am not a programmer).

Then I found the command
           pf.flush()

This also solves the problem. But why is this necessary??

** Affects: chm2pdf (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/896692

Title:
  Last page of CHM incompletly rendered or missing

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chm2pdf/+bug/896692/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to