C# - Acrobat 9.4.5 - PrintPages not responsive

I've been stuck on an issue for a month or so, and running out of ideas. I'm trying to use the Acrobat API's "PrintPages" method to print a PDF document. I'm able to load the PDFs in my WinForm just fine, populate their fields, etc. But whenever I invoke PrintPages, PrintPagesSilent, etc, the return value is "true", so everything seems fine, but nothing prints. I've tested with both local and network printers.
The PDF document I'm attempting to print is a single page document.
(I've tested printing with Reader and that works, but my application needs the ability to print multiple documents, and there are issues with using an AxAcroPDFLib.AxAcroPDF object and trying to close a file that was opened with LoadFile and opening a new file.)
CAcroAVDoc avDocCopyV = new AcroAVDocClass();
bool openResult = avDocCopyV.Open(pdfManagerService.CopyVFileName, ""); // the filename that is being passed has been verified to be correct through debugging
bool printPagesResult = avDocCopyV.PrintPages(0, 1, 3, 0, 0);
I've also tried using these combinations of parameters:
bool printPagesResult = avDocCopyV.PrintPages(0, 1, 2, 0, 0);
bool printPagesResult = avDocCopyV.PrintPages(0, 1, 3, 1, 0);
bool printPagesResult = avDocCopyV.PrintPages(0, 1, 2, 1, 0);
I've also tried calling 'GetNumPages' from the PDDoc object and using that as the second "PrintPages" parameter.
This was not working in Acrobat 7.0 that I had installed before. Our company had upgraded to Acrobat 9.0, so I installed that and even patched it to 9.4.5, but nothing is printing when I use "PrintPages".

I forgot to reply back, yes this did help me! I did not realize that I could go this route, and I may have overcomplicated it a bit, but in the end, it is now working!
(Note: calling methods from the JS object didn't work for me so I had to use reflection.)
Below is the code that I ended up using which worked for me, but posting it for those who may come across this and have similar issues. In summary, the JSON solution worked much better than using PrintPages (which I was originally attempting to use).
               object jsObj = null;
                CAcroAVDoc avDocCopyV = new AcroAVDocClass();
                avDocCopyV.Open(pdfFilename, "");
                Acrobat.CAcroPDDoc pdDoc = (Acrobat.CAcroPDDoc)avDocCopyV.GetPDDoc();
                jsObj = pdDoc.GetJSObject();
                invokeJSObjectPrint(jsObj);
                avDocCopyV.Close(0);
And the 'invokeJSObjectPrint' method is below. It is a bit long, but what it does is 1) obtain the default printer params, 2) obtain the 'constants.interactionLevel.silent' constant value, and assign that value to the printer params' 'interactive' property, 3) assign the name of the printer to the 'interactive.printerName' property, and finally 4) print the PDF to the printer.
        private void invokeJSObjectPrint(object jsObj)
            object printParamsObj = null;
            object[] singleParam = new object[1];
            Type T = jsObj.GetType();
            printParamsObj = T.InvokeMember("getPrintParams", System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public |
                System.Reflection.BindingFlags.Instance, null, jsObj, null);
            Type printParamType = printParamsObj.GetType();
            // get property values
            object constantsProp = printParamType.InvokeMember("constants", System.Reflection.BindingFlags.GetProperty | System.Reflection.BindingFlags.Public |
                System.Reflection.BindingFlags.Instance, null, printParamsObj, null);
            object interactionLevelProp = constantsProp.GetType().InvokeMember("interactionLevel", System.Reflection.BindingFlags.GetProperty | System.Reflection.BindingFlags.Public |
                System.Reflection.BindingFlags.Instance, null, constantsProp, null);
            object silentProp = interactionLevelProp.GetType().InvokeMember("silent", System.Reflection.BindingFlags.GetProperty | System.Reflection.BindingFlags.Public |
                System.Reflection.BindingFlags.Instance, null, interactionLevelProp, null);
            // set property values
            singleParam[0] = silentProp;
            printParamType.InvokeMember("interactive", BindingFlags.SetProperty |
                BindingFlags.Public | BindingFlags.Instance, null, printParamsObj, singleParam);
            singleParam[0] = this.storedPrinterSettings.PrinterName;
            printParamType.InvokeMember("printerName", BindingFlags.SetProperty |
                BindingFlags.Public | BindingFlags.Instance, null, printParamsObj, singleParam);
            object[] printParamsObjArray = { printParamsObj };
            // invoke print with the updated printer settings
            if (printParamsObj != null)
                T.InvokeMember("print", System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public |
                    System.Reflection.BindingFlags.Instance, null, jsObj, printParamsObjArray);
