This.hostContainer is undefined when pdf is in air

Hi,<br />I'm attempting to use the hostContainer object to create a simple interface to allow my Adobe Air application to move between pages of an embedded pdf doc. However the output I get indicates that the  hostContainer object is undefined. The script works correctly when the pdf is embedded in a stand-alone html file, but not in Air.<br /><br />My code in the document javascripts of the pdf is as follows:<br /><br />this.disclosed = true;<br />if(this.external && this.hostContainer){ <br />  try{<br />    this.hostContainer.messageHandler={<br />     myDoc:this,<br />     onDisclose:function(){return true;},<br />     onMessage:function(stringArray){<br />       var cmd=stringArray[0];<br />        try{<br />               if(cmd=="nextPage" && this.myDoc.pageNum<this.myDoc.numPages){<br />                   this.myDoc.pageNum++;<br />               }else if(cmd=="previousPage" && this.myDoc.pageNum>0){<br />                   this.myDoc.pageNum--;<br />               }<br />             }catch(e){<br />               this.hostContainer.postMessage(<br />                   ["error thrown in onMessage:",e.message]);<br />             }<br />         },<br />         onError:function(e){<br />             this.hostContainer.postMessage(["onError: ",e.message]);<br />         }<br />    }<br />  }catch(e){<br />    this.hostContainer.postMessage(["Error thrown in setup:",e.message]);<br />  }<br />}else{<br />    app.alert("unable to set up hostContainer: this.hostContainer="<br />        +this.hostContainer+" this.external="+this.external);<br />}<br /><br />The output is that the pdf displays correctly then the alert box pops up with [...]this.hostContainer=undefined this.external=true.<br /><br />If anyone can shed some light here I would be most grateful.<br /><br />Thanks,<br />Simon Kelly

It seems that this issue was registered one month ago into the bug tracking system:
http://bugs.adobe.com/jira/browse/FB-16281?page=com.atlassian.jira.plugin.system.issuetabp anels:comment-tabpanel
Any update / workaround / planning so far ?
The only solution I found is to use version 8.1.3 of the reader.
Thanks,
Philippe

Similar Messages

  • Acrobat scripting object this.hostContainer is undefined when pdf is in Air

    Hi,
    I'm attempting to use the Adobe Acrobat hostContainer object
    to create a simple interface to allow my Adobe Air application to
    move between pages of an embedded pdf doc. However the output I get
    indicates that the hostContainer object is undefined. The script
    works correctly when the pdf is embedded in a stand-alone html
    file, but not in Air.
    I have Adobe Acrobat 9.0 and Adobe Reader 9.0 installed. It
    does not seem to be an issue with on machines with Adobe 8.0.
    My code in the document javascripts of the pdf is as follows:
    this.disclosed = true;
    if(this.external && this.hostContainer){
    try{
    this.hostContainer.messageHandler={
    myDoc:this,
    onDisclose:function(){return true;},
    onMessage:function(stringArray){
    var cmd=stringArray[0];
    try{
    if(cmd=="nextPage" &&
    this.myDoc.pageNum<this.myDoc.numPages){ this.myDoc.pageNum++;
    }else if(cmd=="previousPage" && this.myDoc.pageNum>0){
    this.myDoc.pageNum--;
    }catch(e){
    this.hostContainer.postMessage(
    ["error thrown in onMessage:",e.message]);
    onError:function(e){
    this.hostContainer.postMessage(["onError: ",e.message]);
    }catch(e){
    this.hostContainer.postMessage(["Error thrown in
    setup:",e.message]);
    }else{
    app.alert("unable to set up hostContainer:
    this.hostContainer="
    +this.hostContainer+" this.external="+this.external);
    The output is that the pdf displays correctly then the alert
    box pops up with [...]this.hostContainer=undefined
    this.external=true.
    If anyone has seen this issue or has any ideas it would be
    much appreciated.
    I've also posted about this problem in the Acrobat Scripting
    forum with no solution as yet.
    Thanks,
    Simon Kelly

    It seems that this issue was registered one month ago into the bug tracking system:
    http://bugs.adobe.com/jira/browse/FB-16281?page=com.atlassian.jira.plugin.system.issuetabp anels:comment-tabpanel
    Any update / workaround / planning so far ?
    The only solution I found is to use version 8.1.3 of the reader.
    Thanks,
    Philippe

  • This.hostContainer problem

    I don't understand why if(this.external && this.hostContainer) returns true when my PDF is embedded in an HTML document, but if I change the file to an HTA (trusted) document, this.external is still true, but this.hostContainer returns undefined.  Since an HTA is just a trusted web page running on IE, why doesn't the hostContainer property work?  Is there a workaround?
    Thanks,
    Scott

    No, it does work inside an HTML document as the undefined evaluates to false.  If I change the HTML page into an HTA page, this.hostContainer has no properties and is undefined when it should not be.

  • When I sign in to Gmail in FF I get this mess -Error undefined If this problem persists, try reloading the page, or using the basic HTML version. Learn More.

    When I sign in to Gmail in FireFox I get this mess -Error undefined If this problem persists, try reloading the page, or using the basic HTML version. Learn More.

    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (MAC)
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • "this is not a valid PDF file" message when creating a new document?

    Every time i try and open a new document I get a message that says this is not a valid PDF file?
    Has anyone else recieved this message?

    Sorry, I am out of ideas. Unless anyone else can help I suggest you need to contact support directly. It’s usually possible to start a live chat, if an Adobe agent is free, and often to get problems fixed right away.
    To get help now click here for product support

  • Everytime I open a window in Firefox 4 beta 2 I get a messeage that says TypeError: Components.classes(cid) is undefined, when I click OK it opens up the new window. How can I fix this?

    Everytime I open a window in Firefox 4 beta 2 I get a messeage that says TypeError: Components.classes(cid) is undefined, when I click OK it opens up the new window.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).<br />
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]<br />
    <br />
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.<br />
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.<br />
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")<br />

  • APEX 4.0 Getting gReport is undefined when pulling IR report from Page2

    The below function used work perfectly in APEX 3.2 for
    Pulling Page2 IR Report into Page1 Region having <div id="XXHOLDER">
    <div>
    but in APEX 4.0, I am getting "gReport is undefined" when I click on IR Toolbar/Control panel like Action or Go
    function periodRep(){
    $.ajax({
    type: "POST",
    url: "wwv_flow.show",
    data: {
    p_flow_id : $v('pFlowId'),
    p_instance : $v('pInstance'),
    p_flow_step_id : "2",
    p_request : ""
    dataType : "html",
    success : function(data){
    var startTag = '<apex2ajax>';
    var endTag = '</apex2ajax>';
    var start = data.indexOf(startTag);
    if (start > 0) {
    data = data.substring(start+startTag.length);
    var end = data.indexOf(endTag);
    data = data.substring(0,end);
    $("div#XXHOLDER").html(data);
    $x_Value('pFlowStepId', "2");
    if($('#apexir_CONTROL_PANEL_COMPLETE').length > 0){
    if(!($('#apexir_CONTROL_PANEL_COMPLETE').css('display') == 'none')){
    gReport = new apex.worksheet.ws('');
    gReport.toggle_controls($x('apexir_CONTROL_PANEL_CONTROL'));
    }); //ajax
    }//periodRep
    Please help
    Thanks
    -Senthil K

    Hi Senthil,
    I think that the reason this no longer works is due to internal changes we made to the Interactive Report JavaScript. These changes affected both how the IRR JS file was added to a page and also how the gReport variable is initialised.
    I would like to give you a few pointers as to what's changed and how you can get this working, but please bear in mind that doing these types of customisations is always going to be risky, due to the fact undocumented HTML that we output is always subject to change in future releases of APEX and cannot be relied upon as remaining the same.
    In 4.0, the IRR JS file is only included on a page where there is an IRR, so you're page 2. And unfortunately, due to the way you crop your response from page 2, this file is not being included in page 1 after the PPR. You therefore either need to change the way you crop the success data, or just include the apex_interactive_reports_4_0.js file on your page 1.
    Also in 4.0, we have also cleaned up a lot of initialisation JS code that we used to emit inline, that is now added at the end of the web document in a jQuery 'ready' handler. 1 such example of this code was the initialisation of the gReport variable in IRRs. This used to be emitted inline and was actually included inside of the snippet you crop within page 2 response. Which was all good. Now though, because this is done at the end of the response, which is outside of what you crop, this is no longer executed. Try adding the following initilialisation at the end of you 'success' callback:
    gReport = new apex.worksheet.ws('');
    gValid = new apex.validation.v();Again, to re-iterate!! Internal and undocumented code such as this is always subject to change and should not be relied upon as remaining the same in future releases of APEX. Only supported APIs and methods should be relied upon as being backwards compatible.
    Anthony.
    Edited by: Anthony Rayner on Jul 26, 2010 5:46 PM

  • I bought a pdf book last year and had no problem reading it for a few months then all of a sudden I could no longer open it and to this day. Any other pdf download off internet I can still open and read, except for that particular book. Operating system i

    I bought a pdf book last year and had no problem reading it for a few months then all of a sudden I could no longer open it and to this day. Any other pdf download off internet I can still open and read, except for that particular book. Operating system is Windows 7 Home Premium, Adobe Reader XI 11.0.07.  When trying to open file I get msg "You did'nt login or your session has expired. Please log in to read this document for the first time". (Like I said I have read it before). So I log in but that prompts me to give the name of the file I want to export or convert to Word or something else, which is not what I want to do of course. I have not purchased any service from Adobe or Acrobat as I only need to read. Thanks for your help..

    Thank you for your reply. Operating system is Windows 7 Home Premium, Adobe Reader XI 11.0.07.  When trying to open file I get msg "You did'nt login or your session has expired. Please log in to read this document for the first time". (Like I said I have read it before). So I log in but that prompts me to give the name of the file I want to export or convert to Word or something else, which is not what I want to do of course. I have not purchased any service from Adobe or Acrobat as I only need to read. Thanks for your help.

  • Printing problem when PDF is sent to the printer with certain fonts - missing text

    I'm running into a printing problem when PDFs containing certain characters of the Calibri font are used.  The text in large sections of the PDF is missing on the paper version, but the text is there on the screen.  It's also happened when the PDFs we created were e-mailed out to a client and printed on their printer.  The problem is not present when printing directly from the programs (Microsoft Word, Excel, Visio, etc.).  I've been trying to get tech support from Adobe on this, but every time I call they apologize and say they will call back in 4-6 hours with an answer.  Same result each time, no call back.  If anyone from Adobe is listening, it's case number 184891587.  The font appears as an embedded subset when I look at the document properties.  Sometimes deleting one or two Characters allows for larger text blocks to be printed - i.e. removing a long dash in bold from the heading of a paragraph makes the paragraph reappear when printed to paper from PDF.  In all cases the PDF appears correct on the screen.  Printing as an image allows the text to appear, but the image quality isn't acceptable for small text, even at the 600 dpi setting on the printer.  If the PDF is sent out by e-mail, we do not have control over the end-user's printer setup anyway, so we need this to work in all cases.  
    The setup/process I'm using is as follows:
    Windows 7 Professional SP1 64-Bit
    Microsoft Office 2013 - problem is present when printing documents from Word, Excel or Visio.  Even other variations on documents. 
    I've tried Acrobat versions 11.0.0 to 11.0.5 as well as Acrobat Pro 11.0.0 and 11.0.1.  Same Result
    Printing to Adobe PDF as the printer, from the third party application
    Printing to a Xerox printer from PDF using Acrobat - Text missing
    Client prints to Konica printer - Text missing
    I print to the wide-format Ricoh (which also does 11x17) and the text is present. 
    Is there something I'm missing?  Is the entire font not getting embedded into the PDF file?  I noticed that rolling back to a much older version of the Calibri font (1.02 compared to 5.72) makes the problem mostly go away, but it's not completely gone.  Is it possible the font is too large to be completely embedded?  Where can I go from here? 

    Success!  At least for now.  It looks like my problem was fixed with Adobe's most recent update, 11.0.06.  From the release notes:
    PDF creation
    Added support for Lotus Notes 9.
    Added support for WebCapture in IE 11.
    Added support for conversions from AutoCAD 2013.
    3652540 A blank pdf is created for files having hidden visual style.
    3601108 Flow Chart converts as a multicolored square.
    3654345 Word documents missing parts of images in conversion to PDF.
    3654572 Temporary file size increases when creating pdf by combining multiple files into one PDF.
    3670155 PDF file created with Distiller XI prints incorrectly to some printers. (Emphasis mine)
    3599407 Checkbox check marks do not appear in these files.
    3663233 IE Web Capture in localized OS: Icons and drop-down menu items are missing and conversion dialog is not localized.
    3651931 Chrome Only: Few web pages when converted to pdf from Chrome plugin doesn’t show up the Save As dialog.
    3597910 EPM Mode On: Web capture is not working on Windows 8-32 bit when cache folder is missing.
    3610644 Firefox 23.0: With Firefox version 23.0 (latest), the WebCapture icon shows up very dim as if it is disabled.
    3650244 ODA falis to convert DWG files to PDF for large files.
    I don't know if that's definately what solved the problem, but it sure sounds similar and this is the update that made the printing problem go away.  We can't get the PDFs to fail at this point with our printers, even with Calibri 5.72.  I'll come back to thread if we have printing problems at the end-user locations. 

  • Dashed Table borders do not render correctly when PDF created from MS word 2013

    I have a defined format for many documents which have all been created in MS word 2007.  Never any problem creating PDFs of  these using ADOBE XI Pro.
    Updated to MS 2013 and now when converting the same doc to PDF all dashed borders around tables render as solid lines. The only time they render correctly is if I PRINT to PDF.  Printing to PDF is not an option as I create batches of many documents at one time, so would be to time consuming.  This was an issue when i considered upgrading 2007 to 2010 a couple of years ago, so caused me to delay upgrade.. upgrade is now required.
    I have a sample of a document if required.
    thanks

    Just as a test, have you tried the MS plugin for PDF creation? I have found with other versions of WORD and Acrobat that PDF Maker and the MS plugin can both fill in dots and dashes on vector graphics (basically what the border is) and yet it comes out correctly with printing to the Adobe PDF printer. Unfortunately I do not have a solution. In my case, it seemed to be related to the vector graphic itself (I could import it to InkScape or other vector graphic tool and save to EMF and it then worked fine. It may be something that MS themselves have messed up in OFFICE 2013. Good luck.

  • Used to be able to print multiple page pdf files on my HP 7310 all in one and then it stopped and would only print the curent page. This is tedious for long PDF docs. I am on 10.6.8 .

    Used to be ablert to print multiple page pdf files on my HP 7310 all in one printer and now I can only print the current page and therefore it takes forever printing them one by one. I am in version 10.6.8. Tried printing as image using the advanced click and that did not work either.  I have Adobe 9.0 reader installed.

    I tried this earlier, and I tried it again today.  Both times it said "Software Missing!"  and "HP Software required to connect to your printer over the network could not be found on this computer."  But when I tried to install the software (AIO_CDB_Net_Full_Win_WW_130_141.exe, which I downloaded from HP's web site), it wouldn't install, as described above.  In the diagnostic utility, I clicked "skip", and it said "Connection Verified!", and "The printer is connected to the network and the services related to the network connections have been verified and reset to a normal operating state.  Everything appears to work fine at this point.  Please doa test print to verify that the issue is resolved or click Skip to move to the next step."  I clickedthe "Test Print" button, and immediately it popped up a box that said "Test Print Failed."
    I tried again to install the HP software, and it installed, detected the printer, and asked me to select it.  I selected the printer, clicked "next", and it did its network diagnostics.  Then it said "Problem(s) found with your network" and "Problem(s) may exist with the network functions of your printer . . ."  I continued the installation without connecting to the printer.  Then I ran your network printer diagnostic tool again, and got the same result - "HP Software required to connect to youir printer over the network could not be found on this computer."

  • "Internal Error Occurred" appears when .pdf is opened from Outlook 2010 email

    "Internal Error Occurred" appears when .pdf is opened from Outlook 2010 email
    I am absolutely pulling out my hair over this one!!
    PC/Win 7 64bit/Adobe XI/Office 2010
    I have tried Uninstalling and re-installing
    I have tried using an adobe software removal tool
    I have tried modifying the security settings in reader
    I've tried running repair on MS Office
    If you open the .pdf from an email directly, it opens Reader with the error "Internal Error Occurred"
    If you drag and drop the .pdf onto the desktop, and then open it, it opens.
    If you open Adobe Reader FIRST, then open the .pdf from the email, it opens fine.
    ONLY when you open a .pdf from an email with Adobe Reader closed (so Outlook is asking AR to open first, and then present the .pdf) is it behaving this way.
    Hypothesis: Outlook 2010 does not like to open Adobe Reader.
    SO....tell me all of you brilliant geniuses? How do I solve this puzzle and become an end user's hero?
    PS: WorkAround - the only work around I have found for this at present, is that the user first opens up Adobe Reader and lets it run in the background. I pinned the shortcut to his task bar to remind him.

    I have uninstalled Adobe Acrobat Reader DC and installed Adobe Reader XI and everything works fine. This will be our current fix until a solution is found for the above error

  • This.hostcontainer not working in chrome

    Hi,
    I am using this.hostcontainer to communicate between an embedded PDF object and the parent HTML page. This works fine in IE9 however I can not seem to get it to work in google chrome. Does anyone have links to samples which work in chrome?
    Thanks

    Chrome and FireFox have their own PDF reader and it does not always work like Adobe Reader and Internet Explorer do.
    You might want to try a Chrome forum.

  • Clear fields when PDF page is spawned?

    Hi all,
    I have a fillable PDF  form that has buttons at the top of every page for the user to  duplicate the page in case more information needs to be entered.  Here  is the javascript I'm using, courtesy of George Johnson:
    // Get a template object from an existing template
    var t = getTemplate("myTemplate");
    // Spawn the template on the page following this one, and rename the fields
    t.spawn({nPage: pageNum + 1, bRename: true, bOverlay: false});
    This  works great, except when the user has already filled out page 1, then  clicks the button to duplicate the page, the new page contains the  information already filled in by the user on page 1.  Is there a way to  clear the fields when the page is duplicated? I am using Adobe X Pro.   Thank you!!!

    Update: I found this code:
    var iPage = 0; // This is your page number, it is 0-based, so page 1 is 0
    var sFields = new Array();// array of fields names that are found
    for(var x=0;x<numFields;x++)
    {var pg = getField(getNthFieldName(x)).page;if((typeof pg == 'number' && pg == iPage) || (typeof pg != 'number' && pg.indexOf(iPage) > -1))sFields[sFields.length] = getNthFieldName(x);}
    if(sFields.length > 0)resetForm(sFields);
    This code does work, but instead of blanking out the NEW page, it blanks out the original one. Preferably, the original page would retain the information and the new form would be cleared.  I changed var iPage = 0 to var iPage = pageNum +1 and that seems to blank out the spawned page.  Even when I press the button on the spawned page, the second spawned page is cleared.
    I know very little about javascript so if anyone sees any problems with this code or the change I made, I'd appreciate if you give me a shout.  Otherwise I guess I resolved this on my own. Thanks!

  • Text moved when pdf is optimized

    I am having a problem with text moving so that some letters overlap and others are spaced far apart when I optimize a pdf using Acrobat XI Pro on a Macbook Pro. The text is Times New Roman font.  What can I do to fix this?

    Hey Susan,
    Could you please let me know if you are running the latest patch of Acrobat XI i.e. 11.0.10
    Does this happen with any particular PDF that you try to optimize?
    Try using any other font in the PDF and then check.
    Let me know.
    Regards,
    Anubha

Maybe you are looking for

  • Opening-Closing Inventory problem

    I have written following calc script "Opening Balance" IF (@ISMBR(Jan)) "Opening Inventory" = Jan; ELSE "Opening Inventory" = @PRIOR("Ending Balance"); ENDIF; Also my Ending balance= Opening Balance+Adjustments-Sales; which i have defined as member f

  • Payment Proposal Error

    Hi, When we execute the payment run F110, after parameter entered the following msg shown Parameters have been entered Proposal has been released xx.12.09 00:09:04 The normal process should be Parameters have been entered Payment proposal has been cr

  • Kazak VAT declaration

    In Kazakistan, there is the fiscal requirement to show VAT amounts in the VAT declaration based on document date and not on posting date.  Moreover, also parked documents not yet posted have to be included in the declaration.  Obviously on the next m

  • Need User Documentation for Oracle Calendar 9.04

    I Need User Documentation for Oracle Calendar 9.04 (which replaced Steltor Corporate Time product). I've searched all over this site and can only find server administration documentation. I see lots of requests from other users for this documentation

  • Possible fix for OS X 10.5.7,  losing connection after sleep, restart

    Possible fix for OS X 10.5.7, Airport, losing connection after sleep, restart, or cold reboot. Issue: (For OS X 10.5.7 on iMac5,1, Intel Core 2 Duo) ============================================= - After sleep, restart, cold reboot, even though cannot