From 2b952dda54654022db8f595e23815fbbc4260ba7 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 12 Mar 2015 15:24:15 +0000 Subject: Linux/unix: added support for BSD-style printing, that is, using lpq/lpr instead of lpstat/lp . git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10619 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_PostScript.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/Fl_PostScript.cxx') diff --git a/src/Fl_PostScript.cxx b/src/Fl_PostScript.cxx index 3eed623ea..c5ef92528 100644 --- a/src/Fl_PostScript.cxx +++ b/src/Fl_PostScript.cxx @@ -1561,7 +1561,7 @@ int Fl_PostScript_Printer::start_job(int pages, int *firstpage, int *lastpage) { // first test version for print dialog if (!print_panel) make_print_panel(); - print_load(); + printing_style style = print_load(); print_selection->deactivate(); print_all->setonly(); print_all->do_callback(); @@ -1635,9 +1635,10 @@ int Fl_PostScript_Printer::start_job(int pages, int *firstpage, int *lastpage) { // Print: pipe the output into the lp command... char command[1024]; - snprintf(command, sizeof(command), "lp -s -d %s -n %d -t '%s' -o media=%s", - printer, print_collate_button->value() ? 1 : (int)(print_copies->value() + 0.5), - "FLTK", media); + if (style == SystemV) snprintf(command, sizeof(command), "lp -s -d %s -n %d -t '%s' -o media=%s", + printer, print_collate_button->value() ? 1 : (int)(print_copies->value() + 0.5), "FLTK", media); + else snprintf(command, sizeof(command), "lpr -h -P %s -# %d -T FLTK ", + printer, print_collate_button->value() ? 1 : (int)(print_copies->value() + 0.5)); Fl_PostScript_Graphics_Driver *ps = driver(); ps->output = popen(command, "w"); -- cgit v1.2.3