There is a bug in the Confluence {code} tag when exporting to PDF.

When Confluence exports documents with the {code} tag to PDF, the contents of the {code} tag are omitted.

Using the {noformat} tag instead provides similar benefits and allows
successful export to PDF.