{"id":1056,"date":"2010-10-09T09:28:07","date_gmt":"2010-10-09T09:28:07","guid":{"rendered":"http:\/\/enjoyasp.net\/?p=1056"},"modified":"2010-11-27T03:16:10","modified_gmt":"2010-11-27T03:16:10","slug":"%e7%99%be%e5%ba%a6%e6%96%87%e5%ba%93%e6%95%88%e6%9e%9c%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"https:\/\/enjoyasp.net\/index.php\/2010\/10\/09\/%e7%99%be%e5%ba%a6%e6%96%87%e5%ba%93%e6%95%88%e6%9e%9c%e5%ae%9e%e7%8e%b0\/","title":{"rendered":"\u7c7b\u4f3c\u767e\u5ea6\u6587\u5e93\u6548\u679c\u5b9e\u73b0"},"content":{"rendered":"<p>\u5b9e\u73b0\u7684\u6548\u679c\u5982\u4e0b\uff1a<br \/>\n<img decoding=\"async\" src=\"http:\/\/enjoyasp.net\/wp-content\/uploads\/2010\/10\/swf.bmp\" alt=\"\u6587\u5e93\" width=\"670px\" \/><br \/>\n\u6b65\u9aa4\uff1a<br \/>\n1\uff0c\u5229\u7528FileUpload\u63a7\u4ef6\u505a\u6587\u4ef6\u4e0a\u4f20<br \/>\n2\uff0c\u8f6c\u6362\uff1a\u5b89\u88c5FlashPaper2.2\uff0c<br \/>\n\u5728\u7a0b\u5e8f\u4e2d\u8c03\u7528cmd\u547d\u4ee4\u5b8c\u6210\u8f6c\u6362\uff1a<br \/>\nFlashPrinter.exe &#8220;test.doc&#8221; -o &#8220;test4.swf&#8221;<br \/>\n\u6ce8\uff1aiis\u53ca\u5e94\u7528\u7a0b\u5e8f\u6c60\u9700\u5f00\u6743\u9650\u4ee5\u6267\u884cFlashPrinter<br \/>\n\u5982\u4e0b\uff1a<\/p>\n<pre lang=\"csharp\">\r\ntry\r\n{\r\n\r\nProcess p = new Process();\r\n\r\np.StartInfo.FileName = \"cmd\";\r\n\r\np.StartInfo.UseShellExecute = false;\r\n\r\np.StartInfo.RedirectStandardInput = true;\r\n\r\np.StartInfo.RedirectStandardOutput = true;\r\n\r\np.StartInfo.RedirectStandardError = true;\r\n\r\np.StartInfo.CreateNoWindow = true;\r\n\r\np.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;\r\n\r\np.Start();\r\n\r\nstring strOutput = null;\r\n\r\nstring outputPath = Server.MapPath(\"~\/\/test5.swf\");\r\nstring s = @\"FlashPrinter.exe \"   + \"\\\"\" + FilePath + \"\\\" -o \\\"\" + outputPath + \"\\\"\";\r\n\r\np.StandardInput.WriteLine(s);\r\n\r\np.StandardInput.WriteLine(\"exit\");\r\n\r\nstrOutput = p.StandardOutput.ReadToEnd();\r\n\r\nConsole.WriteLine(strOutput);\r\n\r\np.WaitForExit();\r\n\r\np.Close();\r\n\r\nlblMessage.Text = \"success\";\r\n\r\nembed1.Attributes.Add(\"src\", outputPath);\r\n\r\n}\r\n\r\ncatch (Exception ex)\r\n{\r\n\r\nlblMessage.Text = ex.ToString();\r\n\r\n}\r\n\r\n\u6ce8\uff1a\u6267\u884c\u5b8c\u4e4b\u540e\u53ef\u5173\u6389\u8fdb\u7a0b\r\n\/\/\/?&lt;summary&gt;\r\n \/\/\/?\u6839\u636e\u8fdb\u7a0b\u540d\u79f0\u6765\u5173\u95ed\u8fdb\u7a0b\r\n \/\/\/?&lt;\/summary&gt;\r\n \/\/\/?&lt;param?name=\"processName\"&gt;&lt;\/param&gt;\r\n private?static?void?KillPrecess(string?processName)\r\n {\r\n foreach?(Process?p?in?Process.GetProcesses())\r\n {\r\n if?(p.ProcessName?==?processName)\r\n {\r\n p.Kill();\r\n }\r\n }?\r\n }<\/pre>\n<p>3\uff0c\u5728\u7ebf\u64ad\u653e\uff1a\u82e5\u6587\u6863\u8f83\u5c0f\uff0c\u4e00\u822c\u7684flash\u64ad\u653e\u5668\u5373\u53ef\u3002\u82e5\u6587\u4ef6\u5f88\u5927\uff0c\u4e00\u6b21\u52a0\u8f7d\u6240\u6709\u518d\u663e\u793a\u6587\u4ef6\u7684\u64ad\u653e\u5668\u663e\u7136\u4f1a\u62d6\u6162\u901f\u5ea6\uff0c\u8fd9\u65f6\u9700\u8981\u4e86\u89e3\u7684\u662f\u4e00\u4e2a\u5f00\u6e90\u7684<a href=\"http:\/\/flexpaper.devaldi.com\/\">flexpaper<\/a>\u64ad\u653e\u5668\uff0c\u5b83\u53ef\u4ee5\u64ad\u653e\u4e00\u5e27\u4e00\u9875\u7684flash\uff1b\u8981\u50cf\u767e\u5ea6\u6587\u5e93\u3001\u8c46\u4e01\u4e00\u6837\u4fee\u6539flexpaper\uff0c\u8ba9\u5b83\u652f\u6301\u4e00\u6b21\u4ec5\u8bfb\u53d6\u6307\u5b9a\u9875\u6570\u7684flash\uff1b\u5982\u679c\u6587\u6863\u5b89\u5168\u7ea7\u522b\u8f83\u9ad8\uff0c\u4e0d\u5141\u8bb8\u4e0b\u8f7d\u67e5\u770b\uff0c\u5219\u9700\u8981\u7ed9flexpaper\u52a0\u4e0a\u52a0\u5bc6\u89e3\u5bc6\u7b97\u6cd5\uff1b\u5982\u679c\u9700\u8981\u767b\u5f55\u7528\u6237\u624d\u80fd\u67e5\u770b\uff0c\u5219\u8981\u8ba9flexpaper\u6709\u767b\u5f55UI\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9e\u73b0\u7684\u6548\u679c\u5982\u4e0b\uff1a \u6b65\u9aa4\uff1a 1\uff0c\u5229\u7528FileUpload\u63a7\u4ef6\u505a\u6587\u4ef6\u4e0a\u4f20 2\uff0c\u8f6c\u6362\uff1a\u5b89\u88c5FlashPaper2.2 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[],"class_list":["post-1056","post","type-post","status-publish","format-standard","hentry","category-aspdotnet"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/1056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/comments?post=1056"}],"version-history":[{"count":0,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/1056\/revisions"}],"wp:attachment":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/media?parent=1056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/categories?post=1056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/tags?post=1056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}