热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

在android上使用adobeair打开pdf文件-openapdfusingadobeaironandroid

HiImtryingtoopenapdffromaironanandroiddevice,ImusingFlashCCtoauthorit.Thecode

Hi I'm trying to open a pdf from air on an android device, I'm using Flash CC to author it. The code I have works in the Air debug launcher but fails on the device. The PDF is included in the APK. Am I addressing the PDF correctly? Does

嗨,我想在Android设备上打开一个pdf,我正在使用Flash CC来创作它。我在Air调试启动器中运行的代码但在设备上失败了。 PDF包含在APK中。我正确地处理了PDF吗?是否

openWithDefaultApplication();

work on android?

在android上工作?

import flash.filesystem.*;

var thePDF = "poppinchicken.pdf";
var realFile:File = File.applicationDirectory.resolvePath(thePDF);
var destination:File = File.cacheDirectory;
destination = destination.resolvePath(thePDF);
realFile.copyTo(destination,true);


But01.addEventListener(MouseEvent.CLICK, outputbox7zz);
function outputbox7zz(e: MouseEvent): void {



destination.openWithDefaultApplication();
}

1 个解决方案

#1


1  

Because the PDFs are hosted on the web I'm able to solve this simply for this project using

因为PDF是在Web上托管的,所以我只能使用这个项目来解决这个问题

var request: URLRequest = new URLRequest("http://www.hotnkickin.co.uk/mansion/pdf/chickenfillets.pdf");
navigateToURL(request);

This hasn't solved my original question but the result works for me in this instance, and so might help another new starter like me.

这并没有解决我原来的问题,但结果在这个例子中对我有用,所以可能会帮助像我这样的另一个新的首发。


推荐阅读
author-avatar
mobiledu2502876347
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有