PDF: Picky compiler issues

GCC diagnosed some "may be used uninitialized"; they weren't.
GCC doesn't like char indexes into an array.
Missing #include of <ctype.h>