jquery、webmethod、および印刷に問題があります。
私のjqueryコード:
 $("#PrintBtn").click(function () {
            $("#printDialog").dialog({
                modal: true, autoResize: true, height: $(window).height() - 10, width: '90%',
                buttons: {
                    "CANCEL": function () {
                        $(this).dialog("close");
                    },
                    "PRINT ALL": function () {
                        $("#ProcessMsg").dialog({ modal: true, width: 320, height: 200 });
                        FillFe(function () {
                            PageMethods.ProcessPrintRequest(null, $("#hidPDF").val(), FreeEditFields, CreatePostItObjectArray(), function (link) {
                                printResult(link);
                                $("#ProcessMsg").dialog("close");
                                $(this).dialog("close");
                            });
                        });
                    },
                    "PRINT SELECTED PAGES": function () {
                        if (SelectedPages.length > 0) {
                            $("#ProcessMsg").dialog({ modal: true, width: 320, height: 200 });
                            FillFe(function () {
                                PageMethods.ProcessPrintRequest(SelectedPages, $("#hidPDF").val(), FreeEditFields, CreatePostItObjectArray(), function (link) {
                                    printResult(link);
                                    $("#ProcessMsg").dialog("close");
                                    $(this).dialog("close");
                                });
                            });
                        }
                    },
                    "UNCHECK": function () {
                        $(".checkPrint").prop("checked", false);
                        SelectedPages = new Array();
                    }
                }
                , open: function () {
                    SelectedPages = new Array();
                    $("#BookMenu").fadeOut(500);
                    BookMenuShow = false;
                    // $(".checkPrint").prop("checked", false);
                    justShow = false;
                    currentPrTn = PageIndex;
                    //Popluate the chapter box 
                    $("#slChapters").empty();
                    for (var ch = 0; ch < chaptsAndPages.length; ch++) {
                        var chPg = chaptsAndPages[ch].split(",");
                        $("#slChapters").append($("<option></option>")
                                        .attr("value", chPg[0])
                                        .text(chPg[1]));
                    }
                    PopulatePrintBoxEx();
                }
            });
        });
私のwebmethodコード
      [WebMethod(true)]
    public static string ProcessPrintRequest(string[] selected, string PDFName, List<FreeEditField> freeEditFields, List<PostItNote> PostIts)
    {
        string pdfName = PDFName + ".pdf";
        string pathToOrginalPdf;
        pathToOrginalPdf = HttpContext.Current.Server.MapPath(pdfName);
        if (selected == null || select.length == 0)
        {
            List<string> ss = new List<string>();
            QuickPDFAX0816.PDFLibrary qp = new PDFLibrary();
            qp.UnlockKey("xxxxxcodexxxx");
            qp.LoadFromFile(pathToOrginalPdf, "");
            int n = qp.PageCount();
            for (int t = 1; t < n + 1; t++)
            {
                ss.Add(t.ToString()); 
            }
            selected = ss.ToArray(); 
        }
        return Common.pdfUtilites.PrintSelectedPages(pathToOrginalPdf, Path.GetFileNameWithoutExtension(Path.GetRandomFileName()) + ".pdf", selected.ToList(), freeEditFields, PostIts);
    }
私のユーティリティコード
 public static string PrintSelectedPages(string pathToPDF, string docName, List<string> selectedPages, List<FreeEditField> freeEdits, List<PostItNote> PostIts)
    {
        QuickPDFAX0816.PDFLibrary qp = new PDFLibrary();
        qp.UnlockKey("xxxcodexxxx");
        if (qp.LoadFromFile(pathToPDF, "") == 1)
        {
            string pages = "";
            foreach (string s in selectedPages)
            {
                pages = pages + s + ",";
            }
            qp.ExtractPageRanges(pages);
            StringBuilder sb = new StringBuilder(); 
            sb.Append("var pp=this.getPrintParams();"); 
            sb.Append("pp.interactive = pp.constants.interactionLevel.automatic;"); 
            sb.Append("this.print(pp);");
            qp.SetOpenActionJavaScript("var pp=this.getPrintParams();this.print(pp);"); 
            qp.SaveToFile(HttpContext.Current.Server.MapPath("../TmpForDownloads/print" + docName));
            qp = null;
            string doc = AddEditFieldData(freeEdits, "../TmpForDownloads/print" + docName, selectedPages);
            doc = AddPostItNotes(PostIts, "../TmpForDownloads/print" + docName, selectedPages);
            return doc;
        }
        else
        {
            return "ERROR";
        }
    }
私の問題への私のリンク。
http://www.agflipbooks.com/books/book.aspx?bookid=301
これが起こっていることです。プリンタのように見える右下のアイコンの印刷ボタンをクリックします。[すべて印刷]ダイアログボックスをクリックすると、約2〜3分後にシステムプロセスが表示されます。2番目のボックスが表示され、初期化してから注意します。私はそれを約15分間放置しましたが、何も凍りませんでした。
上のリンクをクリックして、自分の目で確かめてください。ディレクトリTmpForDownloasに移動すると、PDFが表示されます。PDFをクリックすると、すべてのファイルが作成されます。
AddPostItNotesは、PDFに追加されるテキスト付きのフィールドがある場合、AddEditFieldDataと同じように本のページに追加されたすべてのポストイットを追加します。
何か助けていただければ幸いです。
私もそうです。
function printResult(res) {
        var userAgent = navigator.userAgent.toLowerCase();
        $.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase());
        $.browser.safari = /safari/.test(navigator.userAgent.toLowerCase());
        $.browser.mozilla = /mozilla/.test(navigator.userAgent.toLowerCase());
        var time = 3000; 
        var OSName = "Unknown OS";
        if (navigator.appVersion.indexOf("Win") != -1) OSName = "Windows";
        if (navigator.appVersion.indexOf("Mac") != -1) OSName = "MacOS";
        if (navigator.appVersion.indexOf("X11") != -1) OSName = "UNIX";
        if (navigator.appVersion.indexOf("Linux") != -1) OSName = "Linux";
        $("#pdfPrintDialog").dialog({ modal: true, width: 640, height: 500,
            open: function () {
                var objectTag = "<object data='" + res + "#view=Fit&toolbar=1' type='application/pdf' width='100%' height='100%'><p>It appears your Web browser is not configured to display PDF files. No worries, just <a href='../TmpDownloads/testpdf.pdf'>click here to download the PDF file.</a></p>"
                $("#pdfArea").html(objectTag);
            },
            buttons: {
                "Done": function () { $(this).dialog("close"); }
            }
        });
    }