Forum How do I...?

error: could not load input file

dougkramer
I'm running prince on linux. I get these errors and no PDF. Any ideas how to fix?

/home/doog/bin/prince/prince-7.0b1/prince \
-o checkout.pdf \
/home/doog/www/no_crawl/tmp/checkout-Aug22-12:07:51/html/apis/checkout/developer/index.html

prince: /home/doog/www/no_crawl/tmp/checkout-Aug22-12:07:51/html/apis/checkout/developer/index.html:64: error: Opening and ending tag mismatch: body line 59 and a
prince: /home/doog/www/no_crawl/tmp/checkout-Aug22-12:07:51/html/apis/checkout/developer/index.html:709: error: Opening and ending tag mismatch: ul line 687 and li
...
prince: /home/doog/www/no_crawl/tmp/checkout-Aug22-12:07:51/html/apis/checkout/developer/index.html:1083: error: Opening and ending tag mismatch: div line 1045 and table
prince: /home/doog/www/no_crawl/tmp/checkout-Aug22-12:07:51/html/apis/checkout/developer/index.html:1094: error: Opening and ending tag mismatch: td line 1040 and div
prince: /home/doog/www/no_crawl/tmp/checkout-Aug22-12:07:51/html/apis/checkout/developer/index.html:1095: error: Opening and ending tag mismatch: p line 942 and div
...
prince: /home/doog/www/no_crawl/tmp/checkout-Aug22-12:07:51/html/apis/checkout/developer/index.html:1143: error: Opening and ending tag mismatch: div line 128 and html
prince: /home/doog/www/no_crawl/tmp/checkout-Aug22-12:07:51/html/apis/checkout/developer/index.html:1145: error: Premature end of data in tag div line 85
prince: /home/doog/www/no_crawl/tmp/checkout-Aug22-12:07:51/html/apis/checkout/developer/index.html:1145: error: Premature end of data in tag html line 32
prince: /home/doog/www/no_crawl/tmp/checkout-Aug22-12:07:51/html/apis/checkout/developer/index.html: error: could not load input file
jim_albright
Your input file does not validate. Start and end tags don't match. Do you know how to validate the file? Look at line 59 of your html file. You must have closing tags for each opening tag.

Jim Albright
Wycliffe Bible Translators

mikeday
If it's supposed to be HTML and not XML or XHTML, you can run Prince with "-i html" on the command-line to ensure that it is parsed as HTML.
dougkramer
-i html got it to work.

Yes, there's an unbalanced </a> on line 59. This file is generated from a file that validates, but the generator has a bug :-\ I could write a sed statement to strip it, but prince was able to handle it anyway!.

Thanks for your help. Now to try more than one page.