如何验证iframe中嵌入的pdf文件? [英] How to validate a pdf file embedded with in iframe?

查看:158
本文介绍了如何验证iframe中嵌入的pdf文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何验证iframe中嵌入的pdf文件?我已经嵌入了pdf文件,如下所示:

< iframe id =fredstyle =border:1px solid#666CCCtitle =i-Frame中的PDFsrc =PDF文件/funds-transfer-cash-demand-form.pdfframeborder =1scrolling =autoheight =1100width =850>< / iframe>

有联系人no:,Age,DOB等的文本框控件。我想验证这些。它是一个网络平台(带有C#的asp.net)

How to validate a pdf file embedded with in iframe? I have embedded the pdf file as follows:
<iframe id="fred" style="border:1px solid #666CCC" title="PDF in an i-Frame" src="PDF FILES/funds-transfer-cash-demand-form.pdf" frameborder="1" scrolling="auto" height="1100" width="850" ></iframe>
There are textbox controls for contact no:,Age,DOB etc. I want to validate those. Its a web platform (asp.net with C#)

推荐答案

停止使用iframe :)



什么您在iframe中加载是一个单独的文档,因此它与窝藏页面无关,因此您不能使用它来验证另一个,并且通常不应尝试使用输出格式pdf作为其他内容,可能排除可编辑的pdf,但这是另一个话题。任何验证都应该在你提供pdf之前进行,这将是一种标准方法。



我建议解决当前问题的方法是使pdf可供下载使用一个链接然后根据你的表单数据列出链接并放弃iframe的想法(所以如果你想打开pdf(为什么)你可以创建一个viewpdf页面,将pdf显示为参数
stop using iframe :)

what you load in an iframe is a seperate document and therefore it doesn't related to the harbouring page an you therefore cannot use one to validate the other with and generally shouldn't attempt to use the output format pdf as anything beyond that, to the possible exclusion of editable pdfs, but that's another talk. Any validation should happen before you make the pdf available, that would be a standard approach.

My suggestion solution to problem at hand is to make the pdf available for download using a link and then list the links based on your form dataand abandon iframe idea (so if you want to open the pdf (why) you could make a viewpdf page that would take the pdf to show as parameter


这篇关于如何验证iframe中嵌入的pdf文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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