String Pdf(Report& report, bool pdfa) { return GetDrawingToPdfFn() && report.GetCount() ? (*GetDrawingToPdfFn())(report.GetPages(), report.GetPage(0).GetSize(), Nvl(report.GetMargins().x, 200), pdfa) : String(); }
bool QtfReport0(const String& qtf, const char *name, bool pagenumbers, Size pagesize) { Report r; if(!IsNull(pagesize)) r.SetPageSize(pagesize); if(pagenumbers) { Report rr; rr.Footer("[1> $$P]"); rr << qtf; r.Footer("[1> $$P/" + AsString(rr.GetCount()) + "]"); } r << qtf; return Perform(r, name); }
bool Print0(Report& r, int i, const char *_name, bool dodlg) { if(r.GetPrinterJob()) { Print(r, *r.GetPrinterJob()); return true; } PrinterJob pd(_name); pd.CurrentPage(i); pd.MinMaxPage(0, r.GetCount() - 1); Size pgsz = r.GetPage(0).GetSize(); pd.Landscape(pgsz.cx > pgsz.cy); if(dodlg && !pd.Execute()) return false; Print(r, pd); return true; }