The easiest way to do that turned out to be writing HTML, then feeding that to a converter.
The downside is that a 48-page report works out to be 700kB of HTML, which htmldoc chokes on & silently dies.
So... a bit of re-engineering now to start a new temp text file (shut down & restart <html> & <body> tags in between), spawn htmldoc with a bunch of them instead of one file with throwing a <!-- PAGE BREAK --> directive in at the end of each page.
Extra victory: I have one report spitting contents into a <table> tag. It looks much neater & more elegant.
The downside is that a 48-page report works out to be 700kB of HTML, which htmldoc chokes on & silently dies.
So... a bit of re-engineering now to start a new temp text file (shut down & restart <html> & <body> tags in between), spawn htmldoc with a bunch of them instead of one file with throwing a <!-- PAGE BREAK --> directive in at the end of each page.
Extra victory: I have one report spitting contents into a <table> tag. It looks much neater & more elegant.
Comments