【发布时间】:2018-11-18 10:11:28
【问题描述】:
我有一个任务要做,我必须在没有下载选项的情况下以引导模式显示 pdf。该 pdf 将具有输入字段,用户可以在其中上传其签名,当用户单击“确定”时,它将保存相应的 pdf 并填充信息.我尝试这样做,使用 Bootstrap 模态,我可以在模态弹出窗口中显示带有输入选项的表单,但我希望无论我在模态中写什么,它都应该显示为 pdf,并且没有 doanload 选项。
我在 Jquery 中搜索答案,我看到了 jsPDF,但所有教程都展示了如何下载 html2pdf。我只想让用户先阅读它而不是下载。
<div class="modal fade" id="Modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
<div style="text-align: center;" class="test">
<div>
<hr><h2>Contract</h2><hr>
<h3>Hereby,i buy LaLaLa Land in the exchange of 2 cookies.</h3>
</div>
<div class="signature">
<hr><h2>Signature Page</h2><hr>
<img class="profile-pic" />
<div class="upload-button"></div>
<input class="file-upload" type="file" accept="image/*"/>
<h4>Document ID:dlfkhahdf4565n5jbnjk45h</h4>
<h4>User Name:Donald Trump</h4>
<h4>User ID:456jkn45</h4>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary">Okay</button>
</div>
</div>
</div>
</div>
【问题讨论】:
-
为什么要投反对票!你可以解释而不是仅仅投反对票!
-
我看不出这个问题有什么问题。它是具体且可回答的;除了几个错别字,没关系。
标签: javascript jquery bootstrap-modal