Question: Compile toPDF with bookmarks?

Is it possible to compile to PDF with a table of contents or headings as PDF bookmarks?