Same for the internal export widget
Better error handling for pdf export