[Bug 1074699] [NEW] Chm2pdf fails to process chm's without table of contents

2012-11-03 Thread Reto Knaak
Public bug reported: This was reported on https://groups.google.com/forum/#!topic/chm2pdf/SeOGMcMFsBw/discussion An example of file without toc is in the attchment chmtest_noToc.chm When trying to convert it by chm2pdf: chm2pdf --book chmtest_noToc.chm Traceback (most recent call last): File

[Bug 630520] Re: chm2pdf crashed if BeautifulSoup is used but not installed

2011-12-09 Thread Reto Knaak
** Summary changed: - chm2pdf crashed with ImportError in correct_file() + chm2pdf crashed if BeautifulSoup is used but not installed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/630520 Title:

[Bug 500262] Re: Errors if file name contains escaped special characters (space, parenthesis etc)

2011-12-07 Thread Reto Knaak
I made this CHM file to test - contains spaces, ( and ) in the name of the file - contains spaces, ( and ) also in the paths and names of htm pages ** Attachment added: test CHM file

[Bug 500262] Re: Errors if file name contains escaped special characters (space, parenthesis etc)

2011-12-07 Thread Reto Knaak
I tried to solve the problem, mostly using re.escape() instead using re.sub(' ', '\ ', See the diff file for details ** Patch added: patch which will convert the previous chm file

[Bug 500262] Re: Errors if file name contains escaped special characters (space, parenthesis etc)

2011-11-30 Thread Reto Knaak
** Summary changed: - Errors when run + Errors if file name contains escaped special characters (space, parenthesis etc) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/500262 Title: Errors if file

[Bug 500262] Re: Errors when run

2011-11-29 Thread Reto Knaak
** Changed in: chm2pdf (Ubuntu) Status: New = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/500262 Title: Errors when run To manage notifications about this bug go to:

[Bug 500262] Re: Errors when run

2011-11-29 Thread Reto Knaak
I searched and found the file Python In A Nutshell, 2nd Edition (2006).chm and tryied following: - renaming the file so that it doesn't contains any special character like spaces or parenthesis, it converts well - escaping the spaces in name of the file is not enough as also () need to be

[Bug 894193] Re: Trouble if chm contains path with spaces

2011-11-27 Thread Reto Knaak
** Changed in: chm2pdf (Ubuntu) Status: New = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894193 Title: Trouble if chm contains path with spaces To manage notifications about

[Bug 896692] Re: Last page of CHM incompletly rendered or missing

2011-11-27 Thread Reto Knaak
** Changed in: chm2pdf (Ubuntu) Status: New = Confirmed -- 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

[Bug 894193] Re: Trouble if chm contains path with spaces

2011-11-27 Thread Reto Knaak
In my patch there is still one place I don't like too much: page = re.sub('%20',' ',page) If in the text there is a %20, this too will be replaced with a normal space - and this is not correct. So the regex should be changed to repalce %20 only if they occour inside a src=.. or href=..., but

[Bug 894193] Re: Trouble if chm contains path with spaces

2011-11-26 Thread Reto Knaak
The posted patch #2 fixes the error only if filename contains no spaces... With filenames containing escaped spaces, it doesn't work... -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894193 Title:

[Bug 894193] Re: Trouble if chm contains path with spaces

2011-11-26 Thread Reto Knaak
I think now I have a fully working patch: This line page=re.sub(r'(?i)'+iurl,''+img_filename,page) could put in the html page a mix of escaped and unescaped spaces in the paths... (e.g. /tmp/tmp33GfZf/Name\ with\ space/doc space/image path/velocity space.gif) Now this line will be

[Bug 896692] [NEW] Last page of CHM incompletly rendered or missing

2011-11-26 Thread Reto Knaak
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

[Bug 896692] Re: Last page of CHM incompletly rendered or missing

2011-11-26 Thread Reto Knaak
...and here the patch for it! ** Patch added: Flush file before closing to avoi trouble on last page of document https://bugs.launchpad.net/ubuntu/+source/chm2pdf/+bug/896692/+attachment/2609642/+files/chm2pdf_flush.diff -- You received this bug notification because you are a member of

[Bug 500262] Re: Errors when run

2011-11-26 Thread Reto Knaak
Hi Narnie! Your problem could be related to this other bug, for which I found a patch (working for my case). Could you please check if this solves also your case? https://bugs.launchpad.net/ubuntu/+source/chm2pdf/+bug/894193 If not, could you provide the CHM file causing the problem? Kind

[Bug 890877] Re: table background color removed

2011-11-24 Thread Reto Knaak
** Summary changed: - table background color removed Options + table background color removed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/890877 Title: table background color removed To manage

[Bug 630520] Re: chm2pdf crashed with ImportError in correct_file()

2011-11-24 Thread Reto Knaak
** Changed in: chm2pdf (Ubuntu) Status: New = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/630520 Title: chm2pdf crashed with ImportError in correct_file() To manage

[Bug 630520] Re: chm2pdf crashed with ImportError in correct_file()

2011-11-23 Thread Reto Knaak
Beautifulsoup is an optional package, if you don'use it, no need to install it. If you install chm2pdf you don't get beautifulsoup automatically. If the --beautifulsoup option is passed, CHM2PDF executes from BeautifulSoup import BeautifulSoup, Tag and this will rise an exception. I added the

[Bug 890870] Re: multiple page problem

2011-11-23 Thread Reto Knaak
** Patch removed: Multiple page problem patch https://bugs.launchpad.net/ubuntu/+source/chm2pdf/+bug/890870/+attachment/2602907/+files/chm2pdf_multiple_page_problem.diff -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 890870] Re: multiple page problem

2011-11-23 Thread Reto Knaak
There was a small error: forget to delete a line. Now this patch works! ** Patch added: Multiple page problem patch https://bugs.launchpad.net/ubuntu/+source/chm2pdf/+bug/890870/+attachment/2606469/+files/chm2pdf_multiple_page_problem.diff -- You received this bug notification because you

[Bug 894193] [NEW] Trouble if chm contains path with spaces

2011-11-23 Thread Reto Knaak
Public bug reported: Some links are broken, images not included in PDF etc if the CHM contains path and names with spaces. In the attachment, I have made a nasty CHM file full of spaces to show the errors. ** Affects: chm2pdf (Ubuntu) Importance: Undecided Status: New -- You

[Bug 894193] Re: Trouble if chm contains path with spaces

2011-11-23 Thread Reto Knaak
** Attachment added: Demo_CMH.zip https://bugs.launchpad.net/bugs/894193/+attachment/2606532/+files/Demo_CMH.zip -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/894193 Title: Trouble if chm

[Bug 894193] Re: Trouble if chm contains path with spaces

2011-11-23 Thread Reto Knaak
Applying this patch, the CHM in the previous comment is converted without missing links and images. Only the last page is missing, but this is also the case without this patch and is thus a separate bug. (of html2doc?) ** Patch added: Fixing path with spaces patch

[Bug 630520] Re: chm2pdf crashed with ImportError in correct_file()

2011-11-21 Thread Reto Knaak
You used the --beautifulsoup option but you didn't install beautifulsoup which is optional maybe? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/630520 Title: chm2pdf crashed with ImportError in

[Bug 890870] Re: multiple page problem

2011-11-20 Thread Reto Knaak
This is the first time I try to generate a patch... hope this is correct! ** Patch added: Multiple page problem patch https://bugs.launchpad.net/ubuntu/+source/chm2pdf/+bug/890870/+attachment/2602907/+files/chm2pdf_multiple_page_problem.diff -- You received this bug notification because you

[Bug 890877] Re: table background color removed Options

2011-11-20 Thread Reto Knaak
This is the first time I try to generate a patch... hope this is correct! Changed one regular expression: - added (?i) to make regex case insensitive - search for #links stops at # and - * changed to + to ignore internal links #... ** Patch added: removed background color patch

[Bug 890873] Re: links not working in the PDF with upper/lower case spelling error

2011-11-20 Thread Reto Knaak
This is the first time I try to generate a patch... hope this is correct! - added (?i) modifier to make a case insensitive match for not breaking working links on windows in CHM files - added to the match criteria to avoid wrong match (eg this.htm matched also do_this.htm before) ** Patch

[Bug 890882] Re: another broken link issue

2011-11-20 Thread Reto Knaak
The same patch of https://bugs.launchpad.net/ubuntu/+source/chm2pdf/+bug/890873 fixes also this one (same regular expression) ** Patch added: chm2pdf_links_case_insensitive.diff

[Bug 890874] Re: Images not rendered in PDF due to upper/lower case spelling error

2011-11-20 Thread Reto Knaak
This is the first time I try to generate a patch... hope this is correct! - added (?i) modifier to make a case insensitive match for not breaking working links to images on windows in CHM files - added to the match criteria to avoid wrong match (eg this.gif matched also do_this.gif before) **

[Bug 890878] Re: no effort is done in chm2pdf to delete javascript

2011-11-20 Thread Reto Knaak
This is the first time I try to generate a patch... hope this is correct! - added a regex to delete javascript: (?i)script[^]*(.*?)/script ** Patch added: delete javascript patch

[Bug 500262] Re: Errors when run

2011-11-16 Thread Reto Knaak
Am I wrong or is your filename containing spaces? I think this could be the cause of your problems. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/500262 Title: Errors when run To manage

[Bug 630520] Re: chm2pdf crashed with ImportError in correct_file()

2011-11-16 Thread Reto Knaak
Do you get the same if the filename contains no spaces? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/630520 Title: chm2pdf crashed with ImportError in correct_file() To manage notifications about

[Bug 890870] [NEW] multiple page problem

2011-11-15 Thread Reto Knaak
Public bug reported: As I am not familiar with linux, but needed to use chm2pdf soI installed Ubuntu 11.10 on my PC and I got the CHM2PDF 0.9.1.1ubuntu5 from the software center - this worked flawless. Converting my chm file, some pages where there more than once in the output (one time for

[Bug 890874] [NEW] Images not rendered in PDF due to upper/lower case spelling error

2011-11-15 Thread Reto Knaak
Public bug reported: I have a CHM file with images, and some are not generated in the PDF. The reason is (again) that in windows paths and names are not case sensitive, but in linux they are. So basically the problem is there: a mismatch in upper/lower case somewhere in the CHM is enough. The

[Bug 890873] [NEW] links not working in the PDF with upper/lower case spelling error

2011-11-15 Thread Reto Knaak
Public bug reported: In my application some links are not working in the PDF as I have some upper/lower case errors in links. As CHM is windows stuff this doesen't matter there, but here it does! So how about making the 1. pass matching case insensitive adding the (?i) modifier in the regular

[Bug 890877] [NEW] table background color removed Options

2011-11-15 Thread Reto Knaak
Public bug reported: The first bgcolor=#001122 afre a link will become bgcolor=, due to this regex which is too greedy: # Replace links of the form somefile.html#894 with somefile0206.html # The following will match anchors like 'a href=temp0206.html#894' and will store

[Bug 890882] [NEW] another broken link issue

2011-11-15 Thread Reto Knaak
Public bug reported: In my CHM I have this link a href=HW_overview.htmOverview of HW/a which becomes a href=HW_temp0003.htmlOverview of HW/a because match overview\.htm and replace it with temp0003_html but should be match HW_overview\.htm and replace it with temp0081_html Again a regex