function ngGridPdfExportPlugin(b){var a=this;a.grid=null;a.scope=null;a.services=null;a.options=b;a.init=function(f,e,d){a.grid=e;a.scope=f;a.services=d;if(!b.inhibitButton){var c=e.$root.find(".ngFooterPanel");var g=e.$root.find(".ngFooterPanel .pdf-data-link-span");if(g!=null){g.remove()}var h='<button class="pdf-data-link-span">PDF Export</button>';c.append(h);c.on("click",function(){a.createPDF()})}};a.createPDF=function(){var f=[],c=[],e=a.scope.totalRowWidth();angular.forEach(a.scope.columns,function(g){if(g.visible){f.push({name:g.field,prompt:g.displayName,width:g.width*(185/e)})}});angular.forEach(a.grid.filteredRows,function(g){c.push(angular.copy(g.entity))});var d=new jsPDF();d.table(c,f,{printHeaders:true,autoSize:false,autoStretch:false});d.output("dataurlnewwindow")}};