从实际位置在客户端打开PDF文件 [英] Open PDF file at client side from actual location

查看:63
本文介绍了从实际位置在客户端打开PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

场景:
实际上,我想在客户端以可编辑模式打开PDF
我的代码,在没有打开/保存对话框的情况下以可编辑模式打开pdf文件
但是当我保存pdf后完成pdf更改后,pdf会保存在TemporaryFiles中.

我在客户端计算机上安装了pdf编写器

如何从服务器位置向客户端打开它?

请帮忙

这是我尝试过的

Scenario:
Actually i want to open PDF at client side in editable mode
my code, open pdf file in editable mode without open/save dialog box
but after i finish changes in pdf when i save pdf, pdf saves in TemporaryFiles.

i have pdf writer installed on client machine

how can i open it from server location to client ?

Please help

here what i tried

protected void btnway2_Click(object sender, EventArgs e)
  {
      string path = MapPath("1.pdf");
      System.Net.WebClient client = new System.Net.WebClient();
      Byte[] buffer = client.DownloadData(path);

      if (buffer != null)
      {
          Response.ContentType = "application/pdf";
          Response.AddHeader("content-length", buffer.Length.ToString());
          Response.BinaryWrite(buffer);
      }

  }



意味着我保存PDF文件后,它应该替换服务器上的现有文件.



Means after i save PDF file, it should replace existing file at server.

推荐答案

您无法将已编辑的文件从客户端直接保存到服务器.

您将必须向用户提供使用FileUpload控件将编辑的PDF上传到服务器的功能.
You cannot directly save the edited file from the client to the server.

You will have to provide the facility to the user to upload the edited PDF using the FileUpload control to the server.


这篇关于从实际位置在客户端打开PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