WLJS LogoWLJS Notebook

PDF

You can export an entire notebook as a PDF document ready for printing. There are two ways depending on how you run WLJS Notebook:

Navigate to the file menu and click Print, or locate it from the command palette:

Menu
File
Print

Export your notebook as an HTML File, open it, and use the browser's native printing option.

Page Breaks

To manually insert page breaks, use the PageBreakAbove or PageBreakBelow symbols inside Markdown cells, for example:

.md

<PageBreakAbove/>

Export Slides

This requires the WLJS Notebook desktop app, as we use a customized Chromium engine feature to produce high-quality vector-based PDFs from any Wolfram Language expression.

Use the dedicated option for rendering presentations (slides) into a single PDF document: Slides

Export Individual Graphs and Expressions

This requires the WLJS Notebook desktop app, as we use a customized Chromium engine feature to produce high-quality vector-based PDFs from any Wolfram Language expression.

To export individual expressions, use the default Export function with a PDF extension in the file name:


Plot[x, {x, 0,1}];
Export["filename.pdf", %]

Options

For the PDF format, there are a few extra options you can provide:

  • "Crop" - by default is True, which trims white regions
  • "Window" - by default is CurrentWindow[], which specifies the window object where to render
  • "ExposureTime" - time delay to wait before capturing (to let the layout settle), the default is 2.5 seconds
  • "Landscape" - printing mode, by default is True

When Export is used with "PDF" it internally uses blocking functions. Avoid using it in timers like SetTimeout, external event handlers such as InputButton or Button, or within AsyncFunction. Use ExportAsync

On this page