Convert nb to pdf

Convert NB to PDF

Convert Wolfram Mathematica NB notebooks to fixed PDF files while preserving visible results.

Make PDF files online

We can't read NB files yet, so this conversion isn't available. If you can export your work to one of these formats - or others - we'll turn it into PDF:

How to convert nb to pdf file

A recipient may need a PDF because they do not have Wolfram software or need a fixed version for printing, submission, or records. Exporting preserves the notebook’s visible text, equations, graphics, and current output without requiring the recipient to run its code.

Keep the original .nb file: a PDF is a rendered copy, not an editable or executable notebook.

What an NB file is

An .nb file is most often a Wolfram Notebook used by Wolfram Mathematica and Wolfram Desktop. It stores structured cells containing prose, mathematical typesetting, Wolfram Language input, evaluated output, graphics, notebook options, and sometimes dynamic interface elements.

An NB file is not a CDF file. Wolfram’s Computable Document Format normally uses the .cdf extension. The .nb extension is also used by some unrelated applications, including Nota Bene, so identify the program that created the file before choosing a converter.

What PDF preserves

PDF is a fixed-layout format supported by browser PDF viewers, Adobe Acrobat Reader, macOS Preview, and document-management systems. A properly exported Wolfram notebook can retain selectable text, embedded or outlined fonts, and vector equations and graphics.

PDF does not retain Mathematica cell structure, editable input, live Dynamic controls, animations, or recalculation. Code and results can appear as visible page content, but the recipient cannot evaluate them from the PDF.

Export a Wolfram Notebook with Mathematica

  1. Open the .nb file in Wolfram Mathematica or Wolfram Desktop.
  2. Evaluate only the cells needed for the final output. If results are missing, stale, or generated from external data, the PDF will reflect what is currently displayed.
  3. Set paper size, orientation, margins, and scaling in File → Page Setup or the operating system print settings.
  4. Choose File → Save As Special → PDF.
  5. Choose the destination and save the .pdf file.

If that command is unavailable in an older version, use File → Print and select a system PDF printer, such as Microsoft Print to PDF on Windows or Save as PDF in the macOS print dialog. Native PDF export is generally preferable because printer drivers can change font handling, scaling, and page breaks.

For scripted export from an open notebook, evaluate Export["report.pdf", NotebookGet[EvaluationNotebook[]], "PDF"]. Use this after the required cells have been evaluated.

Online and other NB conversion options

Wolfram Cloud is the appropriate browser-based option for a Wolfram notebook. Upload or open the notebook in the Wolfram Cloud notebook interface, then use its PDF export or download command; available commands can vary by account type and interface version. Do not upload notebooks containing confidential code, credentials, proprietary data, or files you are not permitted to place in cloud storage.

Generic online document converters should not be relied on for Mathematica notebooks: they usually do not run the Wolfram front end or kernel and may reject the file or omit evaluated content. A PDF printer can produce a fallback copy from a compatible viewer, but it cannot repair missing output or interpret an unrelated NB format.

If the file came from Nota Bene, open it in Nota Bene and use that program’s PDF export or its File → Print command with a PDF printer. Mathematica and Wolfram Cloud cannot correctly convert a Nota Bene document merely because it has an .nb extension.

Output and compatibility checks

  • Dynamic controls, animations, and interactive visualizations become static at their displayed state. Set controls to the desired values before export.
  • Use the notebook’s print stylesheet and inspect page breaks, especially for wide tables, long code cells, and large graphics. Screen-oriented styles can paginate poorly on Letter or A4 paper.
  • Missing fonts can alter symbols, line wrapping, and pagination. Open the finished PDF on another device when mathematical or non-Latin fonts are required.
  • Externally loaded images, data, packages, and generated graphics must be available before evaluation. Exporting does not embed source data or package dependencies merely because their output is visible.
  • Do not evaluate an untrusted notebook. Wolfram Language code can access local files, network resources, or system functions when evaluated; export already displayed content when possible.

NB vs PDF: format comparison

How the NB and PDF formats compare on the properties that matter most for this conversion.

Comparison of the NB and PDF file formats
Property .NB Wolfram Mathematica Notebook .PDF Portable Document Format
Editable text Yes Limited
Fixed page layout No Yes
Text formatting Extensive Extensive
Images Yes Yes
Interactive elements Yes Limited
Password protection Basic Basic
Opens in a web browser No Yes, natively
Typical file size Medium Medium
Open standard No Yes
Best used for Professional production Publishing
Introduced 1988 1993
Developer Wolfram Research Adobe Systems (now Adobe Inc.); standardized by ISO
MIME type — application/pdf

Frequently asked questions

Will my Mathematica notebook remain editable after converting it to PDF?

No. A PDF is a fixed, non-editable representation of the notebook’s visible pages, so the original cells, code, and notebook structure are not preserved for normal editing.

Are Mathematica calculations and interactive controls preserved in the PDF?

Usually not as working features. Printed cell outputs and static graphics can appear, but dynamic controls, animations, and other interactive notebook content are generally flattened into a snapshot or omitted.

Why does my notebook PDF have bad page breaks or clipped equations?

PDF printing uses page layout, cell styles, margins, and font availability, so wide outputs, large expressions, or missing fonts can wrap, split, or become clipped. Adjusting the notebook’s print settings and checking the resulting pagination can help.

Can I convert the PDF back into the original .nb notebook?

Not reliably. Text and some displayed equations may be recoverable, but executable code, cell metadata, formatting structure, and interactive elements are usually lost during conversion.

Additional formats for
nb file conversion

Reverse conversion

Convert to pdf from
other formats

Share on social media: