My book is done. I'm left with twenty seven (27) Mathematica Notebooks (.nb's) How do I convert these notebooks to the pdf format? How do I combine all twenty seven (27) pdfs into a single pdf? Thanks for reading this!

  • $\begingroup$ ... or pdftk, from the command line $\endgroup$
    – dwa
    Feb 6, 2018 at 5:04

1 Answer 1


Put all the notebooks into one, then export as PDF. You can add in page breaks via the Insert menu: (insert) Page Break.

nb = NotebookOpen["/Users/chris/Documents/notebook.nb"];
Export[FileNameJoin[{$InitialDirectory, "output.pdf"}], nb]

You can modify layout in advance. This setting persists only for the session.

  PrintingOptions -> {"PrintingMargins" -> {{45, 43}, {17, 31}},
    "FirstPageHeader" -> False, "FirstPageFooter" -> False,
    "RestPagesHeader" -> False, "RestPagesFooter" -> False,
    "Magnification" -> 1}];
  • $\begingroup$ Thanks. Your answer is a bit over my head. Could you please specify a file path assuming my notebooks are in a folder on my Desktop (Windows 10 Pro)? $\endgroup$
    – HenryB
    Feb 6, 2018 at 3:29
  • 1
    $\begingroup$ In a new session window run the following: nb = NotebookOpen["C:\\Users\\HenryB\\Desktop\\folder\\notebook.nb"]; Export["C:\\Users\\HenryB\\Desktop\\folder\\output.pdf", nb, "PDF"] $\endgroup$ Feb 6, 2018 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.