support pdf export
minor merge