Procedure ShowPDF(nomchamp is string,nompdf is string,modeSVG=True)
strMonpdf is string=nompdf
fDelete(CompleteDir(fExeDir())+"TMPPDF_*.pdf")
nomfic is string="TMPPDF_"+DateSys()+TimeSys()+nomchamp+".pdf"
tmpPDf is string=CompleteDir(fExeDir())+""+nomfic
IF InAndroidMode() AND not InTestMode THEN
IF not fFileExist(CompleteDir(fExeDir())+"viewersvg.html") OR not fFileExist(CompleteDir(fExeDir())+"viewersvg.js") THEN
fExtractResource("WD_pdfjs2.zip",fExeDir())
IF fFileExist(CompleteDir(fExeDir())+"WD_pdfjs2.zip") THEN
myarch is int=zipOpen("archpdf",CompleteDir(fExeDir())+"WD_pdfjs2.zip")
IF myarch=0 THEN
zipExtractAll("archpdf",CompleteDir(fExeDir()))
zipClose("archpdf")
END
END
END
IF not fFileExist(CompleteDir(fExeDir())+"viewersvg.html") OR not fFileExist(CompleteDir(fExeDir())+"viewersvg.js") THEN
END
activerjavascript(nomchamp)
END
IF Left(strMonpdf,4)="http" THEN
IF httpRequest(strMonpdf) THEN
fSaveText(tmpPDf,HTTPGetResult(httpResult))
END
ELSE
fCopyFile(strMonpdf,tmpPDf)
END
localDebug is boolean=True
IF InTestMode() THEN
{nomchamp,indControl}=nompdf
ELSE
myurl is string
IF modeSVG THEN
myurl="file://"+CompleteDir(fExeDir)+"viewersvg.html?url="+"./"+nomfic+"&ti="+DateSys+TimeSys
ELSE
myurl="file://"+CompleteDir(fExeDir)+"viewer.html?url="+"./"+nomfic+"&ti="+DateSys+TimeSys
END
{nomchamp,indControl}=myurl
END
MODO DE USAR
BOTAO
strMonpdf is string ="http://www8.hp.com/h20195/v2/GetPDF.aspx/4AA6-4026ENUC.pdf"
ShowPDF("HTML1",strMonpdf,intModeSVG)
OU
BOTAO
ShellExecute(http:
NO CASO DE VIDEO É O MESMO COMANDO
ShellExecute(LinkVideo1)
ou usando um campo do tipo html e o endereço do pdf
https://help.windev.com/en-US/…
iDestination(iPDF)
iPrintReport(RPT_MyPDFReport)
iDestination(iPDF)
iParameterPDF(iProtectionPrinting, iProtectionSelection, "", "Protection")
iPrintReport(RPT_MyPDFReport)
ou
iDestination(iPDF, "C:\Temp\MyPDF.PDF")
iCreateFont(1, 16, iBold, iRoman)
PrintTitle()
PrintText()
iEndPrinting()
iParameterPDF(iProtectionPrinting, iProtectionSelection, "", "Protection")
iDestination(iPDF, "C:\Temp\MyPDF.PDF")
iCreateFont(1, 16, iBold, iRoman)
PrintTitle()
PrintText()
iEndPrinting()
https://help.windev.com/en-US/…
BOTAO
ShellExecute(http:
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/Mensagem modificada, março, 20 2018 - 7:19 PM