将PDF嵌入网站 [英] Embedding PDF in website

查看:77
本文介绍了将PDF嵌入网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在链接按钮上的网站中嵌入pdf文件,点击

我使用IFRAME按照以下方式进行操作并工作了

I want to embed a pdf file in a website on a linkbutton click

I do it in following way using IFRAME and worked

public void file1(string path)
   {
       string source = "http://docs.google.com/gview?url=http://intranet.divoli.in/QmsFiles/DAP/" + path + "&embedded=true";
       IFrame1.Attributes["src"] = source;

   }



但是问题在于它需要将文件存储在我们放置网站的路径中,

我想显示另一个目录中的文件.所以我创建了虚拟目录并尝试使用localhost,但无法正常工作.

我想做的是

http://localhost:81/DIV/IFDIV1100192.pdf [



But the problem is its needs the file to be stored in the same path where we put the website,

I want to show files from another directory. so i created virtual directory and tried with localhost,but not working.

i want to do is

http://localhost:81/DIV/IFDIV1100192.pdf[^]
Here DIV is the virtual directory

But its not showing file,displaying file not found message.




Please help me.

Thanks in Advance.

推荐答案

您的URL对我们无用,它在您的本地计算机上.

无论如何,您都必须在iframe中进行操作.没有理由,您的iframe不能指向您喜欢的任何Web服务器上的任何位置.您不需要使用google,如果安装了Acrobat,它将打开.
Your URL is useless to us, it''s on your local machine.

You have to do it in an iframe, no matter what. There''s no reason your iframe can''t point to any where on any web server you like. You don''t need to use google, it will open if Acrobat is installed.


首先请确保路径实际存在,并且PDF文件实际上位于其中.

此外,
如我所见,在您的网站中嵌入PDF的最佳方法是使用Scribed.
IPaper(经抄录)可以使您的生活更轻松.唯一的问题是所有文件都托管在刻划的服务器上(这基本上为您节省了空间和带宽:))

希望它有所帮助(并投票表决:))
First make sure the path actually exists and that the PDF file actually lays inside.

Besides,
as I see it, best way to embed PDFs in your web site is using Scribed.
IPaper (by scribed) could make your life easier. the only problem here is all files are hosted on scribed servers (which basically saves you some space and bandwidth :))

Hope it helped (and vote if it did :))


这篇关于将PDF嵌入网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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