|
wxMaxima
|
Writes a worksheet to a PDF file. More...
#include <PdfExport.h>
Data Structures | |
| class | Impl |
| struct | Options |
| What goes into the PDF besides the worksheet. More... | |
Public Member Functions | |
| PdfExport (GroupCell *tree, const Configuration *source, const Options &options) | |
| Prepares the export of a worksheet. | |
| bool | Write (const wxString &file) |
| Writes the PDF. Returns false if the file could not be written. | |
| std::size_t | GetPageCount () const |
| The number of pages the last Write() produced. | |
Static Public Member Functions | |
| static bool | Available () |
| Was wxMaxima built with the PDF export? | |
| static wxString | Diagnosis () |
| What Help > Troubleshooting says about the PDF export. | |
| static wxPaperSize | PaperFromName (const wxString &name) |
| The paper size a name like "a4" or "letter" stands for. | |
| static wxString | DocumentTitle (GroupCell *tree, const wxString &fallback) |
| A title for the PDF: the worksheet's first title cell. | |
| static wxString | UiLanguageTag () |
| The BCP 47 language tag of wxMaxima's user interface, e.g. | |
Static Public Attributes | |
| static constexpr int | LayoutPpi = 720 |
| The resolution of the coordinates the worksheet is laid out in. | |
| static constexpr int | ReferencePpi = 96 |
| The resolution wxMaxima's font sizes and lengths are meant for (see Printout) | |
Writes a worksheet to a PDF file.
The worksheet is drawn by the cells' own Draw() methods onto a wxPdfDC, so the PDF looks like the printout – but unlike a printout through a "print to PDF" driver:
The drawing needs wxPdfDocument (thirdparty/wxpdfdoc, see cmake/WxmPdfDoc.cmake): without it, Available() is false and Write() fails.
The export uses a copy of the worksheet laid out with a configuration of its own, the way Printout does, so the worksheet itself is left alone.
| PdfExport::PdfExport | ( | GroupCell * | tree, |
| const Configuration * | source, | ||
| const Options & | options | ||
| ) |
Prepares the export of a worksheet.
| tree | The first GroupCell of the worksheet. Only read: the export works on a copy. |
| source | The worksheet's configuration. The settings that decide what is shown (code cells, the print scale and margins, the styles) are taken from the user's configuration, as printing does. |
|
static |
What Help > Troubleshooting says about the PDF export.
Without it, this names the reason CMake found when configuring the build (the git submodule wasn't checked out, fontconfig is missing, ...), the same reason the configure step's feature summary prints.
|
static |
A title for the PDF: the worksheet's first title cell.
| fallback | What to use if the worksheet has no title cell, e.g. the file name |
|
static |
The paper size a name like "a4" or "letter" stands for.
|
static |
The BCP 47 language tag of wxMaxima's user interface, e.g.
"de-DE"
Falls back to "en" for the C/POSIX locale.
|
staticconstexpr |