summaryrefslogtreecommitdiff
path: root/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-08 17:24:38 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-08 17:24:38 +0200
commitba7b2427b6dabbc1200207fff3b576d09f18c931 (patch)
tree77d4140ba5728f828324b53de22ccbc74d1898a7 /src/drivers/Posix/Fl_Posix_Printer_Driver.cxx
parent2662cad50bd4716e8bc20aaa1c3ed80653974165 (diff)
Make Fl_GTK_Printer_Driver recognize more paper sizes
also, make clear the B* paper size names are from JIS not ISO.
Diffstat (limited to 'src/drivers/Posix/Fl_Posix_Printer_Driver.cxx')
-rw-r--r--src/drivers/Posix/Fl_Posix_Printer_Driver.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx b/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx
index bc3b99176..eff6ab5ec 100644
--- a/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx
+++ b/src/drivers/Posix/Fl_Posix_Printer_Driver.cxx
@@ -40,6 +40,9 @@ class Fl_Posix_Printer_Driver : public Fl_PostScript_File_Device {
#define GTK_PAPER_NAME_LEGAL "na_legal"
#define GTK_PAPER_NAME_A3 "iso_a3"
#define GTK_PAPER_NAME_A5 "iso_a5"
+#define GTK_PAPER_NAME_JB5 "jis_b5"
+#define GTK_PAPER_NAME_TABLOID "na_ledger"
+#define GTK_PAPER_NAME_DLE "iso_dl"
#define GTK_RESPONSE_NONE 0
#define GTK_RESPONSE_OK -5
#define GTK_PRINT_PAGES_RANGES 2
@@ -156,6 +159,9 @@ int Fl_GTK_Printer_Driver::begin_job(int pagecount, int *firstpage, int *lastpag
else if (strcmp(pname, GTK_PAPER_NAME_LEGAL) == 0) format = Fl_Paged_Device::LEGAL;
else if (strcmp(pname, GTK_PAPER_NAME_A3) == 0) format = Fl_Paged_Device::A3;
else if (strcmp(pname, GTK_PAPER_NAME_A5) == 0) format = Fl_Paged_Device::A5;
+ else if (strcmp(pname, GTK_PAPER_NAME_JB5) == 0) format = Fl_Paged_Device::B5;
+ else if (strcmp(pname, GTK_PAPER_NAME_TABLOID) == 0) format = Fl_Paged_Device::TABLOID;
+ else if (strcmp(pname, GTK_PAPER_NAME_DLE) == 0) format = Fl_Paged_Device::DLE;
GtkPrinter *gprinter = CALL_GTK(gtk_print_unix_dialog_get_selected_printer)(pdialog); //2.10
psettings = CALL_GTK(gtk_print_unix_dialog_get_settings)(pdialog); //2.10
const char* p = CALL_GTK(gtk_print_settings_get)(psettings, "output-uri"); //2.10