String Pdf(Report& report, bool pdfa) { return GetDrawingToPdfFn() && report.GetCount() ? (*GetDrawingToPdfFn())(report.GetPages(), report.GetPage(0).GetSize(), Nvl(report.GetMargins().x, 200), pdfa) : String(); }
NAMESPACE_UPP #define LLOG(x) // LOG(x) void Print(Report& r, PrinterJob& pd) { Draw& w = pd; Size sz = w.GetPageSize(); Point mg = r.GetMargins(); Size pgsz = r.GetPage(0).GetSize(); int x = Nvl(mg.x, (sz.cx - pgsz.cx) / 2); int y = Nvl(mg.y, (sz.cy - pgsz.cy) / 2); for(int i = 0; i < pd.GetPageCount(); i++) { Drawing iw = r.GetPage(pd[i]); Size sz = iw.GetSize(); w.StartPage(); w.DrawDrawing(x, y, sz.cx, sz.cy, iw); w.EndPage(); } }