Images resizing in epub to pdf conversion + TOC not creating
I recently created an ebook of posts from my blog. I started out with an epub file and wanted to convert to mobi and pdf. The mobi file looks great, but in the pdf, the images are re-sized to fit the width of the page. Is there anyway to limit the size of the output image?
Also, I cannot get the TOC created to save my life. In the original epub, the chapter headings are in the following format:
<h1 class="main" id="heading_id_2">name</h1>
I've tried Force auto-generated table of contents on and off. I've tried the default, I've tried setting the Level 1 TOC XPath to detect h1 tags with class="main" or id="heading_id_2", just plain h1 tags
//h:h1[re:test(@class, "main", "i")]
//h:h1[re:test(@id, "heading_id_2", "i")]
Each time, I get a pdf with no table of contents. Can you help me figure out what I am doing wrong?