Results 1 to 4 of 4

Thread: [RESOLVED] AxAcroPDF Help Please

  1. #1

    Thread Starter
    Hyperactive Member Frabulator's Avatar
    Join Date
    Jan 2015
    Location
    USA
    Posts
    393

    Resolved [RESOLVED] AxAcroPDF Help Please

    I am trying to load a PDF into the AxAcroPDF object using the code below, however nothing loads. I am quite confused. I currently have Adobe Reader DC installed.

    I also am getting the same result when trying to load a PDF into a webbrowser. It makes me think that something is up with adobe, but I dont quite understand it.


    Code:
    Dim selectedPDFPath As String = String.Empty
            selectedPDFPath = pdfSource
            AxAcroPDF1.LoadFile(selectedPDFPath)
            AxAcroPDF1.src = pdfSource


    Code:
    wb.Navigate(FileFullPath)
    Oops, There it goes. Yep... my brain stopped...
    _________________________________

    Useful Things:

    How to link your VB.Net application to Excel

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,807

    Re: AxAcroPDF Help Please

    Given these two methods don't work and you think it is something with Adobe, have you tried reinstalling any PDF related software. I am guessing, but perhaps you also need to manually clear some temporary files and remove any related folders from your user profile. Those usually aren't removed when uninstalling something.

    Are there any webpages documenting the AxAcroPDF1 control?

  3. #3

    Thread Starter
    Hyperactive Member Frabulator's Avatar
    Join Date
    Jan 2015
    Location
    USA
    Posts
    393

    Re: AxAcroPDF Help Please

    Quote Originally Posted by Peter Swinkels View Post
    Given these two methods don't work and you think it is something with Adobe, have you tried reinstalling any PDF related software. I am guessing, but perhaps you also need to manually clear some temporary files and remove any related folders from your user profile. Those usually aren't removed when uninstalling something.

    Are there any webpages documenting the AxAcroPDF1 control?
    I tried installing adobe, clearing out temp files, repairing the adobe install and changing the url to a webbased link instead of directory link ("" to "/")

    file:///C:/Users/[USER]/Downloads/[PDF].pdf
    C:\Users\[USER]/Downloads\[PDF].pdf

    Still nothing.

    When it is loading, both the web browser and the AxAcroPDF, it acts like there is something there, it wants to load, but then it doesnt. It just leaves it as a blank screen.

    The reason I was thinking this has to do something with acrobat is because two days ago the webbrowser was working fine.

    As far as AxAcroPDF, all the sources I found online said that my code should load using the .src as the source of the PDF.
    Oops, There it goes. Yep... my brain stopped...
    _________________________________

    Useful Things:

    How to link your VB.Net application to Excel

  4. #4

    Thread Starter
    Hyperactive Member Frabulator's Avatar
    Join Date
    Jan 2015
    Location
    USA
    Posts
    393

    Re: AxAcroPDF Help Please

    UPDATE

    As an update to anyone wondering, after a day of fighting with this issue I have came to the realization that I can not reliably depend on IE (webbrowser) or Adobe. When an update comes out, things change. I have instead resorted to using a free, open source PDF viewer called PdfiumViewer. It has a nugget and requires a little setup, but it works brilliantly as a pdf viewer. Not as many functions as Adobe, but it gets the job done.

    Code:
    Dim b As Byte() = System.IO.File.ReadAllBytes(pdfSource)
    Dim v As Stream = New MemoryStream(b)
    Dim pdfd As PdfiumViewer.PdfDocument = PdfiumViewer.PdfDocument.Load(v)
    PdfViewer1.Document = pdfd
    Oops, There it goes. Yep... my brain stopped...
    _________________________________

    Useful Things:

    How to link your VB.Net application to Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width