I want to display an attachment in a iframe, I tried adding <WebPartPages:AllowFraming runat:"server"/> in the Master Page but it didn't work, do you have any suggestions about how to approach the problem.
Try using the full path for your attachment.
<ac:structured-macro ac:name="html"><ac:plain-text-body><![CDATA[<iframe src="http://YOURDOMAIN/path_to_file" noborder="0" width="830" height="800" scrolling="yes" seamless></iframe>]]></ac:plain-text-body></ac:structured-macro>
Hope it Helps
Related
I'm hoplessly trying to remove the title of my Google Sheet that is embed on my webpage (by Webnode). I've already tried adding &chrome=false to the link, but then it doesn't work (it says that it can't load the document). Where should I put that in the code? Or what's the way of removing the title?
Here's the code:
<iframe width="90%" height="420" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRERjtiSWcFvm5gtyyfJbsb83RD3Du9-hUCWwMiSo4AaFDEbe1nyn_vFYVsyE5XqryBdvMsNY3EV6Vs/pubhtml?widget=true&headers=false"></iframe>
Hahaha, I resolved my second issue in a row. :D
For some reason, webnode added that "&" something at the end of "chrome=false", and now it is working!
<iframe width="90%" height="420" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vRERjtiSWcFvm5gtyyfJbsb83RD3Du9-hUCWwMiSo4AaFDEbe1nyn_vFYVsyE5XqryBdvMsNY3EV6Vs/pubhtml?widget=true&&chrome=false&headers=false"></iframe>
I would like to put into my Jenkins view another HTML, and tried to do this that way, adding that as a text section:
<iframe style="border: 0;position: relative;" width=1000px height=300px src="http://my_source.html">
Error
</iframe>
And I see it doesn't work, it doesn't even show on the view's source. Another part of HTML code put into text section works fine. I found that XFrame-Filter plugin configured to ALLOW-FROM http://my_source.html can solve that problem, but unfortunately it doesn't. Putting that content by object or link rel doesn't work too. At this moment, I have no idea how to make it work. Could you help me with that?
I am embedding a local pdf file into a simple webpage and I am looking to set the initial zoom to fit to the object size. Here is what I tried but it is not affecting the zoom.
<embed src="filename.pdf?zoom=50" width="575" height="500">
does anyone know how to modify the code so its initial zoom is set to fit the object size.
Bit of a late response but I noticed that this information can be hard to find and haven't found the answer on SO, so here it is.
Try a differnt parameter #view=FitH to force it to fit in the horzontal space and also you need to start the querystring off with a # rather than an & making it:
filename.pdf#view=FitH
What I've noticed it is that this will work if adobe reader is embedded in the browser but chrome will use it's own version of the reader and won't respond in the same way. In my own case, the chrome browser zoomed to fit width by default, so no problem , but Internet Explorer needed the above parameters to ensure the link always opened the pdf page with the correct view setting.
For a full list of available parameters see this doc
EDIT: (lazy mode on)
For me this worked(I wanted to zoom in since the container of my pdf was small):
<embed src="filename.pdf#page=1&zoom=300" width="575" height="500">
This method uses "object", it also has "embed". Either method works:
<div id="pdf">
<object id="pdf_content" width="100%" height="1500px" type="application/pdf" trusted="yes" application="yes" title="Assembly" data="Assembly.pdf?#zoom=100&scrollbar=1&toolbar=1&navpanes=1">
<!-- <embed src="Assembly.pdf" width="100%" height="100%" type="application/x-pdf" trusted="yes" application="yes" title="Assembly">
</embed> -->
<p>System Error - This PDF cannot be displayed, please contact IT.</p>
</object>
</div>
just in case someone need it, in firefox for me it work like this
<iframe src="filename.pdf#zoom=FitH" style="position:absolute;right:0; top:0; bottom:0; width:100%;"></iframe>
Followed #Rich answer, I used view=FitH in my code to view PDF content base64 in Angular as below.
I shared for whom concern about view base64 content PDF file with object tag using Angular framework.
The option for view PDF
this.pdfContent =
URL.createObjectURL(this.b64toBlob(content, 'application/pdf')) +
'#toolbar=0&navpanes=0&scrollbar=0&view=FitH';
Read PDF content from API as
let content = DataHelper.getDataFromAPI();
When click show content button use
showData() {
let content = DataHelper.getDataFromAPI();
this.pdfContent =
URL.createObjectURL(this.b64toBlob(content, 'application/pdf')) +
'#toolbar=0&navpanes=0&scrollbar=0&view=FitH';
this.pdfview.nativeElement.setAttribute('data', this.pdfContent);
}
In HTML file use object tag as
<object #pdfview
[data]=''
type="application/pdf"
width="100%"
height="800px"
>
</object>
Link Angular demo https://stackblitz.com/edit/angular-ivy-tdmieb
Bit late response to this question, however I do have something to add that might be useful for others.
If you make use of an iFrame and set the pdf file path to the src, it will load zoomed out to 100%, which the equivalence of FitH
Use iframe tag do display pdf file with zoom fit
<iframe src="filename.pdf" width="" height="" border="0"></iframe>
This works fine for me
<embed src=".file-name.pdf#zoom=FitH" width="100%" height="1930px" />
Is it possible without going to https://developers.facebook.com/tools/lint/ and putting in the URL, to rub a webservice or something and have it return the Iframe code? I do not want to go to that site manually. Thanks for any help
Just construct the URL yourself,
<iframe
src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fgoogle.com%2F"
scrolling="no" frameborder="0" style="height: 62px; width: 100%"
allowTransparency="true"></iframe>
and put your site's URL urlencoded behind the ?href=.
Here you go
just modify the urls array :)
http://jsfiddle.net/Tatqu/
I am using iframe in jsp page.
<iframe frameborder="1" src="view/jsp/refreshChat.jsp" STYLE='width:20%;' />
But when I run that page its gives a blank page.
This is an example of an iframe code:
<iframe src="page_to_show_inside_iframe.jsp" style="width:100%; height:250px;">
<p>Text to show in browsers that don't support iframes.</p>
</iframe>
Perhaps you're lacking height value.
Also, be sure the value for src attribute is correctly referenced, ie. relative path is built OK ( if your parent page URL is http://localhost:8080/mysite/myparentpage.jsp try to load your child page pasting src value instead your parent page's name, http://localhost:8080/mysite/view/jsp/refreshChat.jsp , test this in a new window or tab)
Check if src="view/jsp/refreshChat.jsp" is proper. From what location You use this?
DO not forget to add http:// to your web url. Also, avoid localhost. Use the IP address.