Fix for embedding legend and scalebar if pixel buffer is not supported with the selected output format (#4618)