菜鸟教程小白 发表于 2022-12-13 15:48:00

android - 在 android 和 IOS phonegap 应用程序中读取 pdf 文件


                                            <p><p>我正在开发一个<strong>phonegap-app</strong>。我正在使用网站“build.phonegap.com”来构建 apk(android) 或 IOS(ipa) 文件。该应用程序基本上只使用 <strong>html5</strong>、<strong>css3</strong>、<strong>jquery mobile</strong> 和 <strong>jquery</strong>。我在 config.xml 文件中尝试了以下代码,<br/><br/><code><plugin name="com.kernix.pdfviewer"spec="1.1.0"source="pgb"/></code><br/>我找到了<a href="https://build.phonegap.com/plugins" rel="noreferrer noopener nofollow">here</a> .<br/><br/>在我的 js 文件中的 document.ready 中,我写了类似的东西,<br/><code>window.open('http://www.example.com/foldername/document. pdf', '_blank');</code><br/>但它不起作用。我做错什么了吗?请帮忙,谢谢。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>我尝试了下面对我有用的代码,我明白了<a href="https://stackoverflow.com/questions/26304729/not-able-to-launch-a-pdf-file-in-inappbrowser-in-android" rel="noreferrer noopener nofollow">here</a> <br/><code>window.open(encodeURI('https://docs.google.com/gview?embedded=true&url=http://www.your-server.com/files/your_file.pdf'), '_blank', 'location=yes,EnableViewPortScale=yes');</code></p></p>
                                   
                                                <p style="font-size: 20px;">关于android - 在 android 和 IOS phonegap 应用程序中读取 pdf 文件,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/36303337/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/36303337/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: android - 在 android 和 IOS phonegap 应用程序中读取 pdf 文件