The solution doesn't seem to work with article attachments when using the direct attachment link as posted in my example above. I have the "Display Unsafe Content" option ticked.
But it would be nice to have the option to somehow embed a PDF in an article. It is a great pity that such useful functionality is available only using a workaround.