From c0ed5480058bfcdc3d09b3025bd20936730a2fe9 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 26 Feb 2015 15:38:54 +0000 Subject: 1) More detailed Doxygen documentation for classes Fl_Printer, Fl_Surface_Device, Fl_Display_Device and Fl_Graphics_Driver. 2) Support call of Fl_Printer::start_job(pagecount) with pagecount=0 when the number of pages is unavailable. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10592 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Quartz_Printer.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Fl_Quartz_Printer.mm') diff --git a/src/Fl_Quartz_Printer.mm b/src/Fl_Quartz_Printer.mm index 9770532f6..fba79c5e5 100644 --- a/src/Fl_Quartz_Printer.mm +++ b/src/Fl_Quartz_Printer.mm @@ -80,8 +80,10 @@ int Fl_System_Printer::start_job (int pagecount, int *frompage, int *topage) PMGetFirstPage(printSettings, &from32); if (frompage) *frompage = (int)from32; PMGetLastPage(printSettings, &to32); - if (topage) *topage = (int)to32; - if(topage && *topage > pagecount) *topage = pagecount; + if (topage) { + *topage = (int)to32; + if (*topage > pagecount && pagecount > 0) *topage = pagecount; + } status = PMSessionBeginCGDocumentNoDialog(printSession, printSettings, pageFormat);//from 10.4 } else -- cgit v1.2.3