Author | Topic: Question about printing | |
---|---|---|
Jan Groenestein | Question about printing on Tue, 29 Oct 2019 18:51:55 +0100 Gentlemen, I am trying to print to a labelprinter. Printing goes well in principle, but the printer spits out an A4 size length of paper after printing a single label. That is a waste of about 3 labels for every printed label. Closing in on the code : I start creating a presentation space : oPrinterPS := XbpPresSpace():New() oPrinterPS:Create( oDC, {1040,742,40,40,1000,702}, GRA_PU_LOMETRIC ) Note the label size : 1040 by 741 units of 1/10 mm. Left- and bottom-margin : 40 units Right- and top-margin : 40 units Then I try to force the page size to the same size : oPrinterPS:setPageSize( {1040,742}, GRA_PU_LOMETRIC ) I then check on the paper size : aSize := oPrinterPS:device():paperSize() aSize then shows the following values : {1200, 0, 0, 1040, 2970, 1229, 3508} These values are nothing like what I expected, reading the Help on :paperSize(). I suspect that the cause for the paper waste lies here. So, I don't understand the working of oPrinterPS:device():paperSize() and also not oPrinterPS:setPageSize(), and I cannot find any way to set the paper size correctly. Is there anyone who understands the working of this stuff ? Kind regards, Jan Groenestein | |
Carlos A Beling | Re: Question about printing on Thu, 31 Oct 2019 10:40:08 -0300 Hi Jan: good day. Are you using oPrinter:newPage(), oPrinter:endPage() and/or oPrinter:startPage()? I am not sure if avoinding to use they you can to make the printer does not to skip. Other thing is that the printer must to use margins. Fraternaly Beling On 29/10/2019 14:51, Jan Groenestein wrote: > Gentlemen, > > I am trying to print to a labelprinter. Printing goes well in principle, > but the printer spits out an A4 size length of paper after printing a > single label. That is a waste of about 3 labels for every printed label. > > Closing in on the code : > I start creating a presentation space : > oPrinterPS := XbpPresSpace():New() > oPrinterPS:Create( oDC, {1040,742,40,40,1000,702}, GRA_PU_LOMETRIC ) > > Note the label size : 1040 by 741 units of 1/10 mm. > Left- and bottom-margin : 40 units > Right- and top-margin : 40 units > > Then I try to force the page size to the same size : > oPrinterPS:setPageSize( {1040,742}, GRA_PU_LOMETRIC ) > > I then check on the paper size : > aSize := oPrinterPS:device():paperSize() > > aSize then shows the following values : > {1200, 0, 0, 1040, 2970, 1229, 3508} > These values are nothing like what I expected, reading the Help on > :paperSize(). I suspect that the cause for the paper waste lies here. > > So, I don't understand the working of oPrinterPS:device():paperSize() > and also not oPrinterPS:setPageSize(), and I cannot find any way to set > the paper size correctly. > > Is there anyone who understands the working of this stuff ? > > Kind regards, > Jan Groenestein > | |
Jan Groenestein | Re: Question about printing on Thu, 31 Oct 2019 21:44:29 +0100 Hi Carlos, No, none of these methods is used. I'm working on a solution, if it solves the problem then I will post the solution here. Kind regards, Jan Groenestein Op 31-10-2019 om 14:40 schreef Carlos A Beling: > Hi Jan: > good day. > Are you using oPrinter:newPage(), oPrinter:endPage() and/or > oPrinter:startPage()? I am not sure if avoinding to use they you can to > make the printer does not to skip. Other thing is that the printer must > to use margins. > > Fraternaly > Beling > > On 29/10/2019 14:51, Jan Groenestein wrote: >> Gentlemen, >> >> I am trying to print to a labelprinter. Printing goes well in >> principle, but the printer spits out an A4 size length of paper after >> printing a single label. That is a waste of about 3 labels for every >> printed label. >> >> Closing in on the code : >> I start creating a presentation space : >> oPrinterPS := XbpPresSpace():New() >> oPrinterPS:Create( oDC, {1040,742,40,40,1000,702}, GRA_PU_LOMETRIC ) >> >> Note the label size : 1040 by 741 units of 1/10 mm. >> Left- and bottom-margin : 40 units >> Right- and top-margin : 40 units >> >> Then I try to force the page size to the same size : >> oPrinterPS:setPageSize( {1040,742}, GRA_PU_LOMETRIC ) >> >> I then check on the paper size : >> aSize := oPrinterPS:device():paperSize() >> >> aSize then shows the following values : >> {1200, 0, 0, 1040, 2970, 1229, 3508} >> These values are nothing like what I expected, reading the Help on >> :paperSize(). I suspect that the cause for the paper waste lies here. >> >> So, I don't understand the working of oPrinterPS:device():paperSize() >> and also not oPrinterPS:setPageSize(), and I cannot find any way to >> set the paper size correctly. >> >> Is there anyone who understands the working of this stuff ? >> >> Kind regards, >> Jan Groenestein >> | |
Klaus Overhage | Re: Question about printing on Fri, 01 Nov 2019 10:01:49 +0100 Jan, this should help Klasse XbpPrinter() Syntax :setFormSize( <nFormID> ) --> nFormIDOld | NIL Am 29.10.2019 um 18:51 schrieb Jan Groenestein: > Gentlemen, > > I am trying to print to a labelprinter. Printing goes well in principle, but the printer spits out an A4 size length of paper after printing a single label. That is a waste of about 3 labels for every printed label. > > Closing in on the code : > I start creating a presentation space : > oPrinterPS := XbpPresSpace():New() > oPrinterPS:Create( oDC, {1040,742,40,40,1000,702}, GRA_PU_LOMETRIC ) > > Note the label size : 1040 by 741 units of 1/10 mm. > Left- and bottom-margin : 40 units > Right- and top-margin : 40 units > > Then I try to force the page size to the same size : > oPrinterPS:setPageSize( {1040,742}, GRA_PU_LOMETRIC ) > > I then check on the paper size : > aSize := oPrinterPS:device():paperSize() > > aSize then shows the following values : > {1200, 0, 0, 1040, 2970, 1229, 3508} > These values are nothing like what I expected, reading the Help on :paperSize(). I suspect that the cause for the paper waste lies here. > > So, I don't understand the working of oPrinterPS:device():paperSize() and also not oPrinterPS:setPageSize(), and I cannot find any way to set the paper size correctly. > > Is there anyone who understands the working of this stuff ? > > Kind regards, > Jan Groenestein > |