PDF IN webbrowser1 long time

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

PDF IN webbrowser1 long time

Post by sal21 »

i use:

Code: Select all

Private Sub Form_Load()

    PATHPDF = STRPATHPDF & NOME_FILE

    'Debug.Print PATHPDF

    Me.WebBrowser1.Navigate2 "about:blank"
    Me.WebBrowser1.Document.Write "<HTML><Body><embed src=""C:\DIEGO_VB6\FERRAMENTA\PDF_FILE\24042023-102517.PDF"" width=""100%"" height=""100%"" /></Body></HTML>"

End Sub

The code take a long time...
and dont show the pdf !

CData
3StarLounger
Posts: 308
Joined: 24 Dec 2015, 16:41

Re: PDF IN webbrowser1 long time

Post by CData »

in my experience it is a bad idea. Acrobat PDF is a big application. It would like trying to put Word or Excel inside a browser control.

In context of the Access application - - PDFs are always opened outside of the application in their own window provided by the Operating System. ... not inside the Access application.

In context of the Access application - - the browser control is a tricky object in general that I avoid but when must use it I limit it to opening html.

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: PDF IN webbrowser1 long time

Post by sal21 »

CData wrote:
27 Apr 2023, 16:24
in my experience it is a bad idea. Acrobat PDF is a big application. It would like trying to put Word or Excel inside a browser control.

In context of the Access application - - PDFs are always opened outside of the application in their own window provided by the Operating System. ... not inside the Access application.

In context of the Access application - - the browser control is a tricky object in general that I avoid but when must use it I limit it to opening html.
other way?
tks