Hello Antonio,
I am able to print a lot of information now. You can se the result at the next link:
http://www.plantenkennis.com/downloads/Print_Plantenkennis.pdfFor the part on the leftside of the picture I use this code:
- Code: Select all Expand view RUN
FOR n = 1 TO LEN(aGegevens)
IF LEN(ALLTRIM(aGegevens[n,1])) > 0
@ nRow, nCol SAY oSay PROMPT aGegevens[n,1] + ':' OF oPrn SIZE 105, 35
osay:Setfont("Arial",11 )
ENDIF
@ nRow, nCol+106 SAY oSay PROMPT aGegevens[n,2] OF oPrn SIZE 150, 35
osay:Setfont("Arial",11 )
nRow := nRow + 35
NEXT
But some texts don't need to be on two lines. ìf you see 'planttype' and 'Vaste Plant' this is just one line, but I use two lines. Is there a wy to check how wide the text is, so I can play with the line spaces.
the same is with the 'Aantekeningen' and 'Snoei' The 'Aantekeningen' is a richtext and the 'Snoei' is just a long text The linespace is different. And, can I calculate how much lines there are needed to print all text (it is in a memofield)
- Code: Select all Expand view RUN
IF LEN(ALLTRIM(cAanteken)) > 0
@ nRow, nCol SAY oSay PROMPT 'Aantekeningen' OF oPrn SIZE 150, 20
osay:Setfont("Arial Black",12 )
nRow := nRow + 20
@ nRow, nCol LINE HORIZONTAL SIZE oPrn:pageWidth()- 20 OF oPrn
@ nRow, nCol GET oGetRichText VAR cText MEMO OF oPrn SIZE oPrn:pageWidth()- 40, 100
oGetRichText:SetRichText(.t.)
oGetRichText:SetImportGraf(.t.)
oGetRichText:SetUndo(.t.)
cText := cAanteken
oGetRichText:SetAttributedString(cText)
oGetRichText:GoTop()
nRow := nRow + 100
ENDIF
IF LEN(ALLTRIM(cSnoei)) > 0
@ nRow, nCol SAY oSay PROMPT 'Snoei' OF oPrn SIZE 150, 20
osay:Setfont("Arial Black",12 )
nRow := nRow + 20
@ nRow, nCol LINE HORIZONTAL SIZE oPrn:pageWidth()- 20 OF oPrn
@ nRow, nCol SAY oSay PROMPT cSnoei OF oPrn SIZE 500, 100
osay:Setfont("Arial",12 )
ENDIF