I'm still struggling with FiveWin preview.
A bitmap must be printed at a certain vertical position.
with this
- Code: Select all Expand view
- PRINT oPrn NAME "prv_test" PREVIEW
When I code
- Code: Select all Expand view
- PRINT oPrn NAME "prv_test" PREVIEW FILE cPdfFile
Here a complete short test prg
- Code: Select all Expand view
- #include "FiveWin.ch"
#define FWDIR "d:\entw\fwh22"
REQUEST FWHARU
PROCEDURE Main()
//----------------
LOCAL oPrn, oFont
LOCAL cPdfFile := CurDrive() + ":\" + curdir() + "\test.pdf"
LOCAL cBmp := FWDIR + "\bitmaps\fwphone.bmp"
LOCAL nHeight, nRow, nCol, nYRes, nXRes
TPreview():lListViewHide := .t.
TPrinter():lUseHaruPDF := .t.
PRINT oPrn NAME "prv_test" PREVIEW // FILE cPdfFile
DEFINE FONT oFont NAME "Arial" SIZE 0, -10 OF oPrn
nHeight := oPrn:GetTextHeight( "", oFont ) // value for proper line feeds
nYRes := ( 10 * oPrn:nVertRes() / oPrn:nVertSize() ) / 10 // Faktor for mm in vertical
nXRes := ( 10 * oPrn:nHorzRes() / oPRn:nHorzSize() ) / 10 // Faktor for mm in horizontal
nCol := 20 * nXRes
PAGE
nRow := 52 * nYRes
oPrn:Say( nRow, nCol, "Line above", oFont )
@ 59, 22 PRINT TO oPrn IMAGE cBmp SIZE 39.5, 24 MM
nRow += 8 * nHeight
oPrn:Say( nRow, nCol, "Line below", oFont )
ENDPAGE
ENDPRINT
RELEASE FONT oFont
RETURN
How could I do that both variants print at the same position?
Thanks and regards
Detlef