Flatten PDF annotations

The accepted answer on the same question, How can I totally flatten a PDF in Mac OS on the command line? seems to work for me to "bake in" or "flatten" PDF annotations as PDF content:

gs -sDEVICE=pdfwrite -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf input_with_annots.pdf

... and it even seems to preserve the annotation text (so it is copypastable, along with the original text content).

Tested this on Ubuntu 14.04, Ghostscript gs --version 9.10.