Thanks again for pointing me in the right direction.

Similar Messages

  • Pdf form created in Acrobat 9 Pro Extended does not function properly when viewed by Reader

    Hello all-
    I have created a form in Acrobat 9 Pro Extended and have an issue because when others view the form in Adobe Reader some of the functions do not work- such as the attach a file button I created, or the save, print buttons (all are execute a menu item). These work on my Acrobat 9 Pro Extended but not on Reader.
    I have tried saving many different versions- with security (password) and made sure to allow printing and commenting, editing, digital signatures etc...
    Without any security...
    Even tried extending features in Adobe Reader!
    The response from others is that it all works, except the ATTACH A FILE button- when they click on it it compresses, but, nothing happens!
    I don't know what else to do! (I guess people could just attach things to the e-mail that is generated from the submit button, but worried people might forget at that step once they are past that section on the form and they jump to email to submit).
    Help please!
    A.

    I've already extended the rights and made sure to save to activate that... as well as password protected the docs etc... still nothing...
    I am aware that those with Basic Adobe Reader need rights extended to be able to use functions available to Adobe Pro.

  • I have acrobat standard and it will not allow me to edit.. every file i go to open it says "there is a active file open and must close in acrobat" other times it says account cannot be validated after I have already paid for it.. please advise

    i have acrobat standard and it will not allow me to edit.. every file i go to open it says "there is a active file open and must close in acrobat" other times it says account cannot be validated after I have already paid for it.. please advise

    Hi Timothy,
    The account cannot be validated error was due to a glitch on our activation server that has been fixed now.
    Please try using acrobat now and check if you are still facing the problem.
    Regards,
    Rave

  • When I open a pdf in Adobe Acrobat xi pro it is not displaying correctly. If a file is all black with orange writing, I will see only the orange writing. Its not until i print it or open crop pages dialog box that i see the background. i am on a Windows 7

    When I open a pdf in Adobe Acrobat xi pro it is not displaying correctly. If a file is all black with orange writing, I will see only the orange writing. Its not until i print it or open crop pages dialog box that i see the background.
    i am on a Windows 7 professional PC, 64-bit.

    If anyone is reading this still looking for what caused the issue and how to fix it here is what I discovered.
    The antivirus program our company uses, Bitdefender Antivirus Plus, was causing some of the PDF files not to open. After troubleshooting the different modules and settings the culprit was..
    Scan SSL in Privacy Control Settings. Turning it OFF solved the problem and all the PDF files that previously would not open now open just fine. This issue has been sent to Bitdefender for them to review. If you use a different antivirus program and are having this issue try locating the Scan SSL setting and see if turning it off solves the problem.

  • Adobe Acrobat Pro 10.1.10 not updating - using MAC OS X, v 10.9.5. Help!

    Adobe Acrobat Pro 10.1.10 not updating. Trying to update to version 10.1.13. on MAC OS X, v 10.9.5. All my Adobe CS5.5 Design Premium products update fine.
    First tried automatic updates and go this: Update error:  An error occurred. Please check for updates again later. Error: 1514.
    Then went to Adobe.com to download update.
    Downloaded the 10.1.13 update, started installation but in final stage of installation got this message "The Installation Failed (encountered an error) Contact software manufacturer for assistance.”
    What do I do now? Thanks,

    Hey Marylou Wade,
    We would need the Acrobat installation logs in order to analyze this error. Please follow the below procedure to extract the log :
    - During the installation press Command + L.
    - Installer Log window appears. Now On the top left corner of this window, by default 'Show Errors Only' is selected in drop-down list.
    - Change it to 'Show All Logs'. Now when the installer hangs, copy log from here and send it to us.
    Regards,
    Rahul Tyagi

  • Adobe Acrobat 8.2.4 will not uninstall without cashing windows uninstaller

    I have a Dell 8100 with Windows 7 home 64 bit.  I found Acrobat 8.2.4 would not open.  I attempted to uninstall.  It get 95% through removing files and such and crashs.  It displays ERROR 1316 Network error occurred while attempting to read from file. \windows\installer\acrostan.msi.
    If you put the original Acobat 8.0 installation disc and attempt to do an uninstall again it completes about 95% of the uninstall before I receive the following Error 1935  An error occurred during the installation of assembly 'policy. 8.0.microsoft.vc80.version='8.0.52727.163", type=vin32-policy", publickeytoken="1frc8b3b9a1e18e3b", Processorarchitecture="x86". 
    This error was caused by an Adobe Acrobat Update. Could we please get some assistance in uninstalling this program.  Is is not asking much to have you support you own software.
    I do not think this request is unreasonable nor does anyone of the thousands of other with this same problem.
    Thank you

    Acrobat 8.x was never compatible with Windows 7. It should not have been installed. You may try the following:
    http://kb2.adobe.com/cps/333/333227.html
    or
    http://kb2.adobe.com/cps/400/kb400658.html
    But as the article mentions if it fails you will need to speak with a Level 3 support tech. None of these articles address Windows 7 explicitly, since it should never have been installed.

  • Error 1923: Adobe Acrobat Update Service (AdobeARMService) could not be installed

    When I try to update my copy of Adobe Reader, I get
    Error 1923: Adobe Acrobat Update Service (AdobeARMService) could not be installed.
    Verify that you have sufficient privileges to install system services.
    This occurs even when I run the install program with "Run as Administrator".
    And it occurs for release 11 and the older release 10.
    How do I get around this problem?

    Hi,
    Please check the following thread for solution: http://forums.adobe.com/message/4789492
    Thanks

  • My licensed copy of Adobe Acrobat Pro 9.0 will not load

    My licensed copy of Adobe Acrobat Pro 9.0 will not load - the disk just isn't recognized by our drives any longer. How do I get a replacement disk?  BTW - Adobe support seems to be the worst I've ever experienced from any single company. I am getting no where! It took me forever to find this forum and I am not expecting any results.  Is there a competitor for Adobe Acrobat 9.0?  I need to convert documents to PDF, combine pages, etc.... We are paperless and need these functions.

    Try post 8 in http://forums.adobe.com/thread/1061905.

  • Acrobat 7.0 pro will not reinstall

    I have CS2 Premium on XP. Had problems with printer not supporting pdfs. After techs fixed my computer Acrobat 7.0 pro will not work right. after 3 weeks with customer support and waiting days for them to get back to me they say they can't help - don't support CS2 (wished they would told me that initially). (I use this for volunteer newsletters and do not need CS4) I uninstalled CS2 and Reinstalled it. Probablem is when the components come up to install the Acrobat 7.0 pro is greyed out and will not reinstall or unistall it. Tried to go to the Acrobat componet on my disks and just install acrobat 7.0 pro is doesn't work - error says "Wrong OS or OS version for application".
    Obviously it is still recognizing the initial installation. I mention this to the Adobe tech and ask how I could remove it completely so that I could reinstall and they would not give any suggestion, just kept saying we don't support it and refered me to the forums.
    I really don't want to wipe my computer clean and reinstall all my software.
    Any help would be appreciated.
    Sondra

    pnewk wrote:
    will not let me complete
    You need to supply more details; what exactly happens when you try?

  • Link works in Acrobat Std 8.0, Acrobat Reader 8.2, but not in Reader 9.0

    Hi. I also posted this in the Acrobat site:.  Perhaps this might be a more appropriate location?
    Hello.
    I faced a really strange thing today.  I created a report PDF through Xcelsius.  In this PDF, I have a Flash button which, when clicked, would link to an Excel (.xls) file within our LAN.  The link works within Acrobat Standard 8.0 but not within Acrobat Reader 9.0.  I have examined the preferences on both and they are identical (as far as I can see).
    Details:
    Software used:  Xcelsius 2008 SP1
                           Acrobat Standard 8.0.0
                           Acrobat Reader 9.0
                           Acrobat Reader 8.2 (later)
    Link address:   file://G:\Management\[sub-directory]\[sub-sub-directory]\[filename].xls
    Any help at all will be welcomed and appreciated.
    Thank you!
    --- Update ---
    I later uninstalled Reader 9.0 and reinstalled Reader 8.2 and the link worked in Reader 8.2.  The link is a direct address and not a script.  The file is opened in IE 7 as a spreadsheet with Macros attached.  It is important for me that it works in both versions of Reader as there are several versions of Acrobat Reader deployed among our hospital -- Reader 7, 8, and 9.
    Can someone help shed some light on this, please?

    I think this is related to this other problem: http://forums.adobe.com/thread/567165?tstart=-1  .  This has appeared with current releases of Acrobat, Acrobat Pro and Acrobat Reader.  Adobe seems unresponsive.  We started seeing it this week in conjunction with Excelsius 4.5.  I have both Acrobat Pro 9.3 and Acrobat Reader 8 on my PC.  Pro blows up when I open the .pdf created by Excelsius, but Reader does fine.

  • Adobe Acrobat Pro XI download will not install; stalls at preparing files for extraction

    Adobe Acrobat Pro XI download will not install; stalls at preparing files for extraction

    what os?
    what file(s) (name/extension) have your downloaded and is their file size?

  • CS2 acrobat 7,0 professional will not install

    I have CS2 Premium on XP. Had problems with printer not supporting pdfs. After techs fixed my computer Acrobat 7.0 pro will not work right. after 3 weeks with customer support and waiting days for them to get back to me they say they can't help - don't support CS2 (wished they would told me that initially). (I use this for volunteer newsletters and do not need CS4) I un installed CS2 and Re installed it. Problem is when the components come up to install the Acrobat 7.0 pro is grayed out and will not re install or un install it. Tried to go to the Acrobat component on my disks and just install acrobat 7.0 pro is doesn't work - error says "Wrong OS or OS version for application".
    Obviously it is still recognizing the initial installation. I mention this to the Adobe tech and ask how I could remove it completely so that I could re install and they would not give any suggestion, just kept saying we don't support it and referred me to the forums.
    I really don't want to wipe my computer clean and re install all my software.
    Any help would be appreciated.
    Sondra

    You can try running the CS3 cleanup Script: http://www.adobe.com/support/contact/cs3clean.html
    I'm not certain, but I think it removes earlier versions as well. Search this forum for more guidance on usage. There are undocumented settings you may need.
    The Microsoft installer cleanup script, which is run in conjunction with the Adobe script, may actually be enough in this case, though, so perhaps better to start with that.
    http://support.microsoft.com/kb/290301
    If you think you are going to run either of these, I'd suggest uninstalling using control panel first, then run the scripts, and finally do a completely new fresh install.
    Peter

  • I upgraded to windows 8, now my acrobat pro 9.0 is not on my pc

    i upgraded to windows 8, now my acrobat pro 9.0 is not on my pc

    Reinstall it.  If you don't have an install disk, download the trial from http://prodesigntools.com/all-adobe-cs5-direct-download-links.html and use your serial number to activate it.  Follow the Very Important Instructions on that page before proceeding to the download.

  • Where can I download Adobe acrobat 9 startdard? My Adobe Acrobat 9 stardard Cd is not reading.

    Where can I download Adobe acrobat 9 startdard? My Adobe Acrobat 9 stardard Cd is not reading.

    i don't think standard is available via adobe or its affiliate prodesigntools.com
    pro is available here: http://prodesigntools.com/all-adobe-cs5-direct-download-links.html
    but i don't think your serial number will activate that to standard.
    if you got acrobat 9 standard from a computer vendor, they usually have acrobat 9 standard available as a download.

  • Acrobat 8 Standard Frequent Crashing / Not Updating

    Hi. My Adobe Acrobat 8 Standard v 8.1.6 is having some problems. I do a lot of work in Acrobat and I can normally deal with the occasional hiccups, such as restarting Acrobat, but lately things have regressed considerably. I've run the Repair tool but it crashes. I've also tried updating but that crashes too. When I say it crashes I mean it says "...has encountered an error and will exit." I've also considered reinstalling Acrobat but the issue of not having the original CD plus not having registered, looms.
    So I'm a little stuck. Please advise on what options are available. (sorry my keywords question mark is no longer working). With there being problems I may be inclined to restall Windows, but again, without having registered I am wondering what my options are. Thanks in advance.
    RD

    No plugins or profiles. I do access pdfs on network shares frequently using inhouse applications & Internet Explorer.

Maybe you are looking for