...something like .CHM converter...

Please discuss general Delphi programming topics here.

...something like .CHM converter...

Postby dulef90 » September 19th, 2008, 6:55 pm

Hi there!
I was thinking of something... I have so many good e books in .CHM format, which is killing me #-o . Now, there is no free chm converter, and making one would be difficult I think...
So, I thought to my self - what if there is a program that can copy out text and pictures from pages of chm file, what could be later used in Word (Ctrl+Paste) to create .doc file. Do you have any idea how this problem could be solved? Any suggestions?
Or is there any chance making application in Delphi that can convert .chm to .pdf or .doc or anything else that could be read normally?
Thank You for any help!
dulef90
Active Member
Active Member
 
Posts: 14
Joined: November 26th, 2007, 5:01 pm
Location: Serbia, Europe

Postby dulef90 » September 22nd, 2008, 10:00 am

OK, so I cracked chm file into .html files. I now have to rename .html files so it would be easier for me to convert them to .doc or .pdf format file.
This is logic of chm-cracker I used: every chapter has multiple .html files. First html is names Cxxx71683, and other html files are named HCxxx001, HCxxx002, HCxxx003, HCxxx004...
So, first chapter is combination of these .html files:

C00171683
HC001001
HC001002

Now, I need these .html files renamed, so that every page is numbered, starting from 1 up to 4225. I found this function:
Code: Select all
RenameFile('OldName','NewName')
I don't know how to order Delphi where to search for files that should be renamed. Could you give me procedure or function which opens folder for reading files inside in Delphi? Or is there any shorter way to do this?
I'll do the procedure of combining C and HC names, that shouldn't be the problem. I just don't know how to get to C and HC files...
How to read names of all files located in given folder in Delphi.

Thank you!!!
dulef90
Active Member
Active Member
 
Posts: 14
Joined: November 26th, 2007, 5:01 pm
Location: Serbia, Europe

Postby Kambiz » September 22nd, 2008, 10:20 am

You may want to consider using FindFile component. ;)
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2430
Joined: March 7th, 2003, 7:10 pm

Postby dulef90 » September 22nd, 2008, 11:34 am

Thank you!
The Demo isn't working, some files are missing, but I'll study unit and see what I need. :P
dulef90
Active Member
Active Member
 
Posts: 14
Joined: November 26th, 2007, 5:01 pm
Location: Serbia, Europe


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron