AS2 with AIR 1.5, code to open a local PDF view

Does anyone know how to do this. I want to make a simple button that will open a PDF for users to print a file. A button to directly print would be even better.
Kyle

Hakan KIRIK wrote: "Have you tried Windows Projector (from publish settings) ?"
Sweeeeet! That works great Hakan, we can certainly use the Flash Projector.
One more solution I just came up with through googler(in case anyone is interested)
-  Create a .bat file and call it from  fscommand:
In Flash:
function openPdf(event:MouseEvent):void{
fscommand("exec", "openPdf.bat");
In your fscommand folder:
Create a .bat file called openPdf.bat with the following contents:
@echo off
file.pdf
exit
For this solution to work, name your pdf 'file.pdf', or change the name in the bat file and place the pdf in your fscommand folder as well.
However, it's alot more work than just calling the navigateToURL funtion, but if you don't want to use a web browser to display your pdf, then the bat file method will work.
Thanks for the solution Hakan, much appreciation,
~Chipleh

Similar Messages

  • Firefox downloads PDF with wrong extension instead of opening a websites' PDF viewer

    I have a problem with websites that want to provide their own PDF viewer. Instead of launching their viewer, Firefox wants to download the PDF. I'd be perfectly fine with that ***if it downloaded with the correct .pdf extension so that Preview would actually open the PDF***. But that's not what happens; I end up with something like "RetrieveDocument.aspx" or "Retrieve.srv".
    I've tried resetting my download options (http://kb.mozillazine.org/File_types_and_download_actions). Didn't help.
    I saw some stuff about other plugins I can install. Here's the thing: *this stuff works fine in Chrome and Safari*. Maybe websites aren't tagging their content correctly or something, but this stuff works fine in two other browsers.

    Hello,
    In order to change the default reader for PDF files (to not open PDF files with Firefox's internal PDF reader), follow these steps:
    #Go to ''Tools'' > ''Options'' (or ''Firefox'' > ''Options'').
    #In the Options window, select the ''Applications'' tab.
    #In the ''Search'' field, type ''PDF''. You should find ''Portable Document Format (PDF)''.
    #On the right handside you should find an ''Action'' column. Use that to select your favorite PDF reader. In order to view PDF files in Firefox, choose ''Preview in Firefox''.
    Did this fix your problems? Please report back to us!
    Thank you.

  • Need javascript/VB code to open password protected PDF file by passing password in code itself.

    Hi,
    I have used PDFcreator to create the PDF file with password security
    'To create PDF file with password security
    With PDFCreator1
    .cOption("UseAutosave") = 1
    .cOption("UseAutosaveDirectory") = 1
    ' ==============
    .cOption("AutosaveDirectory") = strBackupPath '& "\" & Format(Trim(Sheets("Form16_Database").Range("A" &
    I).Value), "0#####") & "\" 'ActiveWorkbook.Path
    Debug.Print Trim(Sheets("Form16_Database").Range("A" & I).Value) & "Form16-" & Format(Trim(Sheets
    ("Form16_Database").Range("A" & I).Value), "0#####") & "-" & Format(Now(), "YYYYMMDDHHMMSS") & ".PDF"
    .cOption("AutosaveFilename") = Format(Trim(Sheets("Form16_Database").Range("B" & I).Value), "0#####") & ".PDF"
    FileName = Format(Trim(Sheets("Form16_Database").Range("B" & I).Value), "0#####") & ".PDF"
    .cOption("AutosaveFormat") = 0
    .cOptions.PDFUseSecurity = 1
    .cOption("PDFOwnerPass") = 1
    .cOption("PDFOwnerPasswordString") = "mypass"
    .cOption("PDFUserPass") = 1
    .cOption("PDFUserPasswordString") = "mypass"
    .cClearCache
    End With
    'Printing to PDF Creator
    ActiveSheet.PrintOut Copies:=1, ActivePrinter:="PDFCreator"
    'Making the system wait for the PDF creator to create the file
    Do Until PDFCreator1.cCountOfPrintjobs = 1
    DoEvents
    Sleep 1000
    Loop
    PDFCreator1.cPrinterStop = False
    Sleep 1000
    ''and To fix digital signature used below code from Acrobat SDK 8.1..
    ''VB code for fixing Digital Signature --calling jaascript file from SDK.
    Sub GetDigitalSignature(PDFFilepath As String, PDFFileName As String, PFXfile As String, Password As String, Top As Double,
    Left As Integer)
    Dim gapp As Acrobat.AcroApp
    Dim gpddoc As Acrobat.AcroPDDoc
    Dim jso As Object
    Dim FullPath As String
    Dim avDoc As CAcroAVDoc
    Dim boK As Boolean
    Dim ppklite As Object
    Set avDoc = CreateObject("AcroExch.AVDoc")
    Set gapp = CreateObject("acroexch.app")
    Set gpddoc = CreateObject("acroexch.pddoc")
    boK = avDoc.Open(PDFFilepath, PDFFileName)
    gpddoc.Open (PDFFilepath)
    Set jso = gpddoc.GetJSObject()
    jso.SetUserPassword (Password)
    jso.SetUserDigitalIDPath (PFXfile)
    jso.SetSignTop (Top)
    jso.SetSignLeft (Left)
    jso.app.execMenuItem ("ADBESDK:AddSignature")
    avDoc.Close (True)
    gapp.Exit
    End Sub
    Now i am able to create PDF with Digital signature. But We want to assign password protection too..and problem is once we fix Digital signature we can't change security.
    My problem is to pass password at the time of opening PDF for embedding signature. Password window should not prompt to the user while running VBA application.
    Can you please help me to pass password on fly when file prompt password while opening PDF file. As file need to be opened at the time of fixing signature using sdk javascript code.

    Correct, you need to encrypt then sign.
    Unfortunately, there is no way to pass a password for opening.

  • When editing a photo with external editor I can't open that photo in viewer

    When I edit a photo in an external program like NIK Collection after I save the photo I can't open any pictures anymore in Aperture. Mosaic and grid view is no problem but in full Viewer nothing happens. When I restart Aperture I can, untill the next edit.....

    Re: Nik collection crashes Aperture
               Re: Aperture 3.5 Grey screen                                            
                                  Nik Plug-in Grey Screen on Death Workaround                                            
    Re: Aperture viewer image does not display "regularly"

  • Use navigateToURL to open a local pdf...

    I have a problem with the following code. I have been searching since yesterday for solutions to open pdfs in a browser window from within flash. I've found various forum posts about using navigateToURL and it looks like people have success. It seems very simple to do, but everytime I try to open the pdf file, i get a 404 error in the browser, which is going to this link:
    http://file.pdf (which obviously does not exist)
    My pdf file is sitting inside the same folder as the swf that's trying to launch it. Is there a way to use navigateToURL and specify that the file is local? Else, is there another way to open a pdf file from within a folder? Or am I just an idiot and am missing something very obvious?
    Thanks for any help,
    Chipleh
    Code:
    myBtn.addEventListener(MouseEvent.MOUSE_DOWN, openPDF);
    function openPDF(event:MouseEvent):void{
    var url:String = "file.pdf";
    var myRequest:URLRequest = new URLRequest(url);
    try {
      navigateToURL(myRequest, '_blank');
    catch (e:Error) {
      trace("Error occurred!");

    Hakan KIRIK wrote: "Have you tried Windows Projector (from publish settings) ?"
    Sweeeeet! That works great Hakan, we can certainly use the Flash Projector.
    One more solution I just came up with through googler(in case anyone is interested)
    -  Create a .bat file and call it from  fscommand:
    In Flash:
    function openPdf(event:MouseEvent):void{
    fscommand("exec", "openPdf.bat");
    In your fscommand folder:
    Create a .bat file called openPdf.bat with the following contents:
    @echo off
    file.pdf
    exit
    For this solution to work, name your pdf 'file.pdf', or change the name in the bat file and place the pdf in your fscommand folder as well.
    However, it's alot more work than just calling the navigateToURL funtion, but if you don't want to use a web browser to display your pdf, then the bat file method will work.
    Thanks for the solution Hakan, much appreciation,
    ~Chipleh

  • IOS: navigateToUrl and openWithDefaultApplication to open a local pdf file

    I tried using navigateToUrl and openWithDefaultApplication methods to open a pdf file on iOS platform.
    Nothing...
    I tried also copying the pdf file to the app storage directory...nothing...
    All goes well on the Mac air app.
    Any suggestion?
    Thanks
    Angelo

    Maybe try using a native extension solution like:
    https://github.com/katopz/ane-device-file-util

  • Open local PDF inside Air iOS app

    I am developing an AIR for iOS app for the iPad. My client would like the app to open a local PDF file within the app, rather than launching an external app (such as Adobe Reader). This is to give a seamless experience when using the app. I've seen that distriqt.com produce the 'PDF Reader' Native Extension based on www.vfr.org. VFR appears to have a series of interface controls that open along with the PDF, which I don't require. I emailed Distriqt a week ago to clarify, and have had no response.
    Does anyone know of any other solutions to open a PDF inside an AIR iOS app?

    I've managed to load a PDF successfully inside my AIR iOS app, using the code from http://thatsthaway.wordpress.com/201...1/#comment-102.
    However, I've just come across a weird feature / bug when viewing a PDF using stagewebview. I have a PDF that contains several internal hyperlinks, each navigating to a page within the same PDF document. If I select any of the hyperlinks, they do jump to the intended pages. However, if I reselect the same hyperlink again, it no longer works. If I select a different hyperlink, and then reselect a previous link, it will then work, but if I select the same hyperlink twice in a row, without selecting a different hyperlink in between, the link fails to work. The PDF hyperlinks all work ok outside of my app, on both Windows desktop and an iPad, just not inside of the AIR app.
    Any ideas?

  • A checked checkbox is rendered as unchecked in default pdf viewer of firefox. It is checked when the pdf is opened with adobe.

    I am using DynamicPDF to render a PDF. There are multiple check boxes which are checked. When the PDF is opened in Firefox, none of the check boxes are checked. However, when I save the PDF and open with Adobe, check boxes are checked. There might be a problem with the Firefox built in PDF viewer as the built in PDF viewer for other browsers work fine.

    Current Firefox versions have enabled a built-in PDF Viewer that doesn't have all features that other PDF readers like the Adobe Reader have or may not function properly otherwise.
    You can change the action for Portable Document Format (PDF) from Preview in Firefox to use another application like the Adobe Reader or set to Always Ask in "Firefox > Options/Preferences > Applications".
    You can set the pdfjs.disabled pref to true on the <b>about:config</b> page to disable the build-in PDF viewer.
    You can check the value of the plugin.disable_full_page_plugin_for_types pref on the about:config page and remove the application/pdf part if present or reset the pref to the default via the right-click context menu if you want to display PDF documents in Firefox with another application (i.e. not the built-in PDF Viewer).
    See also:
    *https://support.mozilla.org/kb/view-pdf-files-firefox-without-downloading-them

  • My iPad conveys that it is disable, and that I need to connect to iTunes.  When I connect to iTunes I get a message that I need to enter my pass code and open my Ipad, but I don't get the number board to open with a password.  How do I fix this?

    My iPad conveys that it is disabled, and that I need to connect to iTunes.  When I connect to iTunes I get a message that I need to enter my pass code and open my Ipad, but I don't get the scree with the number board to open with a password.  How do I fix this?

    You will need to restore it. The sidebar of your iPad appears on itunes even if you dont enter the passcode. There's the option to restore it. More info:
    iTunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software

  • My iPad conveys that it is disabled, and that I need to connect to iTunes.  When I connect to iTunes I get a message that I need to enter my pass code and open my Ipad, but I don't get the screen to open with a password.  How do I fix this?

    My iPad conveys that it is disabled, and that I need to connect to iTunes.  When I connect to iTunes I get a message that I need to enter my pass code and open my Ipad, but I don't get the screen to open with a password.  How do I fix this?

    You will need to restore it. It may not sync, but the iPad's sidebar has to appear you can restore it and it will be as the last time ou synced it to iTunes. For more info:
    iTunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software

  • Possible Solution: Allow native code packaging with AIR using ADT?

    Packager / ADT are providing huge benefits for AS3 developers targetting mobile as we all know.  We also know that we'd like as much access to the native libs for the various platforms as we can possibly get.  Two cases in point, in-app purchasing and access to Apple's iAd network.  Discussions about these requirements over the last few days with a colleague of mine have resulted in him coming up with a very strong idea for providing adhoc access to native libraries.  He has posted his suggestion, (which involves a feature request to Adobe), on Adobe AIR Ideas at Labs.  I really encourage as many people as possible to read his suggestion to get the discussion warmed up.  If you think the proposal is worthy, please make sure you vote it up so that it registers on Adobe's radar.  I believe this would really benefit all of us working with AIR for mobile. Here is the link.
    Peter Robertson

    manicjames wrote:
    I have packaged my AIR app into a Native .exe installer using ADT. If the user does not have air installed and they are connected to the internet, the AIR runtime is automatically installed.
    Is it possible to package the AIR runtime into the exe so that if the user is not online the AIR runtime is installed?
    I have experimented with the sidecar install and .air file but ideally I want to only have the one file(.exe). I already have a distribution licence from Adobe.
    This isn't available at this time, but I think it's a great idea.  You might want to add a feature request for this over at ideas.adobe.com and bugbase.adobe.com, or review and vote for these current feature requests if they provide for what you're looking for:
    Portable AIR Apps
    Create portable AIR apps
    If you decide to add a new request, please post back with the URL so others can cast their votes and add comments.
    Chris

  • FileStream problem with AIR deployment

    I use FileStream to load local XML file. When I test the desktop application directly from Flex everything is ok but when I install it with AIR, the application work but the file is not loaded. Here is the code I use:
    import flash.filesystem.*;
     var applicationDirectoryPath:File = File.applicationDirectory; 
    var nativePathToApplicationDirectory:String = applicationDirectoryPath.nativePath.toString(); 
    nativePathToApplicationDirectory +=
    "/config_poste_temps.xml"; 
    var file:File = new File(nativePathToApplicationDirectory); 
    var fs:FileStream = new FileStream(); 
    fs.open(file, FileMode.READ);
    var config:XML = XML(fs.readUTFBytes(fs.bytesAvailable)); 
    fs.close();
    plan.text = config.division;
    Regards

    I am having the same problem as simon_lucas although my config is slightly different:
    FlashBuilder 4 with SDK 4.6, Current app is with SDK 2.5.
    Trying to update with SDK 3.2, I double-checked per Horia Olaru that I do use the application updater swc:
             <path-element>D:\Program Files\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0 - Air 3.2\frameworks\libs\air\applicationupdater.swc</path-element>
             <path-element>D:\Program Files\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0 - Air 3.2\frameworks\libs\air\applicationupdater_ui.swc</path-element>
    But I still have the 16815 error.
    If I change the update.xml to be <update xmlns="http://ns.adobe.com/air/framework/update/description/2.5">
    instead of <update xmlns="http://ns.adobe.com/air/framework/update/description/3.2">, I am proposed to download the new app and then I get an error 16824.
    Please HELP!

  • Apple needs more information to complete your iMessage registration. Please call AppleCare in your country (listed below) and provide them with the following validation code:

    When I try to open imessage on my Macbook Pro I get the message "Apple needs more information to complete your iMessage registration. Please call AppleCare in your country (listed below) and provide them with the following validation code:"  Then it makes me call a number for AppleCare whish then makes me buy a $19 incident care. 
    I message has worked on this machine and works on my macbook air.  What is happening?
    Charles

    Hi,
    Apple Care Level one responders are very Script Led.
    This means they try to fit what you are saying into a Software or Hardware issue and into a Apple Care Period or  not.
    If you are having problems convincing them it is an Account/Apple ID problem (even though it only effects the Mac's use of it in iMessages) ask to speak to a Level 2 person who should be more knowledgeable because fixing and Id issue is free and not subject to Apple Care.
    9:00 pm      Monday; December 15, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Transaction code for Open sales order other than VA05

    Hi all,
    Can any one tell me what is transaction code for open sales order other than VA05.
    Please help me .
    Thanks & Regards ,
    Srikanth P.

    Hi Srikanth,
    You can try below options.
    1- VA05N - This can be run for multiple sold to party & multiple material, etc which was not in VA05. But this doesn't have all columns in VA05 report.
    2 - You can check the sales order tables from transaction SE11 or SE16N
    Try with below tables for your requirement.
    Sales order Header data - VBAK
    Sales order Item data - VBAP
    Schedule Line Data - VBEP
    Business data - VBKD
    Status header - VBUK
    Status items - VBUP
    Best regards,
    Anupa

  • Excel fails with unexpected error unless vba editor opened before running

    i have an excel macro which fails with an unexpected error unless i open vba editor first
    EXACT MESSAGE IS
    "MICROSOFT EXCEL HAS ENCOUNTERED A PROBLEM AND NEEDS TO CLOSE, WE ARE SORRY FOR THE INCONVENIENCE"
    I HAVE SENT AN ERROR REPORT many times, no response
    this prevents running as auto_open
    why?
    what initialization takes place by opening vba editor that does not take place with out doing so?

    As this is unusual behavior (not seen by most of us Excel users), and you indicate that it happens on multiple PCs (so it isn't something corrupt on just one machine), it seems likely that it is something specific to the code you are trying to run.
    It might be helpful if you post your code, and specifically where you are placing the code (personal.xlsb, a regular module, a class module, behind a specific worksheet, or behind the "this workbook" object).
    Also, how are you triggering the macro- are you running it from the macro dialogue box, a custom worksheet button, a userform, or something else?

Maybe you are looking for

  • The iPod "--" cannot be updated.  The required file cannot be found.

    What does this mean? Would this explain why my photos are not being transferred to my iPod? I had to restore original settings on my iPod and then gave it a new name ("gb") Is this why I keep getting this message? If so, how do I go about fixing it?

  • Is there a way to block the pop up window for Spotlight in Yosemite?

    I want to keep the search in the corner of the screen and out of my way when I'm watching a video/multitasking. It is getting in the way of a lot of my work. I can't even move the window from the center of the screen. If not then spotlight is now jus

  • The filling of form fields is not supported

    I created a fillable pdf with the 30 day trial and am trying to load onto our Wordpress website. I am receiving this message when I attempt to open the file and test, "This pdf contains fields. The filling of form fields is not supported." Help.

  • Playing movies in Front Row one after another automatically?

    I have a number of short video clips that I can watch with Front Row. However, every time a clip ends, I have to go and click "play" on the next clip and this is annoying. I am wondering if there is a way to make movies play one after another without

  • Customer and Company Codes

    Hi,     I have a requirement where i need to have Customers along with the company code the customer belongs to. As far as 0customer and 0customer_Sales are concerned i cannot see any attributes of compnay codes in these infoobjects. Any suggestion h