Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/273.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在印刷时转移纸张_C#_Asp.net_Printing - Fatal编程技术网

C# 如何在印刷时转移纸张

C# 如何在印刷时转移纸张,c#,asp.net,printing,C#,Asp.net,Printing,我们有一台像复印机一样的大打印机。打印时,它可以分组/移动纸张。 例如:纸张1到10->左移,11到25->右移,26到30->左移,等等 我想我得做一个线程 但我不知道如何在我的代码中实现: LeOrdre_BL oOrdr_BL = new LeOrdre_BL(); protected void Page_Load(object sender, EventArgs e) { var xtraReport_Pricipal = new LetrVoiture(

我们有一台像复印机一样的大打印机。打印时,它可以分组/移动纸张。 例如:纸张1到10->左移,11到25->右移,26到30->左移,等等

我想我得做一个线程

但我不知道如何在我的代码中实现:

LeOrdre_BL oOrdr_BL = new LeOrdre_BL();
    protected void Page_Load(object sender, EventArgs e)
    {
        var xtraReport_Pricipal = new LetrVoiture();

        if (oOrdr_BL.Get_All_LetrVoit_BL().Count != 0)
        {
            foreach (var oItem in oOrdr_BL.Get_All_LetrVoit_BL())
            {

                var xtraReport_Other = new LetrVoiture();
                //Performing pre-rendering operations: binding, passing parameters and etc.
                Session["IdVoit"] = oItem.LettreVoidID;
                Session["Mode"] = oItem.ModlMod;
                Session["PortDu"] = oItem.LibPort;
                Session["Enlev"] = oItem.LibExpr;
                Session["Unite"] = oItem.EnlvUnite;

                Session["Colis"] = oItem.NbrColis;
                Session["Poids"] = oItem.LePoids;

                Session["LeCR"] = oItem.EnlvCrmb;
                Session["LeVD"] = oItem.EnlvDecl;

                Session["Code_Exp"] = oItem.ClientID;
                Session["RS_Nom_Exp"] = oItem.RsNomExp;
                Session["Addr_Exp"] = oItem.AddrExp;
                Session["Cp_Exp"] = oItem.CpExp;
                Session["Ville_Exp"] = oItem.VilleExp;
                Session["Tel_Exp"] = oItem.TelExp;
                Session["Fax_Exp"] = oItem.FaxExp;

                Session["Code_Dest"] = oItem.CodeDest;
                Session["RS_Nom_Dest"] = oItem.RaisonSoc;
                Session["Addr_Dest"] = oItem.Adresse;
                Session["Cp_Dest"] = oItem.Cp;
                Session["Ville_Dest"] = oItem.Ville;
                Session["Tel_Dest"] = oItem.Tel;
                Session["Fax_Dest"] = oItem.Fax;

                xtraReport_Other.CreateDocument();
                xtraReport_Pricipal.Pages.AddRange(xtraReport_Other.Pages);
            }

            xtraReport_Pricipal.PrintingSystem.ContinuousPageNumbering = true;

            using (MemoryStream ms = new MemoryStream())
            {
                try
                {
                    PdfExportOptions opts = new PdfExportOptions();
                    opts.ShowPrintDialogOnOpen = true;
                    xtraReport_Pricipal.ExportToPdf(ms, opts);
                    ms.Seek(0, SeekOrigin.Begin);
                    byte[] report = ms.ToArray();
                    Page.Response.ContentType = "application/pdf";
                    Page.Response.Clear();
                    Page.Response.OutputStream.Write(report, 0, report.Length);
                    //Page.Response.End();
                    HttpContext.Current.ApplicationInstance.CompleteRequest();
                }
                finally
                {
                    ms.Close();
                }
            }


        }
        //Response.AppendHeader("REFRESH", "4;URL=Ordre.aspx");
    }
提前谢谢你,
Stev

当你说Shift。。?您的意思是打印/选择不同的纸盘。。?如果是这样,请看这篇文章。。在这种情况下,我也不清楚Shift到底意味着什么。Shift意味着对纸张进行分组,所以我们可以很容易地将其分开