-
Jun 9th, 2021, 08:59 PM
#1
Thread Starter
Hyperactive Member
[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)
-
Jun 10th, 2021, 02:21 AM
#2
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?
-
Jun 10th, 2021, 06:05 AM
#3
Thread Starter
Hyperactive Member
Re: AxAcroPDF Help Please
Originally Posted by Peter Swinkels
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.
-
Jun 10th, 2021, 09:50 AM
#4
Thread Starter
Hyperactive Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|