Exception when loading .pdf file

I have an app that is supposed to be able to print .pdf files. Right now, I'm trying to use the Reader's functionality to do so (through Interop.AcroPDFLib.dll and AxInterop.AcroPDFLib.dll, both v1.0.0.0). This app is being run on a Windows XP SP2 computer, and built with Visual Studio 2005.
When the program gets to the LoadFile function of the AxAcroPDF object that gets passed a valid .pdf file, a System.InvalidCastException is thrown. The message reads:
"Unable to cast COM object of type 'System.__ComObject' to interface type 'AcroPDFLib.IAcroAXDocShim'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3B813CE7-7C10-4F84-AD06-9DF76D97A9AA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). (Interop.AcroPDFLib)"
I would greatly appreciate any help you can provide. Thanks in advance.

It's failing on all computers, including my dev machine. Does it matter that I don't want to display the file?
I'm looking at the example you've referenced, and I see a lot of display-related properties being set, such as Location, Size, TabIndex, etc. I didn't believe that these would be necessary if I only needed to quietly print the .pdf file. The block of code that's supposed to be doing this is as follows (and the call to Hide() should probably go above printAll(), but we're not even getting there at this point...):
axAcroPDF1.LoadFile(szFilePath);
axAcroPDF1.src = szFilePath;
axAcroPDF1.setNamedDest(m_szPrinter);
axAcroPDF1.printAll();
axAcroPDF1.Hide();
Also note that szFilePath and m_szPrinter are valid values at this point, since that was my first suspicion.

Similar Messages

  • Problem when loading pdf files from Shared Content

    When I load pdf files from Shared Content, I got the following problem: "The selected document could not be retrieved, please try uploading the document again."
    Anyone knows this?
    Thank you very much in advanced.

    I don't migrated the program, but installed it from the original installer,
    i. e. I first installed Indesign from backup, and then uninstalled it and
    reinstall  clean from Adobe.
    What a plug-in or utility converts page from InDesign to PDF?
    2014-08-10 22:51 GMT+04:00 Peter Spier <[email protected]>:
        problem with exporting PDF files from InDesign CS5  created by Peter
    Spier <https://forums.adobe.com/people/P+Spier> in InDesign - View the
    full discussion <https://forums.adobe.com/message/6627440#6627440>

  • Grey screen is displayed when loading pdf file in Adobe 11

    Hi,
    PDF file is not loaded in the adobe reader 11. Some time I am getting the grey screen instead of the pdf file. Some time my application is displaying the message saying that It is stopped working. its happening sporadically. But if I downgrade the Adobe reader to version 9, I am not getting the above said issue. Is this the known issue with Adobe reader 11. If it is known issue, any work around is available for it. Many persons using our product got affected because of this issue. pls help me to resolve the issue. I have attached the screen shot of the issue.

    Hi,
    I am getting blank screen even If I try open the pdf file from local desktop in the browser. But when I open the local pdf file outside browser I was not able to recreate the issue. But from my application even if I open pdf file outside the browser also (meaning in the adobe reader), I am getting screen. I have attached the screenshot of error I am getting when I try to open the local pdf file. In my task manager I am able to see many process for adobe reader. Even I close the pdf file, the process is not closing.
    Operating System: windows 7
    IE version: 8
    Adobe reader version: 11.0.3

  • "The exception unknown software exception (0xc06d007e) occured in the application at location 0x7c812aeb" - error displayed when opening PDF files. What i do?

    "The exception unknown software exception (0xc06d007e) occured in the application at location 0x7c812aeb" - error displayed when opening PDF files. What i do?

    What is your Reader XI version?
    Have you tried to disable Protected Mode [Edit | Preferences | Security (Enhanced)] ?

  • How do i stop quicktime from loading pdf files

    Why is Quick time loading pdf file and how do I stop it .

    I have the same issue with Safari opening Web PDF links in Quicktime.  When I click on a PDF URL the Quicktime logo will display in Safari, then the first page of the PDF will come up, and only the first page will be available, there is no way to scroll to subsequent pages.  I have not found any settings in Safari, Quicktime, or Adobe Reader to turn that off.  How can I get Quicktime to not be the default imbedded reader for PDF in Safari.

  • Safari & Firefox behaving badly when viewing pdf files

    Since upgrading my Mac to Lion, Safari and Firefox have not displayed pdf files for viewing.
    SAFARI:  When I click a pdf link in Safari, a dark grey blank page appears. When I try to save the pdf file to my desktop, an error message says the file is not properly formatted.
    FIREFOX: When I click a pdf link in Firefox, a white blank page appears. I can successfully save the file to my desktop, and in turn open the file using Acrobat.
    CHROME: Everything works normally...no problems found when viewing pdf files.
    I tried dumping the plist file for both Safari and Firefox, and resetting both browsers clearing them of cache, etc., but none of that worked.
    Has anyone else seen similar behavior? Anyone have a solution?
    I have posted this problem twice in Apple's Safari Forum, but have had no response in almost two months.
    Thanks

    In Safari you to have the Acrobat PDFviewer plugin installed, or the The PDFBrowser plugin by Schubert of Germany Installed.
    If you use the PDFBrowser Plugin you need the 2.4.2 version in order to work with the version 5.1 of Safari and 2.2.3 version for Safari 5.05 and lower.
    In FireFox  version 3.6.X and lower you need version of the PDFBrowser Plugin version 2.2.3 which also works with Safari 5.05 and lower. And version 2.4.2 for Safari 5.1 and above and FF 4.0 and above, and Seamonkey version 2.3 and above.
    THE ADOBE PDFVIEWER PLUGIN has only worked with OSX for Safari. Adobe quit supporting any other browsers on the Macintosh with the roll out of OSX years ago except for Safari. And despite repeated request by many users, its gone on deaf ears.
    As a result This Schubert fellow from Germany has had to fill the void. It works on "any" browser on the Market for Mac. And works for any browser for Windows except Internet Explorer.
    The only thing it doesn't do is online forms which the Acrobat Plugin will. But since it only works with Safari its Useless. I'm not going to Crank up Safari just to fill in Forms.
    Oh, you use to be able to install both plugins and would work fine. Now if both are installed neither works. Its either use the one that works on one Web Browser and allows form filling.
    Or use the one that works on everything, but can't do forms. Oh Schubert on his Web site explains his is forbidden from installing support for forms.

  • Photoshop crashes when loading a file or image

    Using Photoshop cs3 on a PC with Windows 7 installed.
    Major Problem: Photoshop gives no response when opening an image of any sort or psd file which ends out with the options to either close the program or close and find a solution online which gives no solution whatsoever.
    PScs3 was working just fine when installed but after installing an NVIDIA plug-in did it start bearing some problems. When loading png files, a window normally appears telling me that Photoshop could not parse the file. After seeing this I went to uninstall the plug-in. The problem seemed to went away but shortly after was Photoshop crashing at random, and I do mean random. Starting Photoshop at first seems to nullify the chances of crashing but after either a short period of time or a long period of time will it crash when trying to open a file. Opening multiple files at once doesn't work either but when opening only one file into PScs3 will it cooperate until opening a second. I'm not sure if the plug-in is what caused the problem but I do know everything from there seems hectic. Every crash leads me opening PScs3 again with all of its settings reset from when I first exited normally.
    Plugin Used:
    Photoshop_Plugins_8.23.1101.1715
    Appications Type; 4,317 KB
    Company - InstallShield Softwere Corporation
    Have you tried uninstalling and reinstalling the program?
    Unfortunetly yes I have attempted this and the problem still occurs towards cs3. This makes me fear that the entire program is glitched.
    Do you have any other plug-ins installed?
    I've checked and there are no other plug-ins attatched.
    This is my last option before seeing to reformat my computer. If there is any input about the topic, now is the time.

    Just a hunch: change your default printer to something else (a locally attached printer, not networked) or "PrintToPDF", then relaunch Photoshop and try again.
    It could also be a plugin (try disabling ALL third party plugins).
    And it could be a bad OS install, a virus, etc.  It may take a while to find.

  • Recently my adobe is taking much longer to load PDF files that used to open immediately

    recently my adobe is taking much longer to load PDF files that used to load almost instantly

    Look at this comprehensive trouble shooting document;
    https://discussions.apple.com/docs/DOC-3353
    I suggest that you start with SMC and PRAM resets.
    Then  a Safe Boot.
    Ciao.

  • HP LaserJet 1536 - grey background when printing pdf files

    HP LaserJet M1536dnf MFP, Windows 7 32-bit
    Firmware data 20140123
    The latest drivers from official site (HP Universal peinting PCL and Universal printing PS v 5.8.0)
    When printing pdf files from Acrobat Reader, Adobe Acrobat or FoxIt the grey background appears on the paper.  The content of the file is printed normally. Printing from the other sources (Word, Excel, NotePad) is OK
    This question was solved.
    View Solution.

    Hello, 
    If your PC works on Windows XP, then you might try downloadin the hotfix available @ Microsoft.
    Url :
    http://support.microsoft.com/kb/971250
    Regards,
    Jabzi
    Give Kudos to say "thanks" by clicking on the "thumps Up icon" .
    Click "Accept as Solution" if it solved your problem, so others can find it.
    Although I am an HP employee, I am speaking for myself and not for HP.

  • Intermittent Problem of Corruption when printing PDF files

    From time to time I have a problem with text corruption when printing pdf files. Text comes out one character alphabetically later.
    For example, a file I printed yesterday contained the text "ONE WEEK VISITOR LICENCE". On printing it again today (on the same computer and printer), it appeared as "POF!XFFL!WJTJUPS!MDFODF". But another attempt immediately afterwards was correct.Here is a scan of the correct and incorrect printouts
    I have had this problem intermittently over a couple of years, particularly with pdf files embedded as a frame in a web page.
    I am using Adobe Reader 10.1.0 (but the problem has also appeared on earlier versions), Windows XP SP3 with all updates and an HP Deskjet 6980 printer on a wireless link.
    Any advice would be welcome

    Not sure why this may be happening. But you can try printing the PDFs as an image, which should solve the problem. It may take a little longer to print but at least you will get a correct print.
    You can do the same by Clicking on the Advanced button displayed on the Print dialog and checking the checkbox for "Print as Image".
    Hope that this fixes the issue.
    Ankit

  • Adobe Reader 8.1.2 (admplugin.apl) crash when opening PDF files

    Hi,
    I did spend some time today trying to get Adobe Reader 8.1.2 to run on a Citrix Access Essential 2.0 server.
    Setup
    Server OS:
    Windows Server 2003 SP2 - fully patched.
    Other software:
    Office 2003 Standard, Danish, SP3
    Symantec Antivirus 10.1
    Adobe Reader 8.1.2, Danish
    The installation is clean (1 week old).
    Problem description:
    When opening PDF files, Adobe Reader crashes before showing any content from the PDF file. The module crashing is admplugin.apl.
    Work-arounds tried:
    Uninstalling and reinstalling Adobe Reader 8.1.2 (DK).
    Disabling Antivirus (service stopped)
    Replacing admplugin.apl with admplugin.apl from Adobe Reader 8.0
    Uninstalling DK version and installing US version.
    Adding user to local Administrators to exclude any permission related problems.
    Deleting Adobe folders from users profile Application Data\Adobe\... and Local Settings\Application Data\Adobe\...
    Turn DEP off
    Solution:
    Finally I gave up and installed 7.0.9 (Danish). It works as expected.
    It seems that the problem is known and a few user has reported this. One Adobe KB article mentions the problem, and the solution is to disable some 3. party diagnostic/support tools provided by DSL providers. This is definitively not the issue in this installation.
    Anybody from Adobe having any input to this problem?
    Best regards from Denmark!

    Hi,
    I am having a similar issue with Ver 8.1.2 running over cirtix with a similar setup to Jans-Peter.
    The difference is that Reader opens fine but when you try to edit preferences it crashes.
    This only happens on an citrix session. If I run reader on the server directly it works OK.
    However after reading above I can replicate the problem on the server by moving or deleting the ADMPlugin.apl file.
    Any further ideas at all?
    Mark

  • How to load PDF files into oracle database and display them in APEX

    Hi All,
    We have a requirement for loading the Loading PDF files (lots of PDf files) to the oracle database and then display the PDF files in the Oracel APEX report.
    So that User can view the PDF files. Our current APEX verison is 3.2..
    Please let me know how to implement it and where to find the sample application!
    Thanks in advanced!
    Jane

    Thanks Tony for your quick response!
    We need to load a lot of PDfs (history + current).
    I have a questions about the SQL loader. I am trying to insert a pdf file into a table by following the oracle loading sample:
    http://download.oracle.com/docs/cd/B10501_01/text.920/a96518/aload.htm
    Example Data File: loader2.dat
    This file contains the data to be loaded into each row of the table, articles_formatted.
    Each line contains a comma separated list of the fields to be loaded in articles_formatted. The last field of every line names the file to be loaded in to the text column:
    Ben Kanobi, plaintext,Kawasaki news article,../sample_docs/kawasaki.txt,
    But i don't know to where should I put my pdf file on the server.
    for example:
    ,../sample_docs/kawasaki.txt,
    Where is the file 'kawasaki.txt'??
    I try my local path, it didn't work. like c:\temp.
    then I loaded teh PDf file into our server(/findev20/olmtest/orafin/11.5.7/olmtestcomn/temp) , and In my data file. I put the path
    1, pdf_emp1,../findev20/olmtest/orafin/11.5.7/olmtestcomn/temp
    but I got the error: the system can not find the file specified.
    Where should I put the PDf files on the server and how to specify the path in the data file?
    Thanks!
    Jane

  • When a pdf file is opened in a tab, the automatic scroll function from the pad does not work in the other tabs, but only for the particular PDF tab.

    The scroll function from the pad/mouse does not work for the other tabs when a PDF file is opened.

    Hi NSHS,
    Have you checked to see if your PDF add-on is up to date? You should take a look at the [[Opening PDF files within Firefox]] Knowledge Base article. There is a lot of good information in there. You should try both of the suggested PDF add-ons to see if that fixes the issue.
    Hopefully this helps!

  • Before, when reading PDF files, I was able to copy and paste part of the book. Now it is not possible. I can copy but when pasting gets nothing.  Antes, quando lia arquivos PDF, eu conseguia copiar e colar parte do livro. Agora isso não é possível.

    Before, when reading PDF files, I was able to copy and paste part of the book. Now it is not possible. I can copy but when pasting gets nothing.
    Antes, quando lia arquivos PDF, eu conseguia copiar e colar parte do livro. Agora isso não é possível. Eu consigo copiar, mas quando vou colar o texto, não cola nada.

    Caro Fabiano,
    Obrigado por ter contactado as Comunidades de Suporte Apple.
    Na origem do seu problema podem estar várias causas. Nomeadamente:
    O ficheiro (arquivo) que está a ler pode não ser texto, ou seja, pode ser texto transformado em imagem e exportado como PDF.
    A aplicação de destino (onde está a tentar colar o texto copiado) pode não aceitar a colagem de texto formatado.
    A aplicação que está a utilizar para abrir os ficheiros PDF pode não ser indicada para certo tipo de documentos. Experimente o iBooks, o Dropbox ou até mesmo o seu e-mail.
    No caso de nenhuma destas causas estar na origem do seu problema, forneça, por favor, mais informações sobre a origem do ficheiro (descarga pelo Safari, Mail ou outro) bem como o destino (documento Pages, Keynote ou Numbers ou outra aplicação que não o iWork).
    Atentamente,
    Gonçalo Matos
    Estou aqui para ajudar. Clique no botão "Reply" no caso de ter outra questão ou necessitar de outro esclarecimento para que eu possa ajudar da melhor forma que conseguir.

  • Loading pdf file in flex application (not in AIR)

    Hi,
    Could any one suggest opening pdf file within flex application with blazeds.
    we have used the following code to open pdf file in the same window
    navigateToURL( new URLRequest( "http://localhost:8080/PdfSample/jsp/PdfContent.jsp" ),"_self");
    But we want to load the pdf file in a vbox.Similary to the below image
    Is it is possible to load pdf file in flex application,if so how can we achieve it

    Hello Mariush,
    I have to display the content of the PDF in the flex application. If not PDF directly, is there other workaround for this. Or can I display the content of the MS word file, if not PDF.
    Thanks and Regards
       Khalid Chaudhary

Maybe you are looking for