summaryrefslogtreecommitdiff
path: root/src/Fl_PostScript.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-03-12 15:24:15 +0000
committerManolo Gouy <Manolo>2015-03-12 15:24:15 +0000
commit2b952dda54654022db8f595e23815fbbc4260ba7 (patch)
tree1a901aa4d273fb7d3edb0a3f2726df8e499a0f10 /src/Fl_PostScript.cxx
parent1c3163f206606070c112c8f09a758990a8f2e142 (diff)
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
Diffstat (limited to 'src/Fl_PostScript.cxx')
-rw-r--r--src/Fl_PostScript.cxx9
1 files changed, 5 insertions, 4 deletions
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");