Output to pdf without X environment