![]() |
| ||
| first string in a file hi i have written a code for convertingo uploaded a .doc and view it as html........ i am not able to view thw first line,all the bold string are looking like ordinary string |
| ||
| Re: first string in a file code $fileHandle = fopen($userDoc, "r"); |
| ||
| Re: first string in a file could you post some example output? as it is you're putting everything in htmlspecialchars($outtext) so it won't be formatted. To convert the formatting to HTML formatting, you'll have to know the doc formatting syntax (it's probably version dependent). Then convert each doc formatting into the equivalent HTML formatting. A program that handles .doc files pretty well and is open source is OpenOffice. Its Java I believe. You can browse the source code to see just how they do it.. though it may be abstracted a bit so any references you can find on the .doc formatting would probably get you there faster. |
| ||
| Re: first string in a file 2 Attachment(s) hi i have attached the code i the first file and he output in the second file.In the output file.. the expected output is 139 lines only but it displaying junk values |
| ||
| Re: first string in a file Hi, I was trying to read MS Word documents but without good results, cause those strange characters. I then started looking for something on google and I found your code above. After some changes, I managed to read the first line and remove the junk at the end of the document. It worked with 97 - 2003 .doc files Thanks a lot, without your code I wouldn´t have done it. Here´s the code <? I created an account here just to thank you! All I can tell you about the bold and formatting stuff is that all the information is writen at the end of the file and you need to read the .doc file especification if you want to learn about it. Thanks, and if I find something to make this code better, I´ll tell you. (sorry for my english) |
| All times are GMT -4. The time now is 5:56 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC