View Single Post
Old 10-05-2022, 09:30 PM   #1
benali72
Junior Member
benali72 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2022
Device: none
HTML files -> one PDF - How to ensure order?

Hi everyone,

I have 80 HTML files that I'm trying to convert into a single output PDF file.

I created a table_of_contents.html file that lists my HTML files in the order I want them in the output PDF file -- as per the instructions found here.

Thus my table_of_contents file contains something like this --

<html>
<body>
<h1>Table of Contents</h1>
<p style="text-indent:0pt">
<a href="chapter-0.html">Table of Contents</a><br/>
<a href="chapter-preface.html">Preface</a><br/>
<a href="chapter-1.html">chapter 1</a><br/>
<a href="chapter-2.html">chapter 2</a><br/>
.... etc ...
</p>
</body>
</html>

I then added that table_of_contents.html file as a new book with the Calibre GUI.

Then I try to convert it to PDF using the Convert option.

Regardless of whether I Convert Individually or Bulk Convert, I don't get the HTML files in the output PDF in the order I specified in the table_of_contents.html file.

I tried changing the HTML to ZIP plug from Depth First Order to Breadth First Order (in Preferences → Advanced → Plugins → File type and customize the HTML to ZIP plugin) but that didn't help either.

I'm sure I must be missing something. Does anyone know what?

Thank you.
benali72 is offline   Reply With Quote