davideuler / chm2pdf

Automatically exported from code.google.com/p/chm2pdf
GNU General Public License v2.0
0 stars 0 forks source link

Images not rendered in PDF due to upper/lower case spelling error #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 CHM will display correctly in windows 
but you can't convert completely with chm2pdf.
The curious part is that in my case, the images not displayed where written 
correctly but they where in the same subdirectory with other images from other 
pages: and on one of the other pages the subdirectory was written lower case. 
So the page where images are missing in PDF is not necessarly the page where 
the mispelled upper/lowercase is, it can be on any other page. Probably what 
counts is how the path is spelled the first time it is encountered generating 
the CHM source file....
Anyone has some ideas how this could be solved automagically in chm2pdf?

Original issue reported on code.google.com by reto.kn...@gmail.com on 18 Nov 2011 at 6:05

GoogleCodeExporter commented 9 years ago
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)

Original comment by reto.kn...@gmail.com on 20 Nov 2011 at 7:22

Attachments: