Commands

#pagesetup filepath

Loads a pagesetup file from a given filepath. You create pagesetup files with the menu File:Make Page Setup. The filepath must be relative to the HTMLBook document and inside the folder that contains the HTMLBook document.

#margins left top right bottom

Defines margins other than the margins predefined with the page setup. The margins cannot be smaller than the margins of the page setup (outside area will not be printed).
If you need lower margins, create a custom page size in the Make Page Setup dialog. You risk however that some printers do not support these margins.

#header filepath

Defines a header file. The header will be on top of each page that is created after this command. The header file must be a HTML file. The filepath must be relative to the HTMLBook document and inside the folder that contains the HTMLBook document.
You can use #date and #page markers inside the header file to include a datestamp or a pagenumber.

#footer filepath

Defines a footer file. The footer will be on bottom of each page that is created after this command. The footer file must be a HTML file. The filepath must be relative to the HTMLBook document and inside the folder that contains the HTMLBook document.
You can use #date and #page markers inside the footer file to include a datestamp or a pagenumber.

#stylesheet filepath

Defines a CSS stylesheet to be used for the rendering. The filepath must be relative to the HTMLBook document and inside the folder that contains the HTMLBook document. The stylesheet will replace the stylesheet defined in the file.

#file filepath

Includes a HTML file. The filepath must be relative to the HTMLBook document and inside the folder that contains the HTMLBook document.

#url url

Includes a HTML file from a specified absolute path from the internet. It must be a HTML file. The download of the file may take a while.

#nextpage

Forces a new page.

#anchor label

Creates a dictionary entry with the label as key and the current pagenumber as value. This allows the creation of table of contents, because all occurences of #label in the html files will be replaced with the dictionary value. the label may not contain a space.
You do not need to create anchors for #file entries. they have an automatic entry with the filepath.

#define label text

Creates a dictionary entry with the label as key and the text as value. All occurences of #label in the html files will be replaced with the dictionary value.the label may not contain a space. The text may contain spaces, but no carriage return.

#ignoreafter text

Removes all content in a HTML file after the last instance of text including text. This allows to remove internal footers of the HTML file.

#ignorebefore text

Removes all content in a HTML file after the first instance of text including text. This allows to remove internal headers of the HTML file.

#textencoding text

Defines a custom textencoding. Use this if the files do not have generic entities and if no textencoding is specified. The default textencoding is "iso-8859-1".

#maxpages integer

For performance reasons, only the first 16 pages of a file are rendered by default. If you see a scrollbar on the right, then the file was longer. You can specify a bigger maximal page count to correct this.

#fileout filepath

On preview, the file will saved directly to the path specified. The filepath must be relative to the HTMLBook document and inside the folder that contains the HTMLBook document.

You can use this to run HTMLBook from the commandline or from the Terminal application. If you double-click a file or open it with a terminal command, then HTMLBook will launch, preview, export the PDF and quit without the user action needed. The file must have the filetype ZSIH or the extension .htb.

open myhtmlbookfile.htb

Note: The application must not be open when you open the file. The user must be a user with GUI-access.


www.belle-nuit.com - 20.12.5