Now saves in both pdf and png formats