I want to print the contents of a window in a pdf
how should i do?
function WndToPdf( oWnd, cPdf )
local cJpg := cFileSetExt( cPdf, "jpg" )
local oPrn
oWnd:SaveAsImage( cJpg, 100 )
PRINT oPrn PREVIEW FILE cPdf
PAGE
@ 1,1 PRINT TO oPrn IMAGE cJpg
ENDPAGE
ENDPRINT
return nil
nageswaragunupudi wrote:
- Code: Select all Expand view
function WndToPdf( oWnd, cPdf )
local cJpg := cFileSetExt( cPdf, "jpg" )
local oPrn
oWnd:SaveAsImage( cJpg, 100 )
PRINT oPrn PREVIEW FILE cPdf
PAGE
@ 1,1 PRINT TO oPrn IMAGE cJpg
ENDPAGE
ENDPRINT
return nil
nageswaragunupudi wrote:The function must have saved test.jpg before creating test.pdf. Check the quality of test.jpg
function WndToPdf( oWnd, cPdf )
local cJpg := cFileSetExt( cPdf, "jpg" )
local oPrn
oWnd:SaveAsImage( cJpg, 100 )
PRINT oPrn PREVIEW FILE cPdf
PAGE
@ 1,1 PRINT TO oPrn IMAGE cJpg
ENDPAGE
ENDPRINT
return nil
procedure WndToPdf( oWnd, cPdf )
local cJpg := cFileSetExt( cPdf, "jpg" )
local oPrn
oWnd:SaveAsImage( cJpg, 100 )
FwJpgToPdf(cJpg, cPdf)
return
FwJpgToPdf(cJpg, cPdf)
AntoninoP wrote:I see, the problem is that calls PGJPEG1 with the size of the page, instead of with the size of image... it is should be quick fix... maybe with the new lib haru interface, is possible create a pdf without change the quality of jpg
REQUEST FWHARU
TPrinter():lUseHaruPDF := .t.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 123 guests