Fix handling special characters; add direct pdf export.