net mvc 3. I want to display the pdf file as a part of aspx page for preview purpose.
i don't want to use IFrame control. can we do this ?
I know you said no frames, but Google PDF viewer seems to be the most popular:
<iframe src="http://docs.google.com/gview?url=http://example.com/mypdf.pdf&embedded=true"
style="width:718px; height:700px;" frameborder="0"></iframe>
And you can try:
<embed src="http://yoursite.com/the.pdf" width="500" height="375">
Best Way to Embed PDF in HTML
Related
Hi I am trying to load a single page of my WordPress site into a Codeigniter project. But without using iframe. Is it possible?
Ajax call into particular div element ? Or html object tag.. ?
<object style="(width and height in pixels)" type="text/html" data="http://my-wpsite.com" typemustmatch="typemustmatch">
<param name="data" value="http://my-wpsite.com">
Object unavailable at this moment.
</object>
I have an ASP.net web page embeded a pdf file using the object tag as below:
<object data="<%=this.FilePath %>" type="application/pdf" style="width:600px; height:820px; border:solid 1px #888;">
<embed src="<%=this.FilePath %>" type="application/pdf" />
</object>
The viewer run good and I assume all client PCs have Adobe Reader installed.
I want to make a button to simply:
remove the button panel of adobe reader
create a button to print the pdf document(using the reader's API or any other method)
That type of customization isn't possible in the Acrobat Reader Plugin AFAIK.
You can hide the default button panel by adding #toolbar=0 to the url, but the user can just 'unhide' it if he wants.
I have PDF file in server, when user clicks print button on my asp.net page I need to show print dialogue directly without showing the PDF. How can I achieve this? Please guide me.
This only works in IE, but you can embed the Adobe ActiveX control into an HTML page as follows:
<object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" style="height:75%; width: 100%; display: none;" id="viewer" name="viewer" VIEWASTEXT>
<param name="src" value="document.pdf">
</object>
Then in the onclick of the print button you can do this:
viewer.printWithDialog();
Might be able to tweak this for other browsers.
Below is my HTML File code
<div>
<asp:Panel ID="pnlPDF" runat="Server">
<iframe type="application/pdf" src="up/waters 6form.pdf"
width="956" height="500"></iframe>
</asp:Panel>
</div>
In this HTML there is a Fill-able PDF...
User enters data and submits.
when user submits I need to convert into PDF File.
assume that pdf file contains
Name: __________
Gender: __________
when user enters the detail...how to save as pdf
It sounds like there's two issues:
1. Transfering the data from the fillable PDF to the ASPX page. This is as trivial as changing the post to the aspx page.
2. Creating a PDF. This will take a little more work, and probably requires a third-party product like PDFSharp.
Alternatively, have you looked at FDF? http://www.adobe.com/devnet/acrobat/fdftoolkit.html
I have an iframe, looks like this:
< iframe id="PDFLetter" src="http://127.0.0.1/letterwriterasp/pdfs/test.pdf" width="60%" height="500" runat="server" scrolling="auto" >< /iframe>
Problem is, that pdf file is regenerated. So I need to refresh the iframe to reflect the changes to the user. I tried this:
PDFLetter.Attributes("src") = ""
PDFLetter.Attributes("src") = "http://127.0.0.1/letterwriterasp/pdfs/test.pdf"
But to no avail. It doesn't refresh the pdf in the iframe.
Not sure what can be done here. Any ideas?
Thanks,
Jason
Are you doing this on a postback and entering the code in the PageLoad event? If so it should work (for complete control over html you can laways just write to a Literal control although this is much heavier).
Try adding a random number at the end of the pdf name using ?randomnumber so that it does not use a cached version of the pdf file.