use open() for pdf.image to ensure url pictures can be added
fix page number rendering
clean up and symplify the lib, render toc and index at runtime and add :must_be_left or :must_be_right parameters for section