RE:Vista previa de un pdf
por ahi me encontre este codigo...
puedes copiarlo y pegarlo en tu apl
**********************************************
FUNCTION VISORPDF
PUBLIC oform1
oForm1=NEWOBJECT("form1")
oForm1.Show()
RETURN
DEFINE CLASS form1 AS form
Autocenter = .T.
Height = 520
Width = 741
Caption = "Visor de Archivos PDF de Amado"
icon="icons\adobe.ico"
Name = "Form1"
&& PDF file name
cPdfFileName = "=SPACE(0)"
&& How long to wait for PDF to load
nPdfLoadTimeout = 30
ADD OBJECT txtpdfname AS textbox WITH ;
Top = 471, Left = 122, Height = 23, Width = 440, ;
ReadOnly = .T., Name = "txtPdfName"
ADD OBJECT command1 AS commandbutton WITH ;
Top = 465, Left = 566, Height = 40, Width = 85, ;
Caption = "Archivo", Name = "Command1",;
pICTURE='ICONS\adobe.ico',;
PicturePosition=1
ADD OBJECT command2 AS commandbutton WITH ;
Top = 465, Left = 650, Height = 40, Width = 85, ;
Caption = "Salir", Name = "Command2",;
Picture='icons\exit.ico',;
PicturePosition=1
ADD OBJECT owb AS olecontrol WITH ;
Top = 24, Left = 12, Height = 433, Width = 709, ;
OleClass = "Shell.Explorer.2", Name = "oWB"
ADD OBJECT label1 AS label WITH ;
Height = 17, Left = 25, Top = 474, Width = 95, ;
Caption = "Nombre del PDF:", Name = "Label1",;
FontName="Tahoma", FontSize=10
PROCEDURE Refresh
&& Required in VFP8 and earlier to prevent an error
NODEFAULT
ENDPROC
PROCEDURE ShowPdf
WITH thisform
LOCAL lnSeconds
&& Clear Web browser control by loading blank page
.oWB.OBJECT.Navigate2("About:Blank")
&& Wait for load to complete
lnSeconds = SECONDS()
DO WHILE (.oWB.OBJECT.Busy OR .oWB.OBJECT.ReadyState <> 4) ;
AND (SECONDS() - lnSeconds) < This.nPdfLoadTimeout
DOEVENTS
ENDDO
&& Load PDF
WAIT WINDOW NOWAIT "Espere Cargando Archivo PDF ..."
.oWB.OBJECT.Navigate2(.cPdfFileName)
&& Wait for PDF to load
lnSeconds = SECONDS()
DO WHILE (.oWB.OBJECT.Busy OR .oWB.OBJECT.ReadyState <> 4) ;
AND (SECONDS() - lnSeconds) < This.nPdfLoadTimeout
DOEVENTS
ENDDO
WAIT CLEAR
SET procedure TO Funciones
=Simula()
&& PDF display can be adjusted as shown in AdjustPdfView method
&& Uncomment next line if you want to do that and add AdjustPdfView method to the form/class
&&This.AdjustPdfView()
EndWith
ENDPROC
PROCEDURE command2.Click
WITH thisform
.Release
EndWith
ENDPROC
PROCEDURE command1.Click
WITH thisform
&& Get PDF file name
.cPdfFileName = GETFILE("pdf")
&& Display the name in the textbox
.txtPdfName.Value = .cPdfFileName
IF NOT EMPTY(.cPdfFileName)
&& Display PDF
.ShowPdf()
ENDIF
EndWith
ENDPROC
ENDDEFINE