|
KiCad PCB EDA Suite
|
Enumerations | |
| enum class | PRINT_RESULT { OK = 0 , CANCELLED , FILE_NOT_FOUND , FAILED_TO_LOAD , FAILED_TO_PRINT , UNSUPPORTED , UNKNOWN_ERROR } |
Functions | |
| const wxString | PrintResultToString (PRINT_RESULT aResult) |
| PRINT_RESULT | PrintPDF (const std::string &aFile, int aCurrentPage=0) |
| Show the platform print dialog for the PDF aFile and print it. | |
| void | ResetPrintToFilePath (wxPrintData &aData) |
| Discard a "print to file" destination in aData that the platform print backend generated for its own spooling, leaving a destination the user chose untouched. | |
| PRINT_RESULT | PrintPDF (const std::string &aFile, bool fit_to_page, int aCurrentPage) |
|
strong |
| Enumerator | |
|---|---|
| OK | |
| CANCELLED | |
| FILE_NOT_FOUND | |
| FAILED_TO_LOAD | |
| FAILED_TO_PRINT | |
| UNSUPPORTED | |
| UNKNOWN_ERROR | |
Definition at line 33 of file printing.h.
| PRINT_RESULT KIPLATFORM::PRINTING::PrintPDF | ( | const std::string & | aFile, |
| bool | fit_to_page, | ||
| int | aCurrentPage ) |
Definition at line 223 of file unix/printing.cpp.
References CANCELLED, FAILED_TO_LOAD, FAILED_TO_PRINT, FILE_NOT_FOUND, OK, PRINTING_TRACE, and result.
| PRINT_RESULT KIPLATFORM::PRINTING::PrintPDF | ( | const std::string & | aFile, |
| int | aCurrentPage = 0 ) |
Show the platform print dialog for the PDF aFile and print it.
The job, and any print-to-file output, is named after the file's base name. The call returns only once the platform has finished reading the file, so the caller may delete it.
| aCurrentPage | is the 1-based page the dialog offers as the current page, or 0 for none. Windows can only offer the page showing in its preview, and macOS has no current page choice, so both use this only to decide whether to offer it. |
Definition at line 322 of file unix/printing.cpp.
References PrintPDF().
Referenced by PrintPDF(), and DIALOG_PRINT::printViaPdf().
|
inline |
Definition at line 44 of file printing.h.
References _, CANCELLED, FAILED_TO_LOAD, FAILED_TO_PRINT, FILE_NOT_FOUND, OK, and UNSUPPORTED.
Referenced by DIALOG_PRINT::printViaPdf().
| void KIPLATFORM::PRINTING::ResetPrintToFilePath | ( | wxPrintData & | aData | ) |
Discard a "print to file" destination in aData that the platform print backend generated for its own spooling, leaving a destination the user chose untouched.
Print settings are carried from one print to the next so that the dialog reopens the way the user left it. Under the GTK portal backend (Flatpak, snap, GTK_USE_PORTAL) that also carries a gtkprintXXXXXX scratch path, because the portal overwrites the output URI with its own temporary file before handing the settings back, and the scratch path then shows up as the suggested output file. It lives in the native GtkPrintSettings output URI, which the wx-level filename does not track, so it has to be inspected there.
Definition at line 327 of file unix/printing.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), InvokeDialogPrint(), DIALOG_PRINT_GENERIC::onPrintButtonClick(), and DIALOG_PRINT::TransferDataFromWindow().