You can just simply add the
.pdf suffix to the file name you chose yourself.
On Linux systems, files are not judged by their extensions, but by their content or actually by the first few bytes of their content. That way it can determine with what applications to open a file without having to rely on the names. This might sound confusing for Windows users but works pretty well.
So as long as you only need that PDF document on your Ubuntu system, there's no need for an extension unless you want it. And if you want to open it on Windows, you could manually rename the file (e.g. with your Files manager
Or as I already said, just directly enter the full name including the
.pdf extension into the print dialogue. It will even remember the name you used last (or default to
mozilla.pdf, this probably depends on the version), so that you can just leave the extension there and overwrite the basename only.