I am having trouble opening a PDF file in an HTML window on Mac OS.
My code works fine on any PC, however when running on a Mac, the HTML window shows a white screen when I am trying to load a PDF.
I have tried several machines, all of which I installed the latest version of Acrobat Reader on before testing.
I also traced HTML.pdfCapatibility, which returns 3201 (Adobe Reader cannot be found.) on all Macs.
My code is below, please let me know if anyone has any ideas...I kind of need this to work asap...
Thanks a lot.
private function openPDF(stName:String):void{
//Check PDF compatibility.
if(HTML.pdfCapability== HTMLPDFCapability.STATUS_OK)
{
//No file to open. Exit with error.
if (stName == null)
{
pviewError(ERROR_CODE_001, true);
}
else
{
var stExt:String;
stExt = stName.substring(stName.length-3, stName.length).toLowerCase();
//Check for PYM type.
if (stExt == TYPE_PDF)
{
pdfDisplay.location = stName;
}
//If type not correct, exit with error
else
{
pviewError(ERROR_CODE_002, false);
}
}
}
//If not PDF compatible, user must download Adobe Reader.
else
{
Alert.show(READER_DOWNLOAD_ALERT,READER_ALERT_TITLE);
pdfDisplay.location = GET_READER_URL;
}
}