Quickly converting Word Doc into HTML - html

I am trying to convert a word document into html. I used an online converter http://word2cleanhtml.com/ but it does not keep the pictures I have in my file. From the html I will be making a nook and kindle ebook. Does anyone have a tool or suggestion for this project?
Using save as html in word doesn't keep images either.

Download the KindlePreviewer: http://www.amazon.com/gp/feature.html/?docId=1000765261
Then, save your file as HTML. Images will not be part of the html file, instead they are stored in a separate folder.
Open the resulting html file into the KindlePreviewer, it will find the images in the images folder and add them to your book.

Related

What is the .hinc Extension on a file?

I'm working with some pre-existing web files for a website, and I see there are files with .hinc ending. The code inside them is HTML, but Sublime Text 2 doesn't seem to recognize it, and doesn't color anything. Also, the code still runs on the website.
.hinc is an included HTML source file in c++. See this link http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3325.html#style.hinc

Link to open PDF from folder

I have some PDF's sitting in a folder on my computer, is there a way to write a link to open them on to a webpage?
The main idea is when the site goes live the link will be used to download the pdfs from the folder, but obviously at a later stage the folder will be a temp folder on my website.
So at the moment i just want to open the pdfs from a link, and the final goal will be to have the links download them.
Can any one help me?
This is the file path to get to the pdf i want to link to.
C:\Users\Shaun\Documents\FormValue\CS1.pdf
How would i create the link?
If you want to have a link to a PDF, you just have to put the relative path to the file in the href attribute of an a tag. So let's say you had a folder called pdfs, with the file boom.pdf inside it, and folder called site sitting beside it, with the file site.html in it. Then all you'd have to do is put this link in the html file:
Link to a pdf
In most (all?) browsers now a days, that will open the PDF in a new tab. To download it you would right-click it and do the Save Link As thing. Just need to get the path in href right.
UPDATE
If you want to use the full path to the file, you need to prefix it with file://. Then you just put it in the href the same as with a regular link, ending up with something like:
Link to a pdf
This should work with your set up, but if the pdf and the html files are stored near each other, relative URLs are still a good option. A little bit of Google work should show you how to write those.
For each PDF just do what I talk about here.
<object height="950" data="sample-report.pdf" type="application/pdf" width="860">
<p>It appears you don't have a PDF plugin for this browser.
No biggie... you can <a href="sample-report.pdf">click here to
download the PDF file.</a>
</p>
</object>
It works with most browsers and it degrades nicely.
It sounds like youre asking if you can put a link on a web site to a PDF sitting on your computer. You can't. The files have to be either on another web site or on your site's server.
If you are using ASP.NET, you can have the link point to a handler that accepts a query string identifying the file, either by file name or a hash of the file. Then the handler can look in the folder for a file that matches the pattern, read the file as a byte array, and then write those bytes to HttpResponse.

Can I decompile a *.chm file to html with a html TOC using MS HTML Workshop? If not how can I?

When I decompile I get an hhc file and a hhk file and no index.html. Can I get MS HTML Workshop to generate a html table of contents index.html file instead when decompiling? If not is there any other free software I can use?
Afaik no. Creating a basic toc->html export would be very easy, since it is essentially a XML to html transformation, but it probably won't be in the style of the rest of the CHM.
Maybe one of the Unix CHM viewers perform such step to view the TOC with a html viewer somewhere. But recycling such code would probably be more work than rewriting it.

Kindle - display images in html

I understand this might not be the best place to ask this question...
I have an application that's sending important html documents to my Kindle. They are displayed all right, but all referenced resources (css, images etc) are not there.
I don't really care about absent css, but having images is crucial for me. Even though sometimes they are absolutely referenced, they are not displayed.
I tried to send a zipped archive with the html file and all images it references, but Kindle interpreted it as separate documents instead.
P.S. I'm sending the documents via Amazon's free #free.kindle.com e-mail.
You have to use KindleGen utility to generate from your .html to .mobi to preserve images, css and use things like cover image, table of contents etc.
When you have your .html file and related image resources you have to create (generate) .opf file (generally it is just xml file describing your book resources). KindleGen has
included example of Kindle User guide in .html with related .opf
After that just use kindlegen with your .opf file from shell to create .mobi file which you can email after to your kindle email adress.
When you send only a zip to the Kindle it will separate everything in this document.
You need to convert this zip into a mobi file then the Kindle know this is one document.
For that task you can use Calibre or any other ebook converter. Every image has to be in the root-directory and referenced via a relative path.
Sample:
<div id="header">
<h1>Logo</h1>
<img src='blabla.png'/>
</div>

Strange problem while compiling CHM file

I had to write some documentation. I wrote each page in MS Word and then save each *.docx as htm file. I'm using "HTML Help Workshop" (from microsoft) to compile a chm file.
I was able to sucessfully create a chm file but the problem is that not all images in chm file are displayed. I tried decompiling the *.chm file into another folder and opened each .htm file in web browser. All images are correctly displayed.
Then why aren't they displayed in chm file. Strangely, only some of them aren't displayed. I checked if image format is causing problem, but all images are of same format. I checked if file naming is a problem, but all images are named like image[001-100].jpg in their corresponding folders.
Any idea about whats going wrong?
HTML Help Workshop (HHW) is known to have problems with the HTML generated by Word (or better put: Word generates terrible HTML). Some versions put VML coding around the IMG tags that HHW cannot handle.
Possible solutions:
In Word: Deselect the option 'Rely on VML for displaying graphics in browsers' (Tools > Options > General > Web Options)
In Word: Save as 'filtered HTML'.
In HHW: Manually add the images to the project's [FILES] section.
Let me know if any of this helps.
More information can be found in the HTML Help 1.X FAQ