<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WnioskiOOdbiorNadgodzinWydruk.aspx.cs" Inherits="KOLKaP_WEB.KOLKaP.WnioskiOOdbiorNadgodzinWydruk" %>

<%@ Register TagPrefix="dx" Namespace="DevExpress.XtraReports.Web" Assembly="DevExpress.XtraReports.v14.2.Web, Version=14.2.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
    <script type="text/javascript">
      function init(s) {
        var createFrameElement = s.viewer.printHelper.createFrameElement;
        s.viewer.printHelper.createFrameElement = function (name) {
          var frameElement = createFrameElement.call(this, name);
          var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
          if (isChrome) {
            frameElement.addEventListener("load", function (e) {
              if (frameElement.contentDocument && frameElement.contentDocument.contentType !== "text/html")
                frameElement.contentWindow.print();
            });
          }
          return frameElement;
        }
      }
    </script>
<body>
    <form id="form1" runat="server">
      <asp:Label ID="lblError" runat="server"></asp:Label>
        <div>
            <dx:ASPxDocumentViewer ID="dv" runat="server" ToolbarMode="Ribbon">
              <ClientSideEvents Init="init" />
            </dx:ASPxDocumentViewer>
        </div>
    </form>
</body>
</html>
