Hi Guys,
I have a PDF file that i must to show and possibly allow the user print it. how could i to do this?
ShellExecute( 0, "Print", WNOMBREARQPDF,,, 3 )
Shellexecute( 0, "Open", WNOMBREARQPDF )
// Xbrowse
:bRClicked := {|nRow, nCol| PopRappel( nRow,nCol, oOmzet ),oOmzet:refresh() }
procedure Poprappel( nRow,nCol, oBrw )
local oMenu
czieFact = "\\CAROLIEN-PC\DATA\EXEL\"+str(facturen->factuur,6)+".pdf"
MENU oMenu POPUP
MENUITEM "Mark Selection" ACTION markrappels( oBrw )
MENUITEM "Show PDF" ACTION shellexecute( 0, "OPEN" , cZiefact)
MENUITEM "Print PDF" ACTION druk_fac()
ENDMENU
ACTIVATE POPUP oMenu AT nRow, nCol OF oBrw
return NIL
#include "FiveWin.ch"
static oWnd
FUNCTION Main()
local oBar
DEFINE WINDOW oWnd TITLE "Imprimir PDF"
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
ACTION( IMPRIMIR_PDF() ) TOOLTIP "Imprimir PDF" GROUP
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
ACTION oWnd:End() TOOLTIP "Exit this app" GROUP
SET MESSAGE OF oWnd TO "Imprimir PDF" NOINSET CLOCK DATE KEYBOARD
ACTIVATE WINDOW oWnd
RETURN NIL
FUNCTION IMPRIMIR_PDF()
//ShellExecute(, "Print", "C:\TEMP\FWINTRO.PDF",,, 3 ) // Navarro
ShellExecute( 0, "OPEN", "C:\TEMP\FWINTRO.PDF" ) // Acrobat
// Con el SUMATRAPDF, no llama el adobe, es direto en la impresora.
// Invisible. o con PDFMACHINE
RETURN NIL
// FIN
#include "fivewin.ch"
function Main()
local cFile, aGetFiles:={}, i
FW_SetUnicode( .f. )
cFile := cGetFile( "select one file (*.pdf)|*.pdf|", ;
"webview pdf" )
webview( cFile )
aGetFiles:=aGetFiles( "multiselect (*.pdf)|*.pdf|", "Multiple webview pdf" )
XBrowser( aGetFiles )
for i=1 to len(aGetFiles)
webview(aGetFiles[i])
next
return nil
function webview(cFile)
local oWebView
if cFile=NIL
return nil
endif
oWebView:= TWebView():New()
oWebView:Navigate(cfile)
oWebView:SetTitle( "Microsoft Edge WebView working from FWH" )
oWebView:SetSize( 1200, 800 )
oWebView:Run()
oWebView:Destroy()
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], Jimmy and 40 guests