Thread: FoxPro Some General Questions/Show PDF into WEB Browser

Show PDF into WEB Browser
Original

You can use Web Browser control to display PDF on Visual FoxPro form. Here's ShowPdf method code from the form

PROCEDURE showpdf
   WAIT WINDOW NOWAIT "Loading PDF ..."
   Thisform.oWB.OBJECT.Navigate2("About:Blank")
   lnSeconds = SECONDS()
   DO WHILE Thisform.oWB.OBJECT.Busy AND SECONDS() - lnSeconds < 60
      DOEVENTS
   ENDDO

   Thisform.oWB.OBJECT.Navigate2(Thisform.oParam.PdfFileName)
   lnSeconds = SECONDS()
   DO WHILE Thisform.oWB.OBJECT.Busy AND SECONDS() - lnSeconds < 60
      DOEVENTS
   ENDDO
   WAIT CLEAR


   RETURN
ENDPROC