printing several pages
Posted: Fri Sep 21, 2018 9:09 am
Hello Antonio,
I have a printroutine that prints several pages with plantinformation. On every page I want to have the information on the same place. The number of pages is depending on the length of an array. I had a working function, but now I have a new printer and everything shifts to other position.
How can i make a print working on every printer the same.
IF I vary nPagePx I can make it work, but I think this is depending on the printer installed. I want it to work with every printer/computer
I have a printroutine that prints several pages with plantinformation. On every page I want to have the information on the same place. The number of pages is depending on the length of an array. I had a working function, but now I have a new printer and everything shifts to other position.
How can i make a print working on every printer the same.
Code: Select all
PUBLIC nPage
PUBLIC nPagePx := 815
PUBLIC oPrn:=TPrinter():new(0,0,0,0)
oPrn:SetLeftMargin(0)
oPrn:SetRightMargin(0)
oPrn:SetTopMargin(0)
oPrn:SetbottomMargin(0)
oPrn:SetPaperName("A4")
oPrn:AutoPage(.T.)
oPrn:SetSize( oPrn:pageWidth()-56 , (oPrn:pageHeight()) * LEN(aPrintArray))
FOR nPage = 1 TO LEN(aPrintArray)
nRow := 56 + ((nPage-1)*nPagePx)
@ nRow, nCol SAY oSay PROMPT cLatijnNaam OF oPrn SIZE 480, 40
oSay:Setfont("Arial",20 )
oSay:setTextColor(0,51,0,100)
@ nRow+30, 285 IMAGE oImg OF oPrn SIZE 250, 250 FILENAME cFoto
oImg:SetFrame()
NEXT
oPrn:run()