android open pdf,在android上使用adobe air打開pdf文件

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.

這並沒有解決我原來的問題,但結果在這個例子中對我有用,所以可能會幫助像我這樣的另一個新的首發。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值