ionic pdf thumbnail viewer - pdf

I want to add a pdf thumbnail to my ion-scroll view, basically I want to add something like this :
I have tried this code :
<iframe src="img/pdf1.pdf#view=fit,10&toolbar=0" style="width:220px;height:100%"></iframe>
<a href="img/pdf1.pdf" class="loupe">
<img src="img/loupe.png">
</a>
This works only on web browsers not on mobiles.
Any suggestions please?

If you want to open pdf in your app with scroll option, its better way to open pdf in in-app browser

Related

How to set payment image icon on footer Bigcommerce?

've recently added Zipmoney as a payment option but my theme doesn't support the logo to display in the footer.
I've looked at the community answers which gave code to add to the footer template but my footer refers to another 'payment' icon file to display the icons. See copied code below. Just wondering if anyone can help me out with where I can add the logo image to display next to existing icons in the footer? And does it resize automagically? Or do I need to make sure the image I upload is the correct size?
{{> components/common/payment-icons}}
</div>
for easy. upload zip logo at image manager then open open /templates/components/common/payment-icons.html
paste that image code after like below sample
{{#if show_accept_visa}}
<svg class=”footer-payment-icon”><use xlink:href=”#icon-logo-visa”></use></svg>
{{/if}}
<img src="zip image path">

How do I link to a pdf in vue?

I'm trying to create a link on my vue app to local pdf files. Right now here's my problem.
My pdfs are located in assets/static/ and presently linking to them like this.
<template>
<div id="forms" class="view-wrapper">
<h3>Downloadable Forms</h3>
Claim Form
</div>
</template>
This brings up a link on the page, but when I click it, I'm taken to a blank page on my app with just the navbar and footer and nothing in between. I'm hoping to have it bring up the document in the browsers pdf viewer in another tab. Some help would be greatly appreciated.
Edit: SOLVED: #dan helped me realize that I just had to use one dot to access my assets folder.
To render a pdf in the browser use an <iframe src="path-to-pdf" />. Unless you're binding reactive data to the element you don't have to do anything different in vue. Check out https://stackoverflow.com/a/52644970/6890774 this is a similar issue.

Phantomjs rasterize (screen capture) simulate mobile device

Is there any way of capturing web screnshot in the way that the output will look like the way a website would look using a mobile device, such an iphone?
Iv'e tried using an iphone user-agent, and to use the exact same resolution, but the result is not the same.
Im trying to render a simple page using this html:
<html>
<head>...</head>
<body>
<img src="..." style="400px;height:300px" />
</body>
I know that this code is not responsive. though I would expect phantomjs to render it the way the device renders it.
Thanks

show PDF in an Ext.Container SENCHA TOUCH 2

I am trying to show a pdf content in a Ext.Container of Sencha Touch 2. Tried several ways answered on SO but they all didn't work.
Few things tried, include:
Tried converting file content into html and extract the HTML inside the BODY tag and put it into Ext.XTemplate of the Container. This way I can only play cool with it, if HTML is being converted from a .doc file but if it was a .pdf file it messes up design because when I convert a pdf file into HTML then it adds position: absolute inside every DIV and with absolute position the parent element will not have any height and I am stuck with the scrolling issues.
for example:
<div style="position:relative;display:inline-block;;top:994px;left:712px;font-family:'Times New Roman';font-size:10pt;white-space:nowrap;">description</div>
Second try,
2. Tried putting PDF into IFRAME and EMBED tags as a link and put them into the Ext.XTemplate but these tags are also not working in mobile.
for example:
<embed type="application/pdf" width="800px" height="800px" src="example.pdf" />
<iframe style="position:absolute; z-index: 1; left: 0; top: 0;" width="100%" height="2000" src="example.pdf"></iframe>
Please give some idea how to display/open PDF(or its content, with atleast few formatting). Or do we have any plugin to display it. One final solution is showing using google docs but my initial requirement is showing PDF content in sencha touch 2 app not using any third party service(like google docs).
you can use inapp browser plugin for opening file in the iOS:
install inappbrowser cordoav plugin and open file like this:
function openPDF(){
ref = window.open('http://static.googleusercontent.com/media/www.google.com/en/us/webmasters/docs/search-engine-optimization-starter-guide.pdf', '_blank', 'location=no');
ref.addEventListener('exit', function() {
ref.removeEventListener('exit', function(){});
ref.close();
} );
}
It is very useful the PDFObject library, I have added this third-parties library to my project based on Sencha Touch 2 and its working in the browser, my current issue is show the pdf in Ipad.. :-(

HTML rendering using NSTextView

I have an HTML with base 64 encoded inline image. I have to display this in an application. I am using NSTextView to display this. Now this works fine in 10.6 but in 10.5 instead of the image I kind of see a placeholder. So I went ahead and tried opening that HTML with Text Edit. The same thing happened. TextEdit on 10.6 is able to render it perfectly but 10.5 TextEdit is just not able to render the image.
Can some one please tell me what could be wrong. The HTML is like -
<html>
<head>..</head>
<body><p>
<img width="213" height="123" src="data:image/jpg;base64,/9j/....."alt="" />
</p>
</body>
</html>
PS: Please dont ask why I am not using WebView. I have to use NSTextView.