Antonio Linares wrote:This seems a good candidate:
https://code.google.com/p/sumatrapdf/
AFAIK, we already talked something about it...
function PdfToJpeg( cPDF )
local cExe := "c:\Tracker Software\PDF Viewer\PDFXCview.exe"
local cTitle := cFileNoExt( LFN2SFN( cPDF ) ) //+ " - PDF-XChange Viewer"
local cCmd
local hWnd, hBmp, hBmp2, hDib, cBuf, nWait := 2
local lRet := .f.
if File( cExe ) .and. File( cPDF )
cCmd := cExe + ' /A "fullscreen=yes"' + ' ' + LFN2SFN( cPDF )
//cCmd := cExe + ' /A "Zoom=150"' + ' ' + cPDF
WinExec( cCmd )
SysWait( 3 )
do while nWait < 12 .and. Empty( hWnd := FindWnd( cTitle ) )
SysWait( nWait )
nWait += 1
enddo
if ! Empty( hWnd )
SetFocus( hWnd )
SetForeGroundWindow( hWnd )
SysRefresh()
SysWait( 0.1 )
hBmp := WndBitmap( hWnd )
SendMessage( hWnd, WM_CLOSE )
hBmp2 := BmpTrim( hBmp )
DeleteObject( hBmp )
hDib := DibFromBitmap( hBmp2 )
cBuf := DibToStr( hDib )
GlobalFree( hDib )
DeleteObject( hBmp2 )
lRet := BmpBufToJpg( cFileSetExt( cPDF, "jpg" ), cBuf )
cBuf := nil
endif
endif
return lRet
//----------------------------------------------------------------------------//
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 89 guests