<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic I can confirm the Raymond in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111998#M72679</link>
    <description>&lt;P&gt;I can confirm the Raymond Camden / &lt;SPAN class="vcard-fullname d-block" itemprop="name"&gt;José Antonio Postigo solution cited by Andrew does indeed work as advertised on a real device running Android 5.1.1&lt;/SPAN&gt;. One gotcha that had me stumped for a wee bit is that some calls in the code quoted by Raymond depend on the File plugin which I had wrongly assumed was redundant to File Opener 2 and so had deleted.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2016 17:46:20 GMT</pubDate>
    <dc:creator>David_S_1</dc:creator>
    <dc:date>2016-10-17T17:46:20Z</dc:date>
    <item>
      <title>View embedded pdf with in-app-browser</title>
      <link>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111993#M72674</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to get an Android apk build to open a pdf embedded in the app (in the www directory with rest of content). This wasn't working in the standard webview, so I've tried in-app-browser plugin with the same result: the app launches an instance of an external pdf viewer (in this case Google pdf, which I believe is the same viewer used in Google Drive) within the in-app-browser window, then I get a message that the pdf can't be opened. I have been able to open a hosted pdf using the same href call (though half the time it just wants to download it). For the local file, I've tried href="pdf/myfile.pdf" and href="file://pdf/myfile.pdf/"&lt;/P&gt;

&lt;P&gt;Here's my script:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;$('a').click(function(e) {
	e.preventDefault();
	window.open($( this ).attr('href'), '_self', 'hardwareback=yes', 'location=no');
});&lt;/PRE&gt;

&lt;P&gt;I know there's a plugin cordova-plugin-document-viewer, but this isn't a good solution for me because it relies on non-standard pdf viewers to be installed by the end user in the likely event they aren't already on board.&lt;/P&gt;

&lt;P&gt;Any suggestions appreciated!&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 20:30:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111993#M72674</guid>
      <dc:creator>David_S_1</dc:creator>
      <dc:date>2016-10-12T20:30:03Z</dc:date>
    </item>
    <item>
      <title>David -- I think the problem</title>
      <link>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111994#M72675</link>
      <description>&lt;P&gt;David -- I think the problem is that you're asking another app to open a file that is located in your app's private filesystem locale, that is, the folders and files where your app is stored are not available to other apps. See &lt;A href="https://github.com/apache/cordova-plugin-file"&gt;the doc page for the Cordova file plugin&lt;/A&gt;, which gives a quick overview of the filesystem on the devices. Short of creating a service that could provide the file via OS-specific methods, you could copy the file from your local app filesystem into one of the publicly accessible folders described on that page (using the file plugin) and then hand over that copied file to the browser.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 20:53:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111994#M72675</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-10-12T20:53:21Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111995#M72676</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Thanks for the quick reply. This appears to be a more simple and direct solution: &lt;A href="https://github.com/pwlin/cordova-plugin-file-opener2"&gt;https://github.com/pwlin/cordova-plugin-file-opener2&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I'll give it a try and let you know how it goes.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Edit: ah, should have read the docs more carefully: this supports opening a file &lt;EM&gt;that already exists on the device filesystem&lt;/EM&gt;. So I guess I'll have to circle back to the file plugin.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 14:08:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111995#M72676</guid>
      <dc:creator>David_S_1</dc:creator>
      <dc:date>2016-10-13T14:08:00Z</dc:date>
    </item>
    <item>
      <title>David-</title>
      <link>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111996#M72677</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;David-&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Based on some of the comments that you and Paul made, it seems like both of you may have come across this blog post, but it seems worth sharing here for others:&lt;BR /&gt;
	&lt;A href="https://www.raymondcamden.com/2016/06/26/linking-to-pdfs-in-cordova-apps/" target="_blank"&gt;https://www.raymondcamden.com/2016/06/26/linking-to-pdfs-in-cordova-apps/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It's a deep dive into how to get this working on Android and iOS with code samples.&lt;BR /&gt;
	In a nutshell, Paul's suggestion that you need to copy the pdf to a readable location is correct and the post has a code sample for how to do that.&lt;BR /&gt;
	There is some discussion in the comments of an alternative solution using PDF.js.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 05:17:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111996#M72677</guid>
      <dc:creator>Anthony_H_Intel</dc:creator>
      <dc:date>2016-10-17T05:17:02Z</dc:date>
    </item>
    <item>
      <title>Hi Anthony,</title>
      <link>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111997#M72678</link>
      <description>&lt;P&gt;Hi Anthony,&lt;/P&gt;

&lt;P&gt;No, I hadn't seen this. Though it covers some stuff I'd read in bits and pieces on stackoverflow (including pdf.js), this is the most complete discussion I've seen, including key differences between Cordova on iOS and Android.&lt;/P&gt;

&lt;P&gt;I look forward to trying out the code.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 12:26:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111997#M72678</guid>
      <dc:creator>David_S_1</dc:creator>
      <dc:date>2016-10-17T12:26:00Z</dc:date>
    </item>
    <item>
      <title>I can confirm the Raymond</title>
      <link>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111998#M72679</link>
      <description>&lt;P&gt;I can confirm the Raymond Camden / &lt;SPAN class="vcard-fullname d-block" itemprop="name"&gt;José Antonio Postigo solution cited by Andrew does indeed work as advertised on a real device running Android 5.1.1&lt;/SPAN&gt;. One gotcha that had me stumped for a wee bit is that some calls in the code quoted by Raymond depend on the File plugin which I had wrongly assumed was redundant to File Opener 2 and so had deleted.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 17:46:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/View-embedded-pdf-with-in-app-browser/m-p/1111998#M72679</guid>
      <dc:creator>David_S_1</dc:creator>
      <dc:date>2016-10-17T17:46:20Z</dc:date>
    </item>
  </channel>
</rss>

